Documentation Index Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Handoff
Defined in the handoff module.
Rust AI Agent SDK
Represents a handoff configuration for delegating tasks to another agent. Handoffs are represented as tools to the LLM, allowing agents to transfer control to specialized agents for specific tasks.
Fields
Name Type Description target_agent_nameStringTarget agent name tool_name_overrideOption<String>Custom tool name override tool_description_overrideOption<String>Custom tool description override configHandoffConfigHandoff configuration
Methods
new
fn new ( target_agent_name : impl Into < String >) -> Self
Create a new handoff to a target agent
Parameters:
Name Type target_agent_nameimpl Into<String>
fn tool_name ( mut self , name : impl Into < String >) -> Self
Set custom tool name
Parameters:
Name Type nameimpl Into<String>
fn tool_description ( mut self , description : impl Into < String >) -> Self
Set custom tool description
Parameters:
Name Type descriptionimpl Into<String>
config
fn config ( mut self , config : HandoffConfig ) -> Self
Set handoff configuration
Parameters:
Name Type configHandoffConfig
fn get_tool_name ( & self ) -> String
Get the tool name for this handoff
fn get_tool_description ( & self ) -> String
Get the tool description for this handoff
check_safety
fn check_safety (
& self ,
_source_agent_name : & str ,
chain : & HandoffChain ,
) -> Result <()>
Check safety constraints before handoff
Parameters:
Name Type _source_agent_name&strchain&HandoffChain
prepare_context
fn prepare_context (
& self ,
messages : Vec < serde_json :: Value >,
source_agent : & str ,
chain : & HandoffChain ,
extra_context : HashMap < String , serde_json :: Value >,
) -> HandoffInputData
Prepare context data for handoff based on context policy
Parameters:
Name Type messagesVec<serde_json::Value>source_agent&strchain&HandoffChainextra_contextHashMap<Stringserde_json:Value>
Source
View on GitHub praisonai/src/handoff/mod.rs at line 492