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
The target agent to hand off to
Custom tool name (defaults to transfer_to_<agent_name>)
Custom tool description
Callback function executed when handoff is invoked
Type of input expected by the handoff (for structured data)
Function to filter/transform input before passing to target agent
HandoffConfig for advanced settings
Shorthand for config.context_policy (“full”, “summary”, “none”, “last_n”)
Shorthand for config.timeout_seconds
Shorthand for config.max_concurrent
Shorthand for config.detect_cycles
Shorthand for config.max_depth
Returns
A configured Handoff instance
Usage
Uses
HandoffConfigContextPolicyHandoff
Source
View on GitHub
praisonaiagents/agent/handoff.py at line 669
