> ## 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.

# Add Result • Rust AI Agent SDK

> AddResult: Result of adding content to knowledge store.

# AddResult

> Defined in the [**knowledge**](../modules/knowledge) module.

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

Result of adding content to knowledge store.

## Fields

| Name       | Type                | Description                 |
| ---------- | ------------------- | --------------------------- |
| `id`       | `String`            | ID of added item            |
| `success`  | `bool`              | Whether operation succeeded |
| `message`  | `String`            | Optional message            |
| `metadata` | `HashMap&lt;String` | Metadata                    |

## Methods

### `success`

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

Create a successful add result

**Parameters:**

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

### `failure`

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

Create a failed add result

**Parameters:**

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

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/knowledge/mod.rs#L192">
  `praisonai/src/knowledge/mod.rs` at line 192
</Card>
