Agent handoff
One agent passes control of a conversation, together with its context, to a specialist agent or to a person.
An agent handoff moves control of a conversation from one agent to another, usually a specialist: a triage agent hands a customer to the refund agent, which then answers directly. The receiving agent takes over the conversation instead of reporting back like a subagent. Handoffs are a basic building block of a multi-agent system.
In the OpenAI Agents SDK a handoff is a tool the model can call, named like transfer_to_refund_agent. By default the new agent sees the entire previous conversation, and an input filter can trim it, for example by removing earlier tool calls. That choice is the main risk. Pass too little and the specialist asks the customer to repeat everything or misreads a summary. Pass too much and the specialist sees data it should not, and you pay for tokens it doesn’t need. A good handoff carries a short structured note: who the user is, what they want, what was already tried and why control moved.
The same applies when an agent hands a case to a person. The note should travel with it, so the person doesn’t start from zero, and the rules for when to escalate belong to human-in-the-loop design. Log every handoff with its reason in your LLM observability tooling; many “bad answers” turn out to be the right agent working from the wrong context.
Sources
- OpenAI Agents SDK: Handoffs openai.github.io
Related terms
- Multi-agent system (multi-agent orchestration): Several AI agents with separate roles and contexts working on one task, usually coordinated by a lead agent or a fixed workflow.
- Subagent: A separate agent run with its own fresh context, started by a main agent for one subtask.
- Human in the loop: A person approves, edits or rejects the agent’s action before it takes effect.
- Agent framework (LangChain, LangGraph and others): A library for building AI agents and LLM workflows: model calls, tools, state, retries and tracing, so you do not write the loop yourself.
- LLM observability: Tracing every model call with inputs, outputs, latency, tokens, cost and the user outcome.
- Context engineering: Deciding what goes into the model’s context, in what order and when, across a whole task.
- Agent team: A lead agent coordinating several long-running agent sessions that share a task list and message each other directly.
- Trajectory evals: Tests that grade an agent’s whole path to an answer: which tools it called, in what order, how many steps and at what cost, not only the final output.
