handoff • Rust AI Agent SDK
Handoff functionality for agent-to-agent delegation.
handoff
Rust AI Agent SDK
Handoff functionality for agent-to-agent delegation.
This module provides handoff capabilities that allow agents to delegate tasks to other agents, similar to the Python SDK implementation.
Features
- Handoff: LLM-driven or programmatic agent-to-agent transfer
- HandoffConfig: Configuration for context policy, timeouts, safety
- HandoffResult: Result of a handoff operation
- ContextPolicy: Policy for context sharing during handoff
Example
use praisonai::{Handoff, HandoffConfig, ContextPolicy};
let config = HandoffConfig::new()
.context_policy(ContextPolicy::Summary)
.timeout_seconds(60.0)
.detect_cycles(true);
let handoff = Handoff::new(target_agent)
.config(config)
.tool_name("transfer_to_billing");Import
use praisonai::handoff::*;Classes
Configuration for handoff behavior. This consolidates all handoff-related settings including context policy, timeouts, concurrency control, and…
HandoffInputDataData passed to a handoff target agent.
HandoffResultResult of a handoff operation.
HandoffCycleErrorError when a cycle is detected in handoff chain.
HandoffDepthErrorError when max handoff depth is exceeded.
HandoffTimeoutErrorError when handoff times out.
HandoffChainThread-safe handoff chain tracker.
HandoffRepresents a handoff configuration for delegating tasks to another agent. Handoffs are represented as tools to the LLM, allowing agents to transfer…
HandoffFiltersCommon handoff input filters.
ContextPolicyPolicy for context sharing during handoff.