Prerequisites
- A Twexapi API key
- Python 3.10+ or a .NET agent host with MCP support
- A model configured for your Microsoft agent runtime
- Streamable HTTP MCP support in the agent host or a small bridge process
Install
Full example
MCP connection JSON
System instruction
Example task
Handoff checklist
- Store
tweet_id,text,author_username,created_at, and engagement metrics. - Store
user_id,username, and verification fields for profile workflows. - Store
has_more,next_cursor,method,path, androute_used. - Stop before write actions unless a human approves the exact action.
Environment variables
.env
Production guidance
- Use a per-environment API key instead of embedding keys in agent prompts.
- Log MCP tool calls and the returned
path. - Treat any write-capable endpoint as a human-approved step.
- Persist cursors outside the conversation state.
Package versions
| Package | Version |
|---|---|
agent-framework | 0.2+ |
mcp | 1.9+ |