> ## 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 Config • Rust AI Agent SDK

> HandoffConfig: Handoff configuration for agent-to-agent transfers

# HandoffConfig

> Defined in the [**Workflow Aliases**](../modules/workflow_aliases) module.

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

Handoff configuration for agent-to-agent transfers

## Fields

| Name              | Type                                  | Description                             |
| ----------------- | ------------------------------------- | --------------------------------------- |
| `target`          | `String`                              | Target agent name                       |
| `message`         | `Option&lt;String&gt;`                | Handoff message/context                 |
| `include_history` | `bool`                                | Whether to include conversation history |
| `metadata`        | `std::collections::HashMap&lt;String` | Custom metadata                         |
| `serde_json`      | `:Value&gt;`                          | Custom metadata                         |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(target: impl Into<String>) -> Self
```

Create a new handoff configuration

**Parameters:**

| Name     | Type                      |
| -------- | ------------------------- |
| `target` | `impl Into&lt;String&gt;` |

### `message`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn message(mut self, message: impl Into<String>) -> Self
```

Set handoff message

**Parameters:**

| Name      | Type                      |
| --------- | ------------------------- |
| `message` | `impl Into&lt;String&gt;` |

### `include_history`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn include_history(mut self, include: bool) -> Self
```

Set whether to include history

**Parameters:**

| Name      | Type   |
| --------- | ------ |
| `include` | `bool` |

### `metadata`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn metadata(mut self, key: impl Into<String>, value: serde_json::Value) -> Self
```

Add metadata

**Parameters:**

| Name    | Type                      |
| ------- | ------------------------- |
| `key`   | `impl Into&lt;String&gt;` |
| `value` | `serde_json::Value`       |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/workflow_aliases.rs#L140">
  `praisonai/src/parity/workflow_aliases.rs` at line 140
</Card>

***

## 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" />

  <Card title="Rust Configuration" icon="gear" href="/docs/rust/configuration" />

  <Card title="Rust Installation" icon="download" href="/docs/rust/installation" />
</CardGroup>
