Agent handoffs

When multiple agents participate in a task, handoff is the moment one passes control to another. Done cleanly, it's invisible to the user. Done poorly, context is lost and the user has to repeat themselves.

The handoff payload

What passes from agent A to agent B:

When to hand off

The clean handoff pattern

{
  "original_goal": "User wanted X",
  "progress_summary": "I've done A, B, C. Remaining: D, E.",
  "next_task": "Do D using tools X, Y",
  "context_to_preserve": [...key facts...],
  "constraints": {"budget": "$0.50", "timeout": "60s"}
}

The user experience

User shouldn't know they were handed off. The receiving agent introduces itself naturally: "I'll take it from here on the technical review." No "transferring you to a different department" moments.

Failure modes

Designing the trigger

Make handoff conditions explicit in each agent's system prompt. "When X happens, hand off to agent Y via tool Z." Clear boundaries reduce thrashing.