Skip to main content
Agent handoffs let you split complex workflows across specialized agents. The primary agent detects intent and calls a function_tool to hand control to the right agent, which completes the request.

Handoff vs Transfer

“Handoff” and “transfer” are easy to confuse. They differ in who receives the conversation and whether context is passed along. In short: a handoff between agents keeps the conversation with the bot and only switches which agent is in control. A transfer hands the live call to a person. A transfer is cold when the person is connected with no briefing, and warm when they receive context before the call connects.

Context Sharing

When switching agents, the inherit_context flag controls whether the new agent is aware of the previous conversation.

Example

A travel agent hands off to a booking specialist from a function tool, passing the conversation context along. The handoff is driven by the tool’s return value: return the next Agent instance (constructed with inherit_context=True).
inherit_context controls whether the receiving agent starts with the full chat context (continuity) or a clean slate (unrelated task).

What’s Next

Context Window

Manage conversation history automatically.

Context Management

How ChatContext records conversation memory.

References

Examples

Multi-Agent Switch

Switch control between multiple agents.

SDK Reference

Function Tool

Function Tool in the Python API reference.