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

# In Memory Adapter • Rust AI Agent SDK

> InMemoryAdapter: In-memory adapter (default)

# InMemoryAdapter

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

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

In-memory adapter (default)

## Fields

| Name      | Type                  | Description |
| --------- | --------------------- | ----------- |
| `history` | `ConversationHistory` | -           |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(max_messages: usize) -> Self
```

Create a new in-memory adapter

**Parameters:**

| Name           | Type    |
| -------------- | ------- |
| `max_messages` | `usize` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/memory/mod.rs#L101">
  `praisonai/src/memory/mod.rs` at line 101
</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>
