Agent Handoff • AI Agent SDK
agent_handoff: Emit agent handoff event for tracking agent-to-agent flow.
agent_handoff
Method
</div>
This is a method of the ContextTraceEmitter class in the context_events module.
Emit agent handoff event for tracking agent-to-agent flow.
Signature
def agent_handoff(from_agent: str, to_agent: str, reason: Optional[str], context_passed: Optional[Dict[str, Any]], kind: str, node_id: Optional[str]) -> NoneParameters
ParamField
strNo description available.
ParamField
strNo description available.
ParamField
Optional[str]No description available.
ParamField
OptionalNo description available.
ParamField
str`handoff (agent hands over), delegate (the hierarchical manager assigns a task), route or spawn`.
ParamField
Optional[str]Graph node concerned; defaults to the receiving agent.
Uses
ContextEventtime.time
Source
View on GitHubpraisonaiagents/trace/context_events.py at line 1154