A streaming multi-agent demo built with the OpenAI Agents SDK and FastAPI.
A Supervisor agent routes requests to one of two specialists:
- Limit Agent — views and changes debit card limits via the
limit-mcpMCP server. - FAQ Agent — answers fun questions about ABN AMRO.
- Python 3.12
- uv
- A running limit-mcp server (default:
http://127.0.0.1:2009/mcp) OPENAI_API_KEYin a.envfile
uv syncCreate a .env:
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4.1 # optional
MCP_SERVER_URL=http://127.0.0.1:2009/mcp # optional
CLI chat:
uv run python agent.pyHTTP streaming API (FastAPI on 127.0.0.1:8000):
uv run python server.pyThen POST to /api/chat/stream:
curl -N -X POST http://127.0.0.1:8000/api/chat/stream \
-H "Content-Type: application/json" \
-d '{"message": "show my card limits"}'Responses are NDJSON with conversation, agent, delta, handoff, tool, and done events.