Memory Modes
Flat mode vs rich cognitive memory mode.
Memory Modes
Docket works in two modes. You can switch at any time via config.
Flat mode (default)
Simple memory records with embeddings. Just like any RAG system.
- No sector classification
- No decay
- No temporal queries
- RBAC is off by default
Best for: quick experiments, small deployments, when you don't need cognitive memory.
Rich mode
Full cognitive memory with sectors, decay, temporal graph, and access control.
Sectors
Memories are classified into one of five sectors on ingestion:
| Sector | Description | Example |
|---|---|---|
| Episodic | Events and experiences | "I rode my bike to the lake" |
| Semantic | Facts and knowledge | "Rust uses ownership instead of GC" |
| Procedural | Skills and how-to | "How to bake sourdough bread" |
| Emotional | Feelings and reactions | "I felt anxious before the talk" |
| Reflective | Insights and realizations | "I realized I work best in mornings" |
Classification is performed by the LLM. You can override per-ingest or disable entirely in config.
Decay
Per-sector forgetting curves:
memory:
decay:
functions:
episodic: { type: "exponential", halfLifeDays: 30 }
emotional: { type: "exponential", halfLifeDays: 7 }
semantic: { type: "none" }
- Exponential —
salience * 0.5^(elapsed / halfLife) - Linear —
salience * (1 - elapsed / halfLife) - None — never decays
Memories drop below forgottenThreshold (default 0.05) are excluded from
search but retained in storage.
Temporal graph
Memories can have validity windows:
{
"validFrom": "2026-01-01",
"validTo": "2026-03-01",
"supersedesId": "mem_older_version"
}
Use temporal queries to ask "what was true on X date?"
RBAC
Every memory has an access policy and ownership:
{
"accessPolicy": "owner-only",
"owner": "user:alice",
"readers": ["user:bob", "group:family"],
"writers": ["user:alice"]
}
Built-in policies:
| Policy | Read | Write | Delete |
|---|---|---|---|
owner-only | owner only | owner only | owner only |
public | anyone | owner/writers only | owner only |
| any other value | owner + readers | owner + writers | owner only |
Or reference a named policy defined in config:
memory:
rbac:
policies:
team:
readers: ["user:alice", "user:bob"]
writers: ["user:alice"]
{
"accessPolicy": "team"
}
Switching modes
Edit config/config.yaml:
memory:
mode: "rich"
Then restart Docket. Existing flat memories remain accessible; new ingestions use rich semantics.