transfer_task tool allows an orchestrator agent to delegate a task to a specialized sub-agent and receive the result back. This is the primary mechanism for synchronous multi-agent orchestration.
You do not need to add it manually as a toolset — transfer_task is automatically available on any agent that has a sub_agents list configured.
Configuration
Configuresub_agents on the orchestrator agent. The transfer_task tool is added automatically:
coordinator agent automatically gets a transfer_task tool that can delegate to developer or researcher by name.
How it works
Orchestrator calls transfer_task
The orchestrator agent calls
transfer_task with the sub-agent name and a task description.Sub-agent executes the task
The sub-agent runs with its own tools and instructions to complete the task.
Result returned to orchestrator
The sub-agent’s final response is returned to the orchestrator as the tool result.
Transfer task vs. background agents vs. handoff
transfer_task | background_agents | handoff | |
|---|---|---|---|
| Execution | Sequential — waits for result | Parallel — returns task ID immediately | Transfers ownership — calling agent exits |
| Returns | Sub-agent’s result | Task ID for later polling | Nothing — sub-agent takes over |
| Best for | Delegating to one specialist | Fan-out parallel work | Routing and pipeline workflows |
| Setup | sub_agents list | sub_agents list | handoffs list |
Related
Background agents
Dispatch work to multiple sub-agents in parallel.
Handoff
Transfer conversational control to another agent.
Multi-agent
Multi-agent architecture patterns.
Todo
Track tasks across a multi-agent workflow.