Skip to main content

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

HandoffConfig

Configuration for handoff behavior. This consolidates all handoff-related settings including context policy, timeouts, concurrency control, and…

HandoffInputData

Data passed to a handoff target agent.

HandoffResult

Result of a handoff operation.

HandoffCycleError

Error when a cycle is detected in handoff chain.

HandoffDepthError

Error when max handoff depth is exceeded.

HandoffTimeoutError

Error when handoff times out.

HandoffChain

Thread-safe handoff chain tracker.

Handoff

Represents a handoff configuration for delegating tasks to another agent. Handoffs are represented as tools to the LLM, allowing agents to transfer…

HandoffFilters

Common handoff input filters.

ContextPolicy

Policy for context sharing during handoff.

Rust Handoffs

Rust A2A