Skip to main content
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.

Core Concepts

Hierarchy: Store → Memory → Version.

API Endpoints

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 ..).
Paths organize memories like a filesystem.

End-to-End Flow

1. Create a Memory Store

Example response:

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:
Response:

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:
Request fields: If 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:
The Agent can read from and write to linked Memory Stores within 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

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.