Once a Session ends, the Agent's context is gone by default. Memory Stores let an Agent's learnings and outputs persist across Sessions — the next time the Agent runs, it can "remember" earlier work.
Hierarchy: Store → Memory → Version.
A Memory's
Example response:
Fetch the full content (including
Response:
Updates use
Request fields:
If
Reference Memory Stores through
The Agent can read from and write to linked Memory Stores within the Session.
Memories are mounted at
Every create, update, or delete on a Memory produces a snapshot. Versions are immutable and provide a complete change history. List them with
Q: How many Memory Stores can a Session reference? A: Multiple Stores are supported; link as needed.
Q: Can a Memory's
Core Concepts
| Concept | Description |
|---|---|
| Memory Store | A memory repository scoped by project or domain |
| Memory | A single memory, identified by path; each memory has a unique mem_... ID |
| Version | An immutable snapshot generated on every create, update, or delete |
API Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /memory_stores | Create a Memory Store |
| GET | /memory_stores | List Memory Stores |
| GET | /memory_stores/{id} | Get a Memory Store |
| POST | /memory_stores/{id} | Update a Memory Store |
| POST | /memory_stores/{id}/archive | Archive a Memory Store |
| DELETE | /memory_stores/{id} | Delete a Memory Store |
| POST | /memory_stores/{id}/memories | Create a Memory |
| GET | /memory_stores/{id}/memories | List Memories |
| GET | /memory_stores/{id}/memories/{memory_id} | Get a Memory (with content) |
| POST | /memory_stores/{id}/memories/{memory_id} | Update a Memory |
| DELETE | /memory_stores/{id}/memories/{memory_id} | Delete a Memory |
| GET | /memory_stores/{id}/memory_versions | List Memory Versions |
| GET | /memory_stores/{id}/memory_versions/{memory_version_id} | Get a Memory Version (with content) |
| POST | /memory_stores/{id}/memory_versions/{memory_version_id}/redact | Redact a Memory Version |
Path Rules
A Memory's path must be a relative path:
- Valid:
notes/meeting-2026-05-18.md,config.yaml. - Invalid:
/notes/meeting.md(cannot start with/),../secrets(cannot contain..).
End-to-End Flow
1. Create a Memory Store
2. Create a Memory
The list endpoint does not return
content; call the single-memory endpoint to read contents.3. Get a Memory
Fetch the full content (including content) by memory_id:
4. Update a Memory
Updates use POST against the memory_id. A new version snapshot is generated automatically. To guard against concurrent writes, pass the content_sha256 you last read — the API returns 409 Conflict if it no longer matches the server's current content:
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | New content, up to 100 KB |
content_sha256 | string | No | Expected SHA-256 of the current content (optimistic concurrency). Omit to skip the check |
metadata | object | No | Metadata to attach |
content_sha256 is supplied and does not match the server (a concurrent write was detected), the API returns 409 Conflict. Re-GET the memory, then retry.
5. Use in a Session
Reference Memory Stores through resources[] when creating the Session:
Memory paths in the sandbox
Memories are mounted at /data/.qoder/awareness/<memory.path> inside the sandbox. There are no memory_store or memory ID naming levels in the sandbox — all memories are flattened under awareness/. The Agent cannot see the memory_store concept; it only reads files by path.
Version Tracking
Every create, update, or delete on a Memory produces a snapshot. Versions are immutable and provide a complete change history. List them with GET /memory_stores/{id}/memory_versions (optionally filtered by memory_id), and read a single version's content with GET /memory_stores/{id}/memory_versions/{memory_version_id}.
If a version captured sensitive content, redact it to permanently remove the stored content while keeping the version metadata for audit.
Stat Fields
| Field | Description |
|---|---|
entry_count | Total number of Memories in the Store |
total_size | Combined byte size of all Memory content |
FAQ
Q: How many Memory Stores can a Session reference? A: Multiple Stores are supported; link as needed.
Q: Can a Memory's path contain subdirectories? A: Yes — paths like notes/2026/05/daily.md are supported.
Q: Are there capacity limits on a Memory Store? A: Refer to your account quota. Limits are typically generous for normal projects.
Create a separate Memory Store per project to keep memories from getting mixed up.