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_name | String | Target agent name |
tool_name_override | Option<String> | Custom tool name override |
tool_description_override | Option<String> | Custom tool description override |
config | HandoffConfig | Handoff configuration |
Methods
new
| Name | Type |
|---|---|
target_agent_name | impl Into<String> |
tool_name
| Name | Type |
|---|---|
name | impl Into<String> |
tool_description
| Name | Type |
|---|---|
description | impl Into<String> |
config
| Name | Type |
|---|---|
config | HandoffConfig |
get_tool_name
get_tool_description
check_safety
| Name | Type |
|---|---|
_source_agent_name | &str |
chain | &HandoffChain |
prepare_context
| Name | Type |
|---|---|
messages | Vec<serde_json::Value> |
source_agent | &str |
chain | &HandoffChain |
extra_context | HashMap<String |
serde_json | :Value> |
Source
View on GitHub
praisonai/src/handoff/mod.rs at line 492
