Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/docs/snippets/api-v5-content-management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ Pass `include` as a comma-separated list to return chunks, memories, or both. Ke

`system.status` is one of `unknown`, `queued`, `extracting`, `chunking`, `embedding`, `indexing`, `done`, or `failed`.

### Retrieve a memory and its history

```bash v5
GET /ns/{namespace}/memories/{id}?include=related,documents&relatedLimit=10
```

Returns one memory in the same shape as list memories. A memory from another namespace returns `404`; a forgotten memory, or one past its `forget_after`, is still returned with `isForgotten: true`.

- `include=related` adds `included.related.parents` (earlier versions), `children` (newer versions), and `siblings` (memories connected by `extends` or `derives`). Each list walks outward from the memory until it holds `relatedLimit` items (default `10`, maximum `100`). Forgotten memories and memories in other namespaces are left out.
- `include=documents` adds `included.document`, the most recently updated source document. With both values, every related memory also carries its own `document`.

### List documents, chunks, or memories

<CodeGroup>
Expand Down
1 change: 1 addition & 0 deletions apps/docs/v5/api-reference/content-management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Inspect the context stored in a namespace and remove information that should no
| Operation | Purpose |
| --- | --- |
| `GET /ns/{namespace}/document/{id}` | Retrieve source content with its chunks or memories |
| `GET /ns/{namespace}/memories/{id}` | Retrieve one memory with its history, connected memories, or source document |
| `POST /ns/{namespace}/list/{type}` | Page through documents, chunks, or memories |
| `DELETE /ns/{namespace}/document` | Remove one or many documents |
| `DELETE /ns/{namespace}/memories` | Forget reviewed memories by exact ID |
Expand Down
Loading