What is the difference between readable project memory and extracted agent memory?
Readable project memory and extracted agent memory solve different jobs. This comparison sits under the map of what a knowledge base for AI agents actually is: what each layer is good at, what it cannot promise, and how they should sit together.
Readable project memory and extracted agent memory solve different jobs. Extracted or automatic memory captures what a session learned and later recalls it, by injection or search; a reviewable Markdown project brain keeps the current decision and its trail in files a human or another agent can open, diff, and correct. Instruction files and a tool's native session memory are still other layers, not substitutes for either.
The shorter definition of those layers is already in What a knowledge base for AI agents actually is. This page is the comparison underneath that map: what each layer is good at, what it cannot promise, and how they should sit together. It is not a product bake-off, and it does not invent retrieval or ranking metrics.
Four layers, four jobs
People often flatten “memory for coding agents” into a single feature. In practice you are usually looking at one of these:
| Layer | What it is for | Who writes it | How the next session sees it | What a teammate can review |
|---|---|---|---|---|
| Instruction files | Standing rules and workflows for the repo | You, or a generated starter you edit | Loaded at the start of a session, often in full, with a size budget | The committed file, in git |
| Native session or auto memory | Learnings and preferences one tool accumulated | The tool, from your session | Injected or recalled inside that product, on that machine or account | Only if the product stores it in a file you can open, and only in that product's store |
| Extracted or semantic recall | Finding relevant remembered passages later | An extractor or memory service, from session evidence | Search or ranked injection, usually a handful of hits, not the whole corpus | Whatever dashboard or export that service provides; often not a repo diff |
| Reviewable Markdown project brain | The current decision, constraint, or background, plus how it got there | The project, through a compile-and-review loop | Read before a new task, as ordinary files or through a connector | The Markdown itself: open it, diff it, correct it |
If you pick the wrong layer, the failure is predictable. An instruction file becomes a diary. A private auto-memory store gets mistaken for the team record. A search hit gets treated as the current decision. A project brain gets asked to reconstruct an uncommitted patch.
Instruction files
This layer tells the agent how to work in the repository: commands, conventions, routing, “always do X.”
Claude Code documents CLAUDE.md, AGENTS.md, and .claude/rules/ as instructions you write. Codex documents AGENTS.md the same way, and stops adding project instruction files at a combined size cap (32 KiB by default). Both products treat this layer as guidance that should stay small.
Use it when the fact must be present at the start of every session. Do not use it as the archive of every decision, measurement, or pull-request narrative. That failure is already described in AGENTS.md is not a decision log and AGENTS.md is not a changelog. The brief can point at a longer record. It should not become that record.
Instruction files are reviewable, but they are a poor review surface for changing truth. A rewritten bullet can hide a reversal. Two tools with two briefs become copies that already disagree.
Native session and auto memory
This layer is what a coding agent writes for itself, inside its own product.
Claude Code's auto memory is the clearest official example. Claude can save notes about your role, your corrections, project facts it cannot derive from the code or git history, and pointers to external systems. Those files live under ~/.claude/projects/<project>/memory/. At session start it loads the first 200 lines or 25KB of MEMORY.md. The docs call this machine-local: it is not shared across machines or cloud environments. A teammate, or you on another laptop, will not see it automatically. The operational map is in What does Claude Code remember, and what can the next teammate still not see?.
Codex has a parallel, separate store. OpenAI's Memories docs say ChatGPT web uses ChatGPT memory, while local Codex clients use files under ~/.codex in memories_v2/ or memories/. Local Codex memories are off by default. The same page tells you to keep required team guidance in AGENTS.md or checked-in documentation, and to treat memories as a helpful recall layer, not as the only source for rules that must always apply.
Native memory is the right layer for low-ceremony personal context: a correction you should not have to repeat in this tool, a preference that does not belong in the repo, a reminder of work in progress on this machine. It is the wrong layer to treat as the only copy of a decision the whole team must be able to audit. Official docs already put that boundary in writing. A memory only one agent can see is not project memory yet.
These stores are sometimes inspectable (Claude Code's auto memory is plain Markdown you can open with /memory), but inspectable in one home directory is not the same as reviewable in a pull request.
Extracted and semantic recall
This layer captures evidence from sessions, extracts memories, and later retrieves the ones that look relevant.
Mem0's Claude Code integration is a documented example, and it is useful as a design sketch rather than as a verdict. Capture happens in the background as you work. Extraction runs through Mem0. On the next session's first prompt, the plugin can search and inject a small number of relevant memories (the docs describe an automatic first-prompt recall of up to five, and tighter caps on later explicit searches). Mem0 describes two buckets: shared project memory for a repository, and personal preferences scoped to you. Mem0 MCP exposes a similar idea to other clients: hosted memory tools for adding, searching, updating, and deleting memories. Memories stored that way live in a Mem0 account, not as Markdown in your repo.
Other MCP memory servers follow the same broad shape even when their APIs differ: the agent or a hook writes, a service indexes, later sessions search. This page does not benchmark those servers, and it does not invent a shortlist.
What this layer is good at:
- Accumulating lots of session detail without asking you to curate a document after every chat
- Recalling a relevant snippet when the next prompt looks similar
- Separating, in some products, personal preferences from project facts
What it does not, by itself, guarantee:
- That the retrieved passage is the current decision, rather than an earlier one that was later reversed
- That a teammate can open one file, see the conclusion and the trail, and correct it in a reviewable diff
- That every agent you use will see the same record, unless you have connected each of them to the same service and trusted that service as the source of truth
- That the memory is portable if you leave the service. Some products offer exports; the working interface is still retrieval, not a repo of current answers
Extracted memory is a recall system. A project brain is a source-of-truth system. You can put a recall system on top of a source of truth. You should not confuse the top hit with the current answer.
A reviewable Markdown project brain
This layer keeps the current understanding in files a human or another agent can read.
The shape is described in The Project Brain: root documents for the whole project, and pages for individual decisions or concepts. A page has a current compiled_truth and an append-only timeline. One layer answers “what do we currently believe?” The other answers “how did we get here?” When the truth changes, you rewrite the current answer and leave a trace, rather than silently editing history.
brain.md is the open, local convention for that shape: a BRAIN.md entry point and a brain/ directory of Markdown. MindMux is one product implementation of the same idea. A local Brain stays with the project as ordinary files; a Cloud Brain is the same knowledge model, kept in a Cloud Project you can share or connect from a coding agent. Agents read it before a new task. That is cross-session, cross-tool decision memory, not a live handoff of in-progress tool state.
Why Markdown matters here is not aesthetic. The brain is supposed to remain portable, inspectable, versionable, and editable outside the app. If only the product can read the store, you are back in an extracted or native-memory design, even if the marketing says “project memory.”
Use a project brain for background, decisions, and constraints the next session should not have to rediscover. Do not use it as a dumping ground for every transient idea, as a replacement for git, or as a place to park a half-finished diff.
The test is still a fresh session, in a second tool or on a second machine: if it can't see the decision, it isn't project context yet.
How the layers should work together
These layers stack. They do not replace each other.
- Keep the instruction file short. Point it at the brain, or at the checked-in record, for decisions and rationale.
- Let native auto memory hold personal corrections and machine-local context for that tool. Promote anything the next teammate or the next tool will need into the shared record.
- If you use extracted recall, treat hits as clues. When a recalled snippet changes standing project truth, write the conclusion into the brain (or the one home you already use), rather than leaving the only copy in the memory service.
- When the truth changes, update the current answer in that one home. A retrieved memory and a stale “current state” line have the same failure mode: the next agent follows yesterday's picture.
MindMux's place in this stack is the reviewable-brain layer. The CLI is @mindmux/cli (mmx, mmx setup); the open convention is @mindmux/brain-md. Setup details are in the Cloud Brain MCP guide. This page does not turn into a tutorial, and it does not claim that a project brain makes native or extracted memory unnecessary.
Choosing a layer without turning it into a bake-off
Ask what job you are hiring the memory for.
- If the agent should follow the same rules in every session, start with an instruction file.
- If you want one tool to stop repeating your personal corrections, native auto memory is the low-ceremony fit.
- If you want to search a large history of what sessions learned, extracted or semantic recall is the fit.
- If you want the next session, the next tool, and the next teammate to read the same current decision and the reason it exists, you want a reviewable project brain.
Many teams need more than one. The mistake is not using Mem0, or Claude Code auto memory, or AGENTS.md. The mistake is asking any one of them to be all four layers at once.
FAQ
Is Claude Code auto memory the same thing as extracted memory?
No. Auto memory is a native, machine-local store Claude maintains as Markdown under ~/.claude/projects/. Extracted memory, as in a service like Mem0, typically captures session evidence, extracts memories in a backend, and later retrieves a ranked subset. Both are automatic. Only one is a reviewable file in your home directory, and neither is automatically a team-wide project record.
Can I review extracted memories in a pull request?
Only if the product writes them into files you actually commit, or you export them into the repo yourself. Hosted memory APIs and dashboards are a different review surface from a Markdown diff. A project brain is designed for the latter.
Does a project brain replace semantic search?
No. Search finds candidate passages. A brain states the current answer. If your corpus is large, you may still want lookup. Just do not treat the top hit as the decision log.