To Tool Function • AI Agent SDK
to_tool_function: Convert this handoff to a tool function that can be called by the LLM.
to_tool_function
Method
</div>
This is a method of the Handoff class in the handoff module.
Convert this handoff to a tool function that can be called by the LLM.
Signature
def to_tool_function(source_agent: 'Agent') -> CallableParameters
ParamField
AgentThe agent that will be using this handoff
Returns
ResponseField
CallableA callable function that performs the handoff
Uses
time.timelogger.infoHandoffResulton_delegationlogger.warninglogger.errorinspect.Parameterinspect.Signature
Source
View on GitHubpraisonaiagents/agent/handoff.py at line 1053