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

# Memory Preset • Rust AI Agent SDK

> MemoryPreset: Memory preset configuration

# MemoryPreset

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

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

Memory preset configuration

## Fields

| Name         | Type                | Description                      |
| ------------ | ------------------- | -------------------------------- |
| `backend`    | `String`            | Memory backend type              |
| `options`    | `HashMap&lt;String` | Additional configuration options |
| `serde_json` | `:Value&gt;`        | Additional configuration options |

## Methods

### `new`

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

Create a new memory preset

**Parameters:**

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

### `option`

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

Add an option

**Parameters:**

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

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Memory" icon="database" href="/docs/rust/memory" />

  <Card title="Rust Sessions" icon="clock" href="/docs/rust/sessions" />

  <Card title="Rust Knowledge" icon="book" href="/docs/rust/knowledge" />
</CardGroup>
