Execute Async • AI Agent SDK
execute_async: Execute handoff asynchronously with concurrency control.
execute_async
Async
Method
</div>
This is a method of the Handoff class in the handoff module.
Execute handoff asynchronously with concurrency control.
Signature
async def execute_async(source_agent: 'Agent', prompt: str, context: Optional[Dict[str, Any]]) -> HandoffResultParameters
ParamField
AgentThe agent initiating the handoff
ParamField
strThe task/prompt to pass to target agent
ParamField
OptionalOptional additional context
Returns
ResponseField
HandoffResultHandoffResult with response or error
Uses
time.timelogger.infoHandoffResulton_delegationlogger.warningasyncio.wait_forHandoffTimeoutError
Used By
Source
View on GitHubpraisonaiagents/agent/handoff.py at line 916