Catalog / Orchestration
Handoff
No central coordinator. The agent holding the task either resolves it or transfers full ownership to a better-suited specialist.
Reference task used across all patterns: "My order arrived damaged. Can I get a refund?"
Topology
ActorLead agentWorker
Run
05 steps
Ready to run
Play runs the whole scenario. Step advances one event at a time so you can read what happens.
Metrics
| Wall-clock time | 0.0 s |
|---|---|
| Tokens processed | 0 |
| Estimated cost | $0.000 |
| Handoff count | 0 |
Illustrative values. They show proportions between patterns, not benchmarks.
All steps
Normal run
- Request arrives. Triage reads the message. It resolves nothing itself; its only job is selecting a specialist.
- Classify. Triage classifies the request as a returns case.
- Transfer ownership. Control passes to Returns entirely. Triage leaves the loop: whoever holds the task owns it.
- Specialist executes. Returns has the tools and instructions for exactly this case type.
- Respond. Refund approved. One handoff and no coordinator in the path, so latency and cost stay low.
Outcome: correct answer. The request mapped cleanly to one specialist, so a single transfer resolved it without a central bottleneck.
Failure mode
- Request arrives. Identical start to the normal run.
- Transfer to Billing. The word “refund” reads as a payment matter, so Triage transfers the task to Billing.
- Billing transfers on. Billing sees “damaged” and classifies it as a shipping issue.
- Shipping returns it. The parcel was delivered on time, so Shipping rejects ownership and sends it back to Triage.
- Cycle repeats. Triage makes the same decision again. Nothing in its context records the previous attempt.
- Cycle repeats. Each hop carries a longer history, so every transfer costs more than the previous one.
- Cycle repeats. The customer is still waiting.
- Budget exhausted. Six transfers and no response. No agent was wrong in isolation; the system had no owner and no hop limit.
Failure: handoff cycle. A → B → C → A is the most common failure of handoff systems. Mitigation: cap transfers, carry the hop history with the task, and escalate to a human at the limit.
Execution trace
Model workingSending a message
Reference
- Problem
- Requests span many specialisms, and a single agent should not have to know all of them.
- Analogy
- A hospital triage desk directs patients to the right department, until departments start sending patients back to the desk.
- Use when
- Domains are clearly separated and each request belongs to exactly one of them, as in customer support routing.
- Avoid when
- Domains overlap and ownership is ambiguous. Without a hop limit, overlap becomes a cycle.
- Typical failure
- Handoff cycles (A → B → C → A) when no agent accepts ownership.
- Also known as
- Handoff (OpenAI Agents SDK)Handoff orchestration (Microsoft)Routing (Anthropic, single-step variant)
- Related patterns
- Orchestrator–workers (alternative)
Space play or pause → next step ← previous step R reset F failure mode