AI Agent Handoffs: How to Transfer Tasks Between Agents

Learn how an AI agent handoff moves control, context, and ownership to another agent or a person, and what to send so the receiver does not start blind.

Billing dispute folder INV-20417 passing from a support robot to a billing robot

Key takeaways about AI agent handoff

  • An AI agent handoff transfers a task's control and context to another agent or person, and the sending agent stops acting on it.

  • A handoff moves control away from the sender, while delegation returns a result to the delegator and routing picks the receiving agent without moving control.

  • A handoff message carries the task state, a named owner, a trimmed context slice, prior attempts, and an exit condition instead of the full transcript.

  • Intelligent agent handoffs to a human pass a case summary, the supporting evidence, and any promise the bot already made to the customer.

  • BAND carries handoffs across frameworks through case rooms, @mention delivery to the named receiver, and per-recipient processing status showing whether the receiver accepts the work.

What Are AI Agent Handoffs and How Do They Work?

A handoff transfers control of the work and its context to another agent or person, after which the sender stops acting on it. Agent handoffs fit the moment a specialist should own the next reply. OpenAI's orchestration and handoffs guide puts it in one line: with a handoff, "control moves to the specialist agent."

In your code, the sender decides it should no longer own the task, picks a receiver, and passes the task with whatever context it chooses to include. From that turn on, the receiver talks to the customer.

The context choice is where a billing dispute goes wrong. A customer tells the support bot that invoice INV-20417 shows a $412.80 charge twice. The bot hands the case to the billing agent, but only the customer's last message crosses: "Can you fix this?" The billing agent asks for the invoice number, and the customer types it again.

AI Agent Handoffs vs. Task Delegation and Routing

Builders mix up the three terms. The difference that matters in production is where control and context sit after the work moves.

Term

Definition

Where control goes

Where context goes

Routing

Deciding which agent receives a piece of work. A choice at one point in time, with no transfer of accountability.

Stays with whoever routed

Whatever input was routed

Delegation

Assigning a scoped subtask to another agent while the delegator stays accountable and waits for the result.

Returns to the delegator with a result

A scoped brief for the subtask

Handoff

Transferring control of the work, and its context, to another agent or a person, after which the sender stops acting on it.

Leaves the sender for good

Travels with the work, or the receiver must be able to fetch it

In the billing case, choosing the billing agent from several possible specialists is routing. Asking a specialist for the account balance and waiting for the result is delegation. Giving the billing agent the dispute so it answers the customer next is a handoff. OpenAI draws the same line: with agents as tools, "the manager keeps ownership of the reply." A controller that sequences all three is AI agent orchestration.

Common AI Agent Handoff Patterns and Architectures

Handoff shapes in a support workflow.

Triage to specialist. One front agent reads the request and hands it to one of several specialists, like the support bot picking billing over technical support.

Sequential relay. Each agent finishes a stage and passes the case on: the billing agent confirms the duplicate charge, then a refunds agent issues the money.

Agent to human escalation. The receiver is a person because a policy requires one. Here, any refund above $250 needs a billing specialist's approval.

Supervisors, networks, and the wider catalog belong to multi-agent orchestration patterns.

Where the handoff runs in your stack

The architecture decides how much context crosses by default, and LangChain's handoffs documentation describes the first two cases. With a single agent and middleware, a tool updates a state variable such as current_step, the agent loads a new prompt and tool set, and history flows along because only one conversation exists.

With separate agents as graph nodes, LangChain is blunt: "you must explicitly decide what messages pass between agents. Get this wrong and agents receive malformed conversation history or bloated context." The INV-20417 dispute lost its invoice number here.

The third case spans separate runtimes. The support bot may keep a session ID in one framework while the billing agent uses a thread ID in another, so shared context does not flow automatically across the boundary. A protocol or runtime layer has to carry or reconstruct the context the receiver needs. BAND's post on session identity across frameworks covers that mismatch.

How to Transfer Tasks, Context, and Ownership Between AI Agents

What a handoff record should carry

Write the handoff as a record the receiver can act on without re-asking the customer anything. For the billing dispute, it holds five items:

  1. The task and its state: a duplicate $412.80 charge on INV-20417, confirmed in the payment log, refund not issued.

  2. The new owner, by name, so no agent assumes the sender still holds it.

  3. The context slice the receiver needs. LangChain warns that passing the full subagent conversation "often creates problems": irrelevant internal reasoning can confuse the receiver, and token costs rise.

  4. Constraints and prior attempts: the $250 approval threshold applies, and the customer turned down store credit.

  5. The exit condition: refund confirmed to the customer, or the case returned with a reason.

Then confirm receipt, because a handoff nobody picked up looks the same as one in progress until someone checks.

When the receiver is a person: intelligent agent handoffs

In customer service, intelligent agent handoffs (CX vendors often say "intelligent handoff") are the bot-to-human version, with the case history attached instead of a customer dropped into a queue. The billing specialist who approves refunds above $250 needs a three-line summary, the evidence (invoice and payment log entry), and the exact words the bot used with the customer.

The bot's exact words are the easiest item to leave out. If the bot told the customer "you'll see the refund by Friday," the specialist has to honor or correct that promise in the first reply. The approval itself is a human-in-the-loop checkpoint, and the handoff determines whether the specialist arrives with the case already assembled.

AI Agent Handoff Protocols, Frameworks, and Tools

Handoffs inside one framework

In the OpenAI Agents SDK, you declare handoffs on the agent, for example, a triage agent with handoffs=[billing_agent, handoff(refund_agent)]. OpenAI notes that handoffs "can also carry structured metadata or filtered history," which gives the context slice a home and leaves its contents to you.

LangChain and LangGraph do it through state. A handoff tool returns a Command that updates a variable such as current_step or active_agent, and when the tool updates messages, it must also add a ToolMessage with a matching tool_call_id, or the history becomes malformed. LangChain's docs credit OpenAI with coining the term for tool calls like transfer_to_sales_agent. CrewAI calls its equivalent delegation rather than a handoff.

Handoffs across runtimes and frameworks

Each of those primitives moves work between agents in the same framework. Across stacks, the transfer needs a protocol, a platform, or both. The A2A protocol sends a task from one agent to another over the network and gives it a lifecycle the sender can query, so the sender sees whether the receiver took the work. A2A pairs one client agent with one remote agent. Orchestration platforms' agent handoffs sit above that pair, where a support bot, a billing agent, and a human approver need one record to read.

How BAND Supports Agent Handoffs Through Shared Rooms, Messaging, and Context

A handoff works when control, context, and ownership all reach the receiver. Frameworks move control between their own agents and leave the other two to you. Across frameworks, or out to a person, a shared record has to carry them, and mismatched thread, session, and context IDs keep that record out of either framework.

In BAND, the INV-20417 dispute gets one case room with the support owner, the billing agent, and the billing specialist, and each agent keeps its own framework. The handoff is an @mention that triggers only the named agent. An agent added mid-conversation sees none of the earlier messages, so the support owner writes the invoice, the charge, and the Friday promise into the handoff. Per-recipient status shows whether the billing agent is processing, processed, or failed, and after a restart the agent reloads every message sent by or mentioning it.

The billing specialist sees every message and event, so the refund approval starts from the full case. The existing support system stays the customer channel while BAND carries the internal specialist handoffs. The sender picks the receiver, and BAND connects A2A-compatible and framework-built agents rather than replacing A2A or in-framework handoffs. The specialized CX agents pattern shows the setup, governed agent handoffs add the approval decision and final owner to the room record, and the BAND Agent API docs cover the calls behind each step.

Book a demo

FAQs about AI agent handoff

Not quite. An escalation moves a case to a higher tier of authority. A handoff is the transfer mechanism, and it can go sideways to a peer agent or up to a person. An escalation that drops the customer into a queue without the case history is a cold transfer.

Software for agent handoffs from bots to humans falls into three groups. Helpdesk and contact-center platforms offer live-agent transfer into a human queue. CX AI agent vendors pass a generated summary along with the transfer. Agent frameworks provide interrupts that pause an internal agent until a person approves. Pick the group by where the customer conversation already lives.

Record each handoff as an event with the sender, the receiver, a case ID, and the outcome: accepted, completed, or failed. Alert on handoffs nobody picked up within a set window, and trace one case across every agent it touched. Multi-agent observability covers tracing context between agents.

Use one agent if the next step needs no different instructions, tools, or policy. OpenAI's guidance is to "start with one agent whenever you can," and it warns that splitting too early "creates more prompts, more traces, and more approval surfaces." Each extra handoff adds another place to lose an invoice number.

Loops start when a receiver can hand work back without adding anything, or decline without saying so. Cap handoffs per case, require a receiver to accept the work or return it with a reason, and keep one named owner. Mention-only delivery reduces accidental triggers, though it will not stop two agents from repeatedly naming each other.