> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecadence.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory

> Read, edit and export what bots remember.

See [Memory](https://docs.usecadence.gg/bots/memory.md) for how bots use these documents.

## memory/list

`POST /rpc/memory/list` returns memory documents.

**botId** `string`

Only this bot's documents.

**scope** `"bot" | "user"`

`bot` for a bot's own notes, `user` for shared notes.

## memory/update

`POST /rpc/memory/update` replaces a document's content.

**documentId** `string` *required*

The document.

**content** `string` *required*

The new content, in Markdown.

**expectedRevision** `number`

The revision you started from. If it changed, the call fails with `CONFLICT`.

## memory/remove

`POST /rpc/memory/remove` deletes a document.

**documentId** `string` *required*

The document.

## memory/exportMarkdown

`POST /rpc/memory/exportMarkdown` returns memory as one Markdown string.

**botId** `string`

Only this bot's memory.

## memory/journal and memory/undoChange

`memory/journal` lists recent automatic changes (facts noticed, notes tidied), newest first. Pass `botId` and a `limit` up to 100. `memory/undoChange` takes an `entryId` from the journal and reverses it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.