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.
HandoffResult
Defined in the handoff module.
Rust AI Agent SDK
Result of a handoff operation.
Fields
| Name | Type | Description |
|---|
success | bool | Whether the handoff succeeded |
response | Option<String> | Response from target agent |
target_agent | Option<String> | Name of the target agent |
source_agent | Option<String> | Name of the source agent |
duration_seconds | f64 | Duration of the handoff in seconds |
error | Option<String> | Error message if failed |
handoff_depth | usize | Handoff depth at completion |
Methods
success
fn success(response: impl Into<String>) -> Self
Create a successful result
Parameters:
| Name | Type |
|---|
response | impl Into<String> |
failure
fn failure(error: impl Into<String>) -> Self
Create a failed result
Parameters:
| Name | Type |
|---|
error | impl Into<String> |
with_target
fn with_target(mut self, agent: impl Into<String>) -> Self
Set target agent
Parameters:
| Name | Type |
|---|
agent | impl Into<String> |
with_source
fn with_source(mut self, agent: impl Into<String>) -> Self
Set source agent
Parameters:
| Name | Type |
|---|
agent | impl Into<String> |
with_duration
fn with_duration(mut self, seconds: f64) -> Self
Set duration
Parameters:
with_depth
fn with_depth(mut self, depth: usize) -> Self
Set handoff depth
Parameters:
Source
View on GitHub
praisonai/src/handoff/mod.rs at line 292