Practical Guides · knowledge base from X

Your agent has two brains — MEMORY.md (working memory) and the vault (library): how not to mix them up

The agent's memory (tiny files like MEMORY.md and USER.md that ride into the prompt) and the second brain (a vault or wiki the agent searches when needed) are two different systems. Merging them leads to an agent that forgets the rules or drags a novel into every reply. Fix: MEMORY.md as a router of a few lines, the vault for everything else, a promotion rule and a demotion rule, a weekly human review.

✍️ Mike Gannotti · @MichaelGannotti
🔗 Read the original on X · X Article · published 11 Sep 2026
📊 13 likes · 16 bookmarks · 1.8k views
Summary and adaptation in English; content and results belong to the author.

Part of the manual Second Brain — the complete manual (from the PARA method to the wiki the AI writes for you)

Claimed result

No numeric result: it is an architecture guide for agents such as Hermes and OpenClaw (valid for Claude Code, Cursor, Grok Bot and local models). Figures the author cites as "community writeups": in Hermes MEMORY.md ~2,200 characters and USER.md ~1,375, loaded at session start and often "frozen" so as not to break the prompt cache.

Proof: framework. Low engagement (a niche article), but it is the clearest explanation found of a mistake the most popular guides do not cover.

The key idea

MEMORY.md is not a second brain. The word "memory" hides two systems:

Agent memory Vault / second brain
Examples MEMORY.md, USER.md, skills Obsidian vault, LLM wiki, dated daily notes
When it loads always, every session on demand, when a pointer or a search says it matters
Size tiny large, growing
Wrong use dumping a wiki into it expecting the whole vault in every reply

If you merge them, one of two things happens. Case 1: the agent learns something, you paste it into MEMORY.md, the file grows, consolidation or truncation kicks in, early context becomes a lossy summary and the agent is sure of a compressed half-truth. Case 2: you put everything in Obsidian, nothing in the "hot" layer, after compaction standing instructions vanish and the agent forgets the house rules mid-session. "Neither layer is broken. The routing is."

Step-by-step playbook

0. Four layers

  • Hot: MEMORY.md, USER.md, SOUL.md — standing rules, identity, active work, pointers into the vault.
  • Warm: vault pages opened on demand — projects, people, decisions, how-tos, research.
  • Episodic: session database and daily notes — "what happened Tuesday".
  • Procedural: skills — "how we do this job".

1. MEMORY.md as a router (the author's example)

  • Standing rules: ask before any irreversible action; never put secrets in the vault; prefer editing existing pages over creating duplicates.
  • Active work: project A details live in wiki/projects/project-a.md, and so on.
  • How to recall: people and firms in wiki/entities/; decisions in wiki/decisions/; search the vault before answering from memory.
  • "If a fact will matter for 30-plus days, write a vault page, then add a one-line pointer here." — "That last line is the whole system."

2. Scope the vault

Do not point the agent at your entire personal vault on day one. Create a dedicated folder: AgentVault/ index.md · wiki/concepts · wiki/entities · wiki/projects · wiki/decisions · wiki/how-tos · daily · inbox · raw (immutable sources, optional) · log.md. Keep out: journals, passwords, family notes, client secrets.

3. Who owns what

You own the raw sources (immutable). The agent owns the wiki: it writes and updates, you review. You both own index.md and MEMORY.md, which stay short.

4. Wiring the agents

  • Hermes: since v0.14 a community path: hermes memory setup --provider obsidian --path ~/AgentVault, then hermes memory status. Optional: the Obsidian Local REST API plugin on localhost, an Obsidian MCP server so every MCP client shares the same brain.
  • OpenClaw: keep the native files (durable facts in MEMORY.md, running context in memory/YYYY-MM-DD.md; today and yesterday auto-load, older days are searched with memory_search/memory_get); add the vault as a search path and, if you want compiled pages, the memory-wiki plugin.
  • Smoke test: ask it to write a one-page summary of the session into a daily note and a pointer into index.md. Open Obsidian: "If you cannot find and edit that note, the integration is theater."

5. The filing skill (the piece most people skip)

  1. Before answering a recurring question, search the vault.
  2. After a decision, write or update the decision page with date, context, decision, alternatives, links.
  3. After meeting a person or vendor, update the entity page.
  4. Do not duplicate: merge into the existing page.
  5. Promote to MEMORY.md only what should shape every future session: one line plus a path.
  6. Daily note = timeline; wiki page = knowledge. Never invert them.
  7. If two pages disagree, flag it in the log instead of silently overwriting.

6. Close the human loop (once a week)

Skim the daily notes; accept or rewrite new pages; delete duplicates; pull 3 to 10 lines of truly durable truth into MEMORY.md; demote stale hot-memory lines back to the vault. Put the vault under git and treat agent writes like a pull request: "Diffs are the cheapest safety system in this stack." "If you never open the vault, you do not have a second brain. You have an agent writing fanfic about you in a folder."

Failure modes to avoid

Whole-life vault access; vault as prompt; two sources of truth (the same preference in USER.md, the vault and a memory plugin with three different dates); no promotion rule (it becomes a diary); no demotion rule (consolidation eats your history); unreviewed agent writes.

A confirmation from the field

The developer @Aaronontheweb noticed that with a memory MCP server, LLMs often confidently store memories containing demonstrably wrong knowledge; when he asked it to correct them, the LLM — lacking an "update" tool — chained three calls to invent that function on its own (post). You need an explicit edit function and a human review.

Tools and costs

Free: markdown files, Obsidian, git. Agents mentioned: Hermes (Nous Research), OpenClaw, Claude Code, Cursor, local models. Optional plugins: Obsidian Local REST API, Obsidian MCP server, OpenClaw's memory-wiki.

Limitations

  • Hermes/OpenClaw commands and sizes come from community writeups, not verified here, and change between versions.
  • An article with very little engagement: its authority comes from consistency with Karpathy and Anthropic, not from numbers.
← More guides in “Second Brain — knowledge bases that AIs can read too”