Go home

The Handoffs Pattern

Agents transfer control to each other via tool calls. Each agent can hand off to others or respond directly to the user.

ai agents

When to use

Use the handoffs pattern when you need to enforce sequential constraints (unlock capabilities only after preconditions are met), the agent needs to converse directly with the user across different states, or you’re building multi-stage conversational flows. This pattern is particularly valuable for customer support scenarios where you need to collect information in a specific sequence—for example, collecting a warranty ID before processing a refund.

Implementation considerations

As you design your multi-agent system, consider:

  • Context filtering strategy: Will each agent receive full conversation history, filtered portions, or summaries? Different agents may need different context depending on their role.
  • Tool semantics: Clarify whether handoff tools only update routing state or also perform side effects. For example, should transfer_to_sales() also create a support ticket, or should that be a separate action?
  • Token efficiency: Balance context completeness against token costs. Summarization and selective context passing become more important as conversations grow longer.