/pattern/handoff/

03 · Multi-AgentTransfer of ControlAgent TransferDelegated Turn

Handoff.
One agent yields. Another takes over.

An agent completely transfers control and relevant context to another specialist.

When to reach for it

  • Responsibility clearly shifts between specialists.
  • User interactions must switch to the appropriate agent.
  • Security boundaries apply per agent.

When it backfires

  • Multiple agents must contribute simultaneously.
  • Control must remain with a central supervisor.
  • Context transfer cannot be reliably bounded.

The tradeoff

Clear transfer of responsibility is achieved at the risk of losing vital context during the handoff.

The mental model

A shape you can draw on a napkin.

Agent A completes its turn, packages context, and transfers control to Agent B. A single directed handoff.

Agent AAgent B
Pitfalls

Two ways this pattern will hurt you.

Context is silently truncated during transfer

The handoff carries only the last N messages. Earlier context (user preferences, constraints) is lost.

Fix · Define a structured context schema for every handoff. Include user state, constraints, and pending obligations.

Handoff loops — A → B → A indefinitely

The handoff condition has no history. Agents ping-pong because each thinks the other is the right owner.

Fix · Track handoff history in state. Cap total handoffs per user session and escalate to a supervisor on exhaustion.

Framework support

Where Handoff is native.

Microsoft Agent FrameworkNative
LangGraphNative

Search

Search patterns, frameworks, and pages.