All posts

AI · · 11 min read

LLM Wiki for Coding Agents: How I Gave Five AI Agents One Shared Memory

Five agents, two machines, one memory they all read and write.

An LLM wiki for coding agents is a folder of markdown pages that your AI agents read before they ask you anything, and add to when they learn something new. I have run one for seven weeks. It now has 1,206 pages, and five different agents on two machines use it every day.

If you use more than one AI coding tool, you have probably explained the same project to each of them, more than once. Each tool keeps its own memory, and none of them share it. I had the same problem, and it got worse with every new tool I tried.

In this guide, I will explain what an LLM wiki is and how my agents read from it and write back to it. I will also show the nightly job that keeps it up to date, how I stop it from going stale and how I test that search finds the right page. At the end, I will share what is still missing.

What Is an LLM Wiki?

An LLM wiki is an idea Andrej Karpathy shared in 2026. Instead of searching through raw notes every time you ask a question, an AI agent builds and looks after a wiki of short, linked pages. You then ask the wiki, and the agent keeps it tidy.

My version has three layers:

  • Raw sources: Agent sessions, WhatsApp chats with clients, code repositories, meeting summaries and notes from agents. These files are never edited.
  • The wiki: Pages for projects, people, tools, ideas and decisions. The agent writes them, and every claim points back to the source it came from.
  • The schema: One instruction file, CLAUDE.md, that tells the agent how to file, link, check and log everything. I write this part.
Three boxes: raw sources on the left, the wiki the agent writes in the middle, and the schema file with the rules on the right.
Fig. 01 · The three layers. I curate the sources and set the rules, and the agent writes the middle.

The pages are plain markdown files in a git repository. That means I can open them in Obsidian, read them in any editor and see every change in the git history.

Why My Coding Agents Needed One Shared Memory

I use Claude Code most days, plus Codex, OpenCode and OMP for different jobs. I also run Hermes, an agent on my home server that I talk to over Telegram. That is five agents on two machines, and each one used to start every session knowing nothing about my work.

The built-in memory features did not help much. Each tool remembers things in its own format, and none of them can read what another tool learned. A decision I made with Claude Code on Monday was unknown to Codex on Tuesday.

So I gave them all one memory instead. Every agent reads the same wiki, and every agent writes back to it in the same way.

Five agent boxes on the left connect to one wiki box in the middle, with arrows for reading through search or MCP and writing through notes and gaps.
Fig. 02 · Five agents on two machines, one memory.

How Every Agent Reads the Wiki

Each agent loads a short block of instructions at the start of every session. The block is the same for all of them, and a small install script adds it to each tool's own instruction file.

A trimmed instruction block with three rules: search the wiki before asking the owner, record a gap when nothing is found, and write back durable facts with a note command.
Fig. 03 · The block every agent loads. Search first, record what is missing, write back what matters.

The most important rule is the first one: search the wiki before asking me. The search tool ranks pages by keyword match, with extra weight for page titles, summaries and other names a page is known by. Agents then read the top pages and cite them. There are no embeddings; I explain why keyword search was enough in my post on how I built an LLM RAG pipeline.

Terminal output of a search for tauri gotchas. The top results are two of my desktop apps, a session digest and a page about a Tauri memory leak.
Fig. 04 · A real search. Agents find the problems that other agents already hit while building my desktop apps.

Agents can also use an MCP server instead of the command line. It offers the same tools (search, read a page, find related pages, add a note) and works over SSH from my server too.

How Agents Write Back Without Editing the Wiki

Agents never edit the wiki pages directly. When they learn something that will still matter next month, like a decision, a fix that was hard to find or a rule I stated, they write a short note with the date. When they search for something and find nothing, they write a gap.

Both go into an inbox folder and wait for the nightly run. This keeps the wiki consistent, because only one careful process files things, and it still captures what every agent learns during the day.

Four steps from left to right: an agent learns or misses a fact, writes a note or gap, the note waits in the inbox, and the nightly run files it in the wiki.
Fig. 05 · Notes and gaps go to an inbox. Only the nightly run touches the pages.

Gaps turned out to be one of the most useful parts. A gap is a question no page could answer, so it becomes a to-do for the wiki. When the answer exists but search missed it, the nightly run improves the page that should have matched, so the next search finds it.

What Happens Every Night

At 23:30 every night, a script runs five steps:

  1. Collect: It gathers the day's sessions from every agent, synced WhatsApp chats, meeting summaries, notes, gaps and changes to the agents' own memory files.
  2. Redact: It removes secrets, tokens, emails and phone numbers before anything is written.
  3. Digest: It writes one short digest per project per day, so the next step reads summaries instead of raw logs.
  4. Ingest: A maintainer agent files everything into the wiki on its own branch. It updates project pages, people pages and ideas, and it records conflicts.
  5. Check: It rebuilds the index and runs a lint check for broken links, missing pages and wrong fields. If the check fails, the agent fixes it and runs it again.
Five steps in a row: collect, redact, digest, ingest and lint, followed by an automatic merge into main.
Fig. 06 · The nightly run. A branch is kept for review only when the merge conflicts.

The result is merged into the main branch automatically. I only review it when there is a merge conflict. So far, the nightly run has produced 538 daily digests and filed 897 agent notes.

How I Keep the Wiki from Going Stale

A wiki that agents write can rot quickly if nothing checks it. These are the rules that keep mine reliable:

  • Every claim has a source: A fact on a project page links to the source page it came from, so I can always check where it came from.
  • Conflicts are written down: When two sources disagree, the page says so and names the newer one. Nothing is quietly overwritten.
  • Code wins over chat: For the current state of a project, the code is the truth. Chats and agent memory show what people intended, and the page records the difference.
  • Typed fields on every project: Each project page has fields like state, client, people and deadline, so agents can filter projects without guessing from prose.
  • A lint check every night: Broken links, pages missing from the index and invalid fields stop the merge until they are fixed.
A project page header with typed fields such as type, state, org, sources and live URL, followed by a lint run that reports 1,206 pages and no issues.
Fig. 07 · One project page: typed fields at the top, sources for every claim, and the nightly check passing.

How I Know Search Actually Works

For a while, I only felt that search was good enough. Then I wrote down 40 real questions with the page that should answer each one, and kept 8 of them back so I could not tune search for them.

The first test was humbling. The right page came first for only 9 of the first 32 questions. I rewrote the search, adding better ranking, extra weight for titles and summaries, and other names for people and projects. After the rewrite, the right page came first for 37 of 40 questions and appeared in the top three for all 40, including the 8 held back.

Two bar pairs. Right page first went from 9 of 32 before to 37 of 40 after. Right page in the top three went from 15 of 32 to 40 of 40.
Fig. 08 · The search test before and after the rewrite on 21 November 2026.

Now, whenever search misses something, I add that question to the test. The nightly ingest has its own test as well, with 12 checks, including one that makes sure no phone number or email leaks into a page.

What It Looks Like After Seven Weeks

Running since13 October 2026
Pages1,206
Project pages106
Source pages822
Agents using it5, on 2 machines
Commits774
A network of about 1,200 small circles connected by thin lines, with project pages shown as blue dots clustered in the middle.
Fig. 09 · Every page and every link in the wiki. Blue dots are projects. Labels are hidden because many pages are about clients and colleagues.

The biggest change is in how sessions start. Agents can now begin with the client, the stack, the last decision and the known problems, instead of asking me for them. When they do not know something, the gap tells me what to write down.

What Is Not Finished Yet?

I would rather be honest about the limits than make this sound finished:

  • It is built for one person: Client work and personal notes share one pool. There are no permissions, so I could not share it with a team as it is.
  • Search is keyword only: It works well at this size, but it does not use embeddings yet, so it can miss a page that uses very different words.
  • Agent notes are trusted too easily: A note written by an agent could be wrong, or even planted by a web page the agent read. There is no review queue for notes yet.
  • The public template is not published: I have a cleaned copy with made-up data, but it is not on GitHub yet.

What I Would Do Again

  • Start with one instruction file: The schema in CLAUDE.md matters more than any tool. It turns the agent into a careful maintainer.
  • Let agents write notes, not pages: One process filing everything keeps the wiki consistent.
  • Record gaps: Questions with no answer are the best guide to what the wiki needs next.
  • Test search early: A small set of real questions shows problems that you will not notice by feel.

Plain markdown in git was the right starting point. I can read every page, see every change and switch agents without losing anything.

FAQs

What is Karpathy's LLM wiki?

It is an idea Andrej Karpathy shared in 2026: let an AI agent build and maintain a wiki of linked pages from your sources, then ask the wiki instead of searching raw notes. The agent follows rules in a schema file, so the wiki stays organised as it grows.

What is the difference between an LLM wiki and RAG?

RAG searches raw documents again for every question. An LLM wiki does that work once, when a source arrives, and saves the result as pages with links and sources. Questions then read short, organised pages instead of piles of raw text.

Can Claude Code and Codex share the same memory?

Yes. In my setup, both load the same instruction block and use the same search and note commands, or the same MCP server. Anything one agent learns is filed the same night, and the other agent can read it the next morning.

How do you keep private data out of the wiki?

Everything collected goes through a scrubber that removes secrets, tokens, emails and phone numbers first. The wiki rules also forbid copying private messages word for word. The repository is private, and the public template uses made-up data only.

How big can an LLM wiki get before search breaks?

Mine has 1,206 pages, and keyword search still finds the right page in the top three for all 40 test questions. I would add embeddings when the test starts to fail, not before. The test tells me when that point has come.

Next post