Handoff Configuration
This page provides comprehensive documentation for configuring handoffs in PraisonAI, including handoff filters, delegation strategies, routing rules, and advanced orchestration patterns.Handoff System Overview
The handoff system enables agents to delegate tasks to other agents based on expertise, availability, or specific conditions. This creates flexible multi-agent workflows with intelligent task routing.Basic Handoff Configuration
YAML Configuration
Configure handoffs directly in YAML files using the nestedhandoff: block:
Handoff Policy Options
| Policy | Description |
|---|---|
full | Share complete conversation history |
summary | Share summarized context (default) |
none | No context sharing |
last_n | Share last N messages |
Handoff Filters
Filter Types and Configuration
Composite Filters
Dynamic Filter Functions
Advanced Delegation Settings
Delegation Strategies
Conditional Handoffs
Handoff Chains and Workflows
Handoff Routing Rules
Static Routing
Dynamic Routing
Rule-Based Routing
Tool Policy
HandoffConfig.tool_policy (HandoffToolPolicy) enforces tool boundaries when one agent hands off to another. Default mode is intersect (secure): the target receives only tools shared with the source, minus any blocked_tools.
handoff() factory also accepts shorthand kwargs:
| Parameter | Type | Default | Description |
|---|---|---|---|
tool_policy_mode | Optional[Literal["intersect","passthrough"]] | None | Shorthand for config.tool_policy.mode |
blocked_tools | Optional[List[str]] | None | Shorthand for config.tool_policy.blocked_tools |
Handoff Security and Validation
Tool policy (HandoffConfig.tool_policy) is the primary tool-level security mechanism during handoffs. The settings below cover transport, authorisation, and payload validation.
Performance Optimization
Caching and Optimization
Complete Handoff Configuration Example
Environment Variables
Best Practices
- Use appropriate filters to ensure tasks are routed to capable agents
- Implement fallback mechanisms for handling failures
- Monitor handoff performance and adjust strategies accordingly
- Cache routing decisions for frequently occurring patterns
- Set reasonable timeouts to prevent indefinite waiting
- Implement circuit breakers for unreliable agents
- Use batching for high-volume scenarios
- Maintain audit trails for compliance and debugging
See Also
- Handoff Concepts - Understanding handoff patterns
- Agent Configuration - Agent handoff settings
- Best Practices - Configuration guidelines

