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

> MemoryMessage: A message stored in memory.

# MemoryMessage

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

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

A message stored in memory.

## Fields

| Name        | Type                | Description     |
| ----------- | ------------------- | --------------- |
| `role`      | `String`            | Message role    |
| `content`   | `String`            | Message content |
| `timestamp` | `u64`               | Timestamp       |
| `metadata`  | `HashMap&lt;String` | Metadata        |

## Methods

### `new`

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

Create a new memory message

**Parameters:**

| Name      | Type                      |
| --------- | ------------------------- |
| `role`    | `impl Into&lt;String&gt;` |
| `content` | `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/protocols/mod.rs#L115">
  `praisonai/src/protocols/mod.rs` at line 115
</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>
