Multi-agent Handoffs
Transferring control and context between specialist agents without losing state.
In plain words
One AI helper passes the customer to another helper who's better at that topic, along with the important details.
Think of it like…
A hospital's front desk: reception (triage) sends you to the right department, and the nurse writes a note so the specialist doesn't ask everything again. If the handover note is missing, you repeat yourself; if the desk sends you to the wrong department, you bounce back and forth.
Where you’ve seen it
A telecom assistant has a Triage agent (no tools, only routing instructions) and three specialists: Billing (invoice and payment tools), Technical (diagnostics, outage lookup) and Retention (offers, with approval rules). A customer says "my bill is double and my internet is slow". Triage hands off to Billing with {customer_id, issue: 'double charge', ...}; after resolving it, Billing hands off to Technical with the summary "billing fixed; customer reports slow internet since Monday". Each specialist's prompt and tools are small, and evaluation shows correct routing on 94 percent of 300 test conversations.
Words you’ll hear
- Handoff
- Transferring control (and context) of the conversation to another agent.
- Triage / router agent
- An agent whose job is to select the right specialist.
- Context pass
- What is carried across: full history, a summary, structured state, or a mix.
- Handback
- Returning control to the previous or a supervising agent when done.
Visual diagram
Theory & deep dive
How handoffs work
Frameworks model a handoff as a special tool the current agent can call: transfer_to_billing(). When invoked, the framework switches the active agent, swaps in its instructions and tools, and continues the same conversation. The OpenAI Agents SDK, LangGraph and others provide handoff primitives, often with an optional input schema (the reason for transfer, key fields) and filters that control which history the next agent sees. In graph frameworks a handoff is an edge to another node with updated state.
Design the transfer contract: required fields (customer id, issue, what has been tried), a concise summary written by the handing-off agent, and a history policy (full for simple cases, filtered or summarised when tool outputs are large or sensitive). Decide who owns the conversation afterwards: stay with the specialist until it hands back, or return to triage after each task.
handoff(billing_agent, input_schema={"customer_id": str, "issue": str, "tried": list[str]}): the triage agent must fill customer_id and issue, so Billing starts with the facts instead of re-asking the customer.
When to use handoffs, and what goes wrong
Use handoffs when roles are distinct and conversations naturally move between domains: support, sales, onboarding, IT help desks. Prefer a single agent when the task is simple or tools are few; multi-agent structures add latency, cost and failure modes. Compared with the orchestrator-worker pattern, handoffs transfer control (the user now talks to the specialist), while orchestrators keep control and delegate subtasks, returning results to the orchestrator.
Failure modes: wrong routing (ambiguous descriptions of specialists; fix with clear scopes and examples, and an escape hatch back to triage), lost context (re-asking for known facts), ping-pong loops (A hands to B, B hands back), permission drift (a specialist inheriting powers the user shouldn't have) and inconsistent tone or policy across agents. Mitigate with hop limits, shared structured state, per-agent permissions, a common style guide, tracing of the whole conversation across agents and evaluations of routing accuracy and end-to-end resolution.
Count handoffs per conversation; after 3, route to a human agent with the full trace instead of letting two specialists hand the customer back and forth.
How it works, step by step
Step 1 of 41. Define specialist scopes
Give each agent a narrow responsibility, small toolset and a description that makes routing unambiguous.
- Few tools
- per agent
When to use it & trade-offs
What it is
A handoff transfers control of a conversation from one agent to another. A triage (or router) agent decides who should handle the request and hands off to a specialist (billing, technical support, refunds), which continues with its own instructions and tools. What travels with the handoff is the key design question: the conversation history, a summary, structured state (customer id, order id) or all three. After a handoff, the new agent usually becomes the active agent for subsequent turns, and may hand back or on to others.
Why it matters: One agent with 40 tools and a prompt covering every policy performs worse than several focused agents, each with a small toolset, a concise prompt and clear scope. Handoffs make that structure work in conversations. But badly designed handoffs lose context ("I already told the last agent my order number"), ping-pong between agents, or hand off to the wrong specialist, so the transfer contract needs care.
When to reach for it
- Customer support across billing, technical and sales
- IT and HR help desks
- Systems where tool sets differ by domain
When to avoid or be careful
- Handoffs for tasks one agent handles fine
- Passing no state, forcing users to repeat themselves
- Unlimited handoffs between agents
Single agent vs handoffs vs orchestrator
Strengths: Fewest moving parts.
Watch out: Prompt and tool sprawl as scope grows.
Strengths: Focused prompts and tools; clear ownership.
Watch out: Context loss and routing errors.
Strengths: Parallelism; orchestrator keeps control.
Watch out: Higher cost; synthesis step needed.
Interview signals & numbers to know
When this topic comes up
- “One agent with 40 tools performs badly”
- “Customers repeat themselves after transfer”
- “Triage agent”
- Handoff vs delegation
- Routing accuracy
Benchmarks & rules of thumb
- 94%
- routing accuracy in the example
- 3
- hop limit in the example
- small
- tool sets per specialist
Common mistakes & follow-ups
Common interview mistakes
- Writing overlapping specialist descriptions, so triage routes inconsistently.
- Handing off with only "customer needs help" and no structured details.
- Letting a specialist inherit tools that the end user isn't authorised to use.
Likely interviewer follow-ups
- What's the difference between a handoff and delegating to a worker?
- What context should pass in a handoff?
- How do you prevent routing loops?
Knowledge check
Put it into practice
Practice related interview Q&A
Apply Multi-agent Handoffs with generative AI interview Q&A and hands-on practice.