The handoff tool enables agents to pass the conversation to a different agent defined in the same configuration file. Unlike transfer_task — which delegates a sub-task and returns the result to the caller — a handoff transfers full conversational control. The receiving agent takes over and can hand off further. This pattern is useful for routing workflows, where a coordinator decides which specialist should own the conversation.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/docker/docker-agent/llms.txt
Use this file to discover all available pages before exploring further.
Configuration
Handoffs are configured at the agent level, not as a toolset. Add ahandoffs list to declare which agents this agent can hand off to:
handoff tool is automatically added to each agent that has a handoffs list. You do not add it manually as a toolset.
Handoff tool parameters
When the agent callshandoff, it passes:
| Parameter | Type | Required | Description |
|---|---|---|---|
agent | string | Yes | The name of the agent to hand off to (must be in handoffs list). |
Full example
The following example shows a multi-agent workflow where a coordinator routes between web search and filesystem search, with redaction, tabulation, and summarization steps:handoff.yaml
Handoff vs. transfer task vs. background agents
handoff | transfer_task | background_agents | |
|---|---|---|---|
| Control flow | Transfers ownership — calling agent exits | Returns result to caller | Caller continues while sub-agent runs |
| Best for | Routing workflows, pipelines | Delegating to a specialist | Fan-out parallel work |
| Configuration | handoffs list on the agent | sub_agents list | sub_agents list |
Related
Transfer task
Delegate a task and receive the result.
A2A tool
Connect to remote agents via A2A.
Multi-agent
Multi-agent architecture patterns.
A2A protocol
Serve and consume A2A-compatible agents.