Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

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

ConceptDescription
Memory StoreA memory repository scoped by project or domain
EntryA single memory, identified by path; each entry has a unique entry_id
VersionAn immutable snapshot generated on every write, update, or delete
RedactIrreversibly mask the contents of a version (for compliance)
Hierarchy: Store → Entry → Version.

API Endpoints

MethodPathDescription
POST/memory_storesCreate a Memory Store
GET/memory_storesList Memory Stores
GET/memory_stores/{id}Get a Memory Store
DELETE/memory_stores/{id}Delete a Memory Store
POST/memory_stores/{id}/memoriesCreate an Entry
GET/memory_stores/{id}/memoriesList Entries
GET/memory_stores/{id}/memories/{entry_id}Get an Entry (with content)
PUT/memory_stores/{id}/memories/{entry_id}Update an Entry (OCC)
DELETE/memory_stores/{id}/memories/{entry_id}Delete an Entry
POST/memory_stores/{id}/versions/{version_id}/redactRedact a version

Path Rules

An Entry’s path must be a relative path:
  • Valid: notes/meeting-2026-05-18.md, config.yaml.
  • Invalid: /notes/meeting.md (cannot start with /).
Paths organize memories like a filesystem.

End-to-End Flow

1. Create a Memory Store

curl -X POST https://api.qoder.com/api/v1/cloud/memory_stores \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "project-alpha-memory",
    "description": "Agent knowledge base for project Alpha"
  }'
Example response:
{
  "id": "memstore_019e5cdb9c3f71c3b6505eba937a40b4",
  "name": "project-alpha-memory",
  "description": "Agent knowledge base for project Alpha",
  "entry_count": 0,
  "total_size": 0,
  "created_at": "2026-05-18T08:00:00Z",
  "updated_at": "2026-05-18T08:00:00Z"
}

2. Create an Entry

curl -X POST https://api.qoder.com/api/v1/cloud/memory_stores/memstore_019e5cdb9c3f71c3b6505eba937a40b4/memories \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "path": "decisions/arch-choice.md",
    "content": "# Architecture Decision\n\nChose microservices because the team is scaling and needs independent deployments."
  }'
The list endpoint does not return content; call the single-entry endpoint to read contents.

3. Get an Entry

Fetch the full content (including content) by entry_id:
curl https://api.qoder.com/api/v1/cloud/memory_stores/memstore_019e5cdb9c3f71c3b6505eba937a40b4/memories/mem_entry_xyz \
  -H "Authorization: Bearer $QODER_PAT"
Response:
{
  "id": "mem_entry_xyz",
  "path": "decisions/arch-choice.md",
  "content": "# Architecture Decision\n\n...",
  "version": 2,
  "created_at": "2026-05-18T08:00:00Z",
  "updated_at": "2026-05-18T09:30:00Z"
}

4. Update an Entry

Updates use PUT against the entry_id and must include the current version for optimistic concurrency control. A new version snapshot is generated automatically:
curl -X PUT https://api.qoder.com/api/v1/cloud/memory_stores/memstore_019e5cdb9c3f71c3b6505eba937a40b4/memories/mem_entry_xyz \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "# Architecture Decision v2\n\nMoved to a Modular Monolith because microservice operational costs exceeded the budget.",
    "version": 1
  }'
Request fields:
FieldTypeRequiredDescription
contentstringYesNew content
versionintegerYesCurrent Entry version (for conflict detection)
If the supplied version doesn’t match the server (concurrent write detected), the API returns 409 Conflict. Re-GET the latest version, then retry.

5. Delete an Entry

Delete by entry_id:
curl -X DELETE https://api.qoder.com/api/v1/cloud/memory_stores/memstore_019e5cdb9c3f71c3b6505eba937a40b4/memories/mem_entry_xyz \
  -H "Authorization: Bearer $QODER_PAT"
Deletion uses the entry_id (e.g. mem_entry_xyz); deleting by the path query parameter is not supported.

6. Use in a Session

Reference Memory Stores via memory_store_ids when creating the Session:
curl -X POST https://api.qoder.com/api/v1/cloud/sessions \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": "agent_xxx",
    "memory_store_ids": ["memstore_019e5cdb9c3f71c3b6505eba937a40b4"]
  }'
The Agent can read from and write to linked Memory Stores within the Session.

Memory Entry paths in sandbox

Memory entries are mounted at /data/.qoder/awareness/<entry.path> inside the sandbox. There are no memory_store or entry_id naming levels in the sandbox — all entries are flattened under awareness/. The Agent cannot see the memory_store concept; it only reads files by entry.path.

Version Tracking

Every create, update, or delete on an Entry produces a snapshot. Versions are immutable and provide a complete change history.

Redact

When a version contains sensitive content that must be wiped permanently:
curl -X POST https://api.qoder.com/api/v1/cloud/memory_stores/memstore_019e5cdb9c3f71c3b6505eba937a40b4/versions/ver_xyz789/redact \
  -H "Authorization: Bearer $QODER_PAT"
Caution: Redaction is irreversible — once redacted, the content cannot be recovered.

Stat Fields

FieldDescription
entry_countTotal number of Entries in the Store
total_sizeCombined byte size of all Entry contents

FAQ

Q: How many Memory Stores can a Session reference? A: Multiple Stores are supported; link as needed. Q: Can an Entry’s path contain subdirectories? A: Yes — paths like notes/2026/05/daily.md are supported. Q: Are versions kept after I delete an Entry? A: Deletion creates a “delete” version record; earlier versions remain traceable. 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.