Handoff
Defined in the handoff module.Represents a handoff configuration for delegating tasks to another agent. Handoffs are represented as tools to the LLM, allowing agents to transfer control to specialized agents for specific tasks. This is the unified mechanism for agent-to-agent task transfer, supporting:
- LLM-driven handoffs (via tool calls)
- Programmatic handoffs (direct Python API)
- Async handoffs with concurrency control
- Cycle detection and depth limiting
- Configurable context policies
Constructor
No description available.
No description available.
No description available.
No description available.
No description available.
No description available.
No description available.
Methods
tool_name()
Get the tool name for this handoff.
tool_description()
Get the tool description for this handoff.
default_tool_name()
Generate default tool name based on agent name.
default_tool_description()
Generate default tool description based on agent role and goal.
execute_programmatic()
Execute handoff programmatically (not via LLM tool call).
execute_async()
Execute handoff asynchronously with concurrency control.
to_tool_function()
Convert this handoff to a tool function that can be called by the LLM.

