> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# handoff • Rust AI Agent SDK

> Handoff functionality for agent-to-agent delegation.

# handoff

<Badge color="orange">Rust AI Agent SDK</Badge>

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

```ignore theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai::handoff::*;
```

## Classes

<CardGroup cols={2}>
  <Card title="HandoffConfig" icon="brackets-curly" href="../classes/HandoffConfig">
    Configuration for handoff behavior. This consolidates all handoff-related settings including context policy, timeouts, concurrency control, and...
  </Card>

  <Card title="HandoffInputData" icon="brackets-curly" href="../classes/HandoffInputData">
    Data passed to a handoff target agent.
  </Card>

  <Card title="HandoffResult" icon="brackets-curly" href="../classes/HandoffResult">
    Result of a handoff operation.
  </Card>

  <Card title="HandoffCycleError" icon="brackets-curly" href="../classes/HandoffCycleError">
    Error when a cycle is detected in handoff chain.
  </Card>

  <Card title="HandoffDepthError" icon="brackets-curly" href="../classes/HandoffDepthError">
    Error when max handoff depth is exceeded.
  </Card>

  <Card title="HandoffTimeoutError" icon="brackets-curly" href="../classes/HandoffTimeoutError">
    Error when handoff times out.
  </Card>

  <Card title="HandoffChain" icon="brackets-curly" href="../classes/HandoffChain">
    Thread-safe handoff chain tracker.
  </Card>

  <Card title="Handoff" icon="brackets-curly" href="../classes/Handoff">
    Represents a handoff configuration for delegating tasks to another agent. Handoffs are represented as tools to the LLM, allowing agents to transfer...
  </Card>

  <Card title="HandoffFilters" icon="brackets-curly" href="../classes/HandoffFilters">
    Common handoff input filters.
  </Card>

  <Card title="ContextPolicy" icon="brackets-curly" href="../classes/ContextPolicy">
    Policy for context sharing during handoff.
  </Card>
</CardGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Handoffs" icon="arrow-right-arrow-left" href="/docs/rust/handoffs" />

  <Card title="Rust A2A" icon="arrows-left-right" href="/docs/rust/a2a" />
</CardGroup>
