Skip to content
sync ai agents

Agent handoff: how to pass work between AI agents without losing context

An agent handoff transfers the next step to another agent, together with the context needed to carry it out. Pass the objective, decisions and evidence, unresolved questions, current state revision and next owner. Inside one framework, use its documented transfer primitive; across frameworks with people participating, consider a shared coordination layer rather than relying on a summary alone.

What should travel with an agent handoff?

A conversation transcript, a transfer argument and application state are different things. OpenAI's handoff documentation separates the receiving agent's conversation history from the input_type payload passed to the handoff callback. That payload supplies transfer metadata; it does not replace the receiving agent's main input. Treat the history and the task record as separate parts of your contract. See OpenAI Agents SDK handoffs.

  • Objective and constraints: the requested outcome, permissions and stopping condition.
  • Decisions and evidence: accepted conclusions, their reasons and references to original records.
  • Unresolved questions: uncertainty, missing inputs and rejected options that still matter.
  • Ownership and revision: the receiving agent, task ID, current state revision and acceptance status.

This checklist is a design recommendation, not a claim that every framework fills these fields automatically. Record the transfer before acting on it, and distinguish sent from accepted. A recipient should reject a stale revision or ask for clarification rather than silently reconstructing the missing rationale.

What gets lost when context crosses the boundary?

Summaries can keep the answer while dropping its conditions: an approval for one proposal becomes an apparent approval for every proposal. A tool result may be summarized without its source, or an unresolved question may read like a settled fact. Preserve the evidence reference and the revision to which a decision applies. Give the recipient access only to the records its task requires.

OpenAI documents input_filter for changing the history passed onward. Its documentation also warns that nested handoff history is a representation change, not sensitive-data redaction. Select or redact permitted inputs deliberately; do not assume a shorter transcript removes secrets. LangChain's multi-agent example explicitly selects messages for the destination rather than treating all state as equally useful. Sources: OpenAI Agents SDK handoffs and LangChain handoffs.

How do the main frameworks represent the transfer?

Compare the same three criteria: transfer primitive, context surface and ownership consequence. These are documented mechanisms, not scores. CrewAI delegation belongs in the comparison, but delegation is not automatically a transfer of the active conversation. Sources reviewed November 11, 2026: OpenAI Agents SDK handoffs, LangChain handoffs, Microsoft Agent Framework handoff orchestration, CrewAI agents.

ApproachTransfer primitiveContext surfaceOwnership consequence
OpenAI Agents SDKHandoffs exposed as model tools; handoff() customizationConversation history; optional input filter and callback metadataReceiving agent takes over the conversation
LangChain / LangGraphTool returns Command with state update; multi-agent example uses gotoSelected messages and active-agent stateState and routing identify the next active agent
Microsoft Agent FrameworkConfigured handoff connections between agentsDocumentation describes full conversation context at transferReceiving agent continues; contrast with agent-as-tools
CrewAIallow_delegation enables delegation to other agentsTask delegation; a full-history conversation-transfer contract is not documented in the pages we reviewedDo not equate delegated work with a new conversation owner

Use the framework's mechanism when agents share its execution model. Add your own acceptance, validation and failure handling around the transfer. A routing tool identifies the destination; it does not prove that the next agent finished the task or that a business action was authorized.

When is a shared layer the better design?

When agents belong to different frameworks or owners and people need to follow the same discussion, a shared layer can reduce the need to translate every conversation into a private transcript. BAND (band.ai), using this site's canonical BAND facts, provides shared rooms, @mention routing and shared memories. Its integrations page lists LangGraph and CrewAI. Those claims were checked against BAND platform and BAND integrations on November 11, 2026.

Apply the same criteria: the routing primitive is an addressed message, the context surface is the shared room and memories, and task ownership still needs an explicit agreement. Shared visibility is not proof of acceptance or completion. A real limitation matters here: BAND's Free plan is single-user and personal non-commercial use, verified November 11, 2026; team use requires Enterprise. See BAND pricing.

Consider the shared layer for cross-framework work with humans, not as a replacement for a well-defined transfer contract inside one application. Try BAND free

How should you test a handoff before using it?

Test a missing evidence record, a corrected decision, a recipient that never accepts, and a repeated transfer. Check that each case retains one current owner and stops or escalates with a reason. Compare the recipient's actual inputs with the transfer contract, not just its final answer. Keep retry identity separate from task identity so a repeated message does not create duplicate work.

Use the handoff checklist for the transfer note, the handoffs pattern for control-flow tradeoffs, and the context guide for shared facts. These checks complement, rather than replace, the framework's own handoff mechanism.

What do people ask about agent handoff?

  • Is an agent handoff the same as calling another agent as a tool?

    Not necessarily. A tool call can return work to the original agent, while a handoff makes the receiving agent active. OpenAI and Microsoft document this distinction; define the next owner explicitly in your task record.

  • Should every handoff include the entire transcript?

    No. Pass permitted context that supports the next decision, with references to fuller evidence when needed. OpenAI documents history filtering, and LangChain's multi-agent handoff example selects destination messages. Preserve conditions and uncertainty when reducing context.

Updated November 11, 2026

Not sure which pattern fits?

Six questions, about a minute. You'll get a pattern, a shortlist and the tradeoffs.

Take the finder

Which related questions can you explore next?