Build a multi-agent handoff workflow with the OpenAI Agents SDK

domain: openai.github.io/openai-agents-python · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install the SDK: pip install openai-agents
  2. Define specialist agents with their own instructions, tools, and model settings using the Agent class
  3. Add handoffs between agents: set the handoffs parameter on the orchestrator agent to a list of target agents — the SDK exposes each as a transfer_to_<agent_name> tool for the LLM
  4. Run the workflow with Runner.run(orchestrator_agent, input_message) — the runner loops until an agent produces a final response or a stopping condition is met
  5. Attach output guardrails to the final agent and input guardrails to the first agent using the guardrails parameter on Agent
  6. Inspect traces in the OpenAI Traces dashboard — tracing is enabled by default and captures LLM calls, tool calls, and handoffs

Known gotchas

Related routes

Upsert Intercom contacts, start conversations, and configure Fin AI agent handoff to human support via the Intercom REST API
developers.intercom.com/docs/references/rest-api · 6 steps · unrated
Design a buyer-agent and seller-agent price-negotiation workflow using Google's Agent2Agent (A2A) protocol Task, Message, and Artifact primitives to exchange offers and counter-offers before settling on a price
a2a-protocol.org · 6 steps · unrated
vLLM: serve a model behind an OpenAI-compatible HTTP API using `vllm serve`
ml-ops · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans