Coordination · Emerging
Handoff
Also known as: Agent handoff, Transfer of control
A handoff transfers ownership of an ongoing task or conversation from one agent or service to another, together with the context it needs, so that the receiver continues the work directly.
01Problem it solves
A task starts with one specialist but turns out to need another. Returning to a central coordinator for every switch adds latency, while restarting with a new handler loses context.
02Use when / Avoid when
Use when
- Tasks move through distinct phases owned by different specialists (triage → billing → refunds).
- The receiving agent should talk to the user or system directly after the switch.
- Agents can decide for themselves when a request is outside their scope.
Avoid when
- One component must stay accountable for the final result; use a supervisor.
- Transfers bounce frequently between the same agents.
- Context is too large or sensitive to pass along whole.
03How it works
- 1DetectThe active agent determines the request is outside its scope.
- 2SelectIt chooses a target from its declared list of allowed handoffs.
- 3PackageConversation history or a filtered context summary is attached.
- 4TransferControl passes to the target, which becomes the active agent.
04Capabilities
| Capability | What it means |
|---|---|
| Control transfer | Ownership of the conversation or task moves from one agent or service to another, together with the context it needs. |
| Runtime branching | The next step is chosen at runtime from the current state, input or classification result. |
05Tradeoffs
| Aspect | You gain | You pay |
|---|---|---|
| Latency | No round-trip through a central coordinator. | No single component sees the whole flow. |
| Modularity | Agents are small and own one domain. | Handoff graphs grow hard to reason about without explicit limits. |
06Failure considerations
| Failure mode | Mitigation |
|---|---|
| Ping-pong: agents hand the task back and forth. | Cap handoffs per task and forbid immediate return transfers without new information. |
| Context is lost or leaks data the receiver should not see. | Use explicit input filters that define what context crosses each handoff. |
| Nobody owns the outcome after several transfers. | Trace every handoff with a task id and define a terminal owner. |
07Implementations
Examples of products and frameworks that implement this pattern. Listed as evidence, not endorsement.
| Implementation | Mechanism |
|---|---|
| LangGraphAgent framework | Command(goto=…) transfers control and state updates to another agent node. |
| OpenAI Agents SDKAgent framework | Handoffs are a first-class primitive; input filters control which context is transferred. |
09Requirements that lead here
- One controller delegates work to specialist agents. Also consider
- The next step depends on runtime state. Also consider