# Memory

Conversation history and consented long-term memory.

Source: https://glamorous-boar.cloudvent.net/nodes/memory/

---

{/* Generated by scripts/agenticmind/generate-node-docs.mjs from the AgenticMind node registry. Do not edit by hand. */}

AgenticMind keeps **conversation state** (ordered turns per `conversation_id`) separate from **long-term memories** (facts per `namespace`). Long-term writes need an explicit `consent` value wired in the graph. Everything can be listed and deleted in the Memory tab.

| Node | Category | Summary |
|---|---|---|
| [Conversation History](#conversation-history) | Memory | Loads the recent messages of a conversation (short-term memory) for an Agent's history input. |
| [Recall](#recall) | Memory | Finds long-term memories for a query: keyword matches first, then the most recent ones. |
| [Remember](#remember) | Memory | Stores one fact in long-term memory, only when 'consent' is true. |
| [Save Conversation Turn](#save-conversation-turn) | Memory | Appends the user's message and the reply to the conversation, so the next turn can see them. |
## Conversation History

`agenticmind.agents.conversation_history` · version 1.0.0

Loads the recent messages of a conversation (short-term memory) for an Agent's history input.

**Typical use.** Short-term memory: loads the last N turns of a conversation (by `conversation_id`) within a character budget, for an Agent's `history` input.

| Input | Type | Required | Description |
|---|---|---|---|
| `conversation_id` | String | yes | Which conversation |

| Output | Type | Description |
|---|---|---|
| `messages` | JSON | [&#123;role, content&#125;] oldest first |
| `transcript` | String | The same as plain text |
| `count` | Number |  |

- **Control branches:** `done`
- **Permissions:** `memory`
- **Execution policy:** timeout 30s, max attempts 1, idempotent

| Setting | Type | Default | Description |
|---|---|---|---|
| `max_turns` | integer | `10` | Most recent messages to load. |
| `max_chars` | integer | `8000` | Drop the oldest messages beyond this many characters. |

## Recall

`agenticmind.agents.recall` · version 1.0.0

Finds long-term memories for a query: keyword matches first, then the most recent ones.

**Typical use.** Searches long-term memories: keyword (BM25-style) matches first, then the most recent memories fill the remaining `top_k` slots.

| Input | Type | Required | Description |
|---|---|---|---|
| `query` | String | yes |  |
| `namespace` | String | no | Overrides the config |

| Output | Type | Description |
|---|---|---|
| `memories` | JSON | [&#123;id, content, score, match, created_at&#125;] |
| `text` | String | One memory per line, for a prompt |

- **Control branches:** `done`
- **Permissions:** `memory`
- **Execution policy:** timeout 30s, max attempts 1, idempotent

| Setting | Type | Default | Description |
|---|---|---|---|
| `namespace` | string | `default` | Memory group, e.g. one per end user. Recall only sees memories in the same namespace. |
| `top_k` | integer | `5` | Top K |

## Remember

`agenticmind.agents.remember` · version 1.0.0

Stores one fact in long-term memory, only when 'consent' is true.

**Typical use.** Stores one fact in long-term memory, but only when the `consent` input is true. Group memories per end user with `namespace`.

| Input | Type | Required | Description |
|---|---|---|---|
| `content` | String | yes | The fact to keep |
| `consent` | Boolean | yes | Must be true, e.g. from a user setting |
| `namespace` | String | no | Overrides the config |

| Output | Type | Description |
|---|---|---|
| `stored` | Boolean |  |
| `memory_id` | String | Empty when nothing was stored |

- **Control branches:** `done`
- **Permissions:** `memory`
- **Execution policy:** timeout 30s, max attempts 1, not idempotent

| Setting | Type | Default | Description |
|---|---|---|---|
| `namespace` | string | `default` | Memory group, e.g. one per end user. Recall only sees memories in the same namespace. |
| `retention_days` | integer | `365` | Days to keep (0 = until deleted). |

## Save Conversation Turn

`agenticmind.agents.save_turn` · version 1.0.0

Appends the user's message and the reply to the conversation, so the next turn can see them.

**Typical use.** Appends the user message and the reply to a conversation so the next turn can see them. Conversation turns are stored only where a graph contains this node.

| Input | Type | Required | Description |
|---|---|---|---|
| `conversation_id` | String | yes |  |
| `user` | String | yes | The user's message |
| `assistant` | String | yes | The reply |

| Output | Type | Description |
|---|---|---|
| `saved` | Number | Messages stored |

- **Control branches:** `done`
- **Permissions:** `memory`
- **Execution policy:** timeout 30s, max attempts 1, not idempotent

| Setting | Type | Default | Description |
|---|---|---|---|
| `retention_days` | integer | `30` | Days to keep (0 = until deleted). |
