Skip to main content

execute_programmatic

Method
This is a method of the Handoff class in the handoff module.
Execute handoff programmatically (not via LLM tool call). This is the unified programmatic handoff API that replaces Agent.delegate().

Signature

def execute_programmatic(source_agent: 'Agent', prompt: str, context: Optional[Dict[str, Any]]) -> HandoffResult

Parameters

source_agent
Agent
required
The agent initiating the handoff
prompt
str
required
The task/prompt to pass to target agent
context
Optional
Optional additional context

Returns

Returns
HandoffResult
HandoffResult with response or error