handoff • AI Agent SDK

Handoff functionality for agent-to-agent delegation.

handoff

AI Agent

Handoff functionality for agent-to-agent delegation.

This module provides handoff capabilities that allow agents to delegate tasks to other agents, similar to the OpenAI Agents SDK implementation.

Unified Handoff System:

  • Handoff: LLM-driven (tool call) or programmatic agent-to-agent transfer
  • HandoffConfig: Configuration for context policy, timeouts, concurrency, safety
  • Replaces/absorbs Agent.delegate() and SubagentDelegator functionality

Import

python
from praisonaiagents.agent import handoff

Classes

Functions

Constants

NameValue
_HANDOFF_SEED_LOCK_INIT_GUARDthreading.Lock()
RECOMMENDED_PROMPT_PREFIX'You have the ability to transfer tasks to specialized agents when appropriate. \nWhen you determine that a task would be better handled by another agent with specific expertise, \nuse the transfer to...
TTypeVar('T', bound=BaseModel)

Related Documentation