Handoff Config • AI Agent SDK
HandoffConfig: Unified configuration for handoff behavior.
HandoffConfig
Defined in the handoff module.
AI Agent
Unified configuration for handoff behavior.
This consolidates all handoff-related settings including context policy, timeouts, concurrency control, and safety features.
Attributes: context_policy: How to share context during handoff (default: summary for safety) max_context_tokens: Maximum tokens to include in context max_context_messages: Maximum messages to include (for LAST_N policy) preserve_system: Whether to preserve system messages in context tool_policy: Tool boundary enforcement policy (NEW – security by default) timeout_seconds: Timeout for handoff execution max_concurrent: Maximum concurrent handoffs (0 = unlimited) detect_cycles: Enable cycle detection to prevent infinite loops max_depth: Maximum handoff chain depth async_mode: Enable async execution allow_parallel: Enable parallel execution (from Delegator) on_handoff: Callback when handoff starts on_complete: Callback when handoff completes on_error: Callback when handoff fails
Properties
ContextPolicyNo description available.
intNo description available.
intNo description available.
boolNo description available.
HandoffToolPolicyNo description available.
floatNo description available.
intNo description available.
boolNo description available.
intNo description available.
boolNo description available.
boolNo description available.
Optional[Callable]No description available.
Optional[Callable]No description available.
Optional[Callable]No description available.
Internal & Generic Methods
- from_dict: Create config from dictionary.
- to_dict: Convert config to dictionary.
Source
View on GitHubpraisonaiagents/agent/handoff.py at line 71