handoff
Function
This function is defined in the handoff module.Create a handoff configuration for delegating tasks to another agent. This is a convenience function that creates a Handoff instance with the specified configuration. It supports both the legacy API and the new unified HandoffConfig.
Signature
Parameters
Agent
required
The target agent to hand off to
Optional
Custom tool name (defaults to transfer_to_<agent_name>)
Optional
Custom tool description
Optional
Callback function executed when handoff is invoked
Optional
Type of input expected by the handoff (for structured data)
Optional
Function to filter/transform input before passing to target agent
Optional
HandoffConfig for advanced settings
Optional
Shorthand for config.context_policy (“full”, “summary”, “none”, “last_n”)
Optional
Shorthand for config.timeout_seconds
Optional
Shorthand for config.max_concurrent
Optional
Shorthand for config.detect_cycles
Optional
Shorthand for config.max_depth
Returns
Handoff
A configured Handoff instance
Usage
Uses
HandoffConfigContextPolicyHandoff
Source
View on GitHub
praisonaiagents/agent/handoff.py at line 669
