Skip to content

Repository files navigation

multi-agent-simple

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-mcp MCP server.
  • FAQ Agent — answers fun questions about ABN AMRO.

Requirements

  • Python 3.12
  • uv
  • A running limit-mcp server (default: http://127.0.0.1:2009/mcp)
  • OPENAI_API_KEY in a .env file

Setup

uv sync

Create a .env:

OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4.1               # optional
MCP_SERVER_URL=http://127.0.0.1:2009/mcp   # optional

Run

CLI chat:

uv run python agent.py

HTTP streaming API (FastAPI on 127.0.0.1:8000):

uv run python server.py

Then 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages