Memory
q15’s memory is not a single blob of context. It is structured into layers, each with a different purpose, persistence model, and injection strategy.
The layers
Section titled “The layers”| Layer | Path | Purpose | Auto-injected? |
|---|---|---|---|
| Core | /memory/core/ |
Agent identity, personality, self-model | Yes, every turn |
| Working | /memory/working/WORKING_MEMORY.md |
Bounded active state — priorities, tasks, recent progress | Yes, every turn |
| Semantic | /memory/semantic/ |
Durable extracted knowledge — facts, preferences, projects | No (tool-fetched) |
| History | /memory/history/ |
Episodic transcript — completed turns as JSON files | No (replayed) |
| Cognition | /memory/cognition/ |
System-owned control, indexing, background maintenance | No (system-owned) |
Core memory
Section titled “Core memory”Files under /memory/core/ define who the agent is. Typical files:
AGENT.md— role and behavioral protocolUSER.md— user identity, preferences, communication normsSOUL.md— voice, teaching style, working principles
These are always in the prompt. They are the agent’s durable identity.
Working memory
Section titled “Working memory”/memory/working/WORKING_MEMORY.md is the canonical prompt-visible working-memory artifact. It holds bounded active state: current priorities, active tasks, open threads, recent progress, pending checks, and temporary context.
Other files under /memory/working/ are not implicitly prompt-visible. Only WORKING_MEMORY.md is auto-injected.
Semantic memory
Section titled “Semantic memory”Canonical semantic files:
facts.md— confirmed facts and grounded inferencespreferences.md— user preferences and collaboration preferencesprojects.md— active projects and durable project knowledge
Semantic memory is not auto-injected. The agent fetches it on demand when relevant.
History
Section titled “History”Completed turns are stored as JSON files under /memory/history/turns/YYYY/MM/DD/. Transcript sequence metadata lives at /memory/history/state/head.json.
The current format is schema_version: 2 with canonical ordered messages[].parts[] entries of type text, reasoning, tool_call, and tool_result.
On startup, existing history is eagerly upgraded in place. Unreadable turn files are moved to /memory/history/quarantine/.
Notebook layer
Section titled “Notebook layer”/memory/notes/ contains the auxiliary zettelkasten notebook:
notes/inbox/— incoming notesnotes/zettel/— atomic knowledge notesnotes/maps/— structure maps and indexes
These are not prompt-visible. They are durable knowledge infrastructure that the agent can search and reference.