Karpathy's LLM wiki: what it is and how we run one with four agents
Updated 15 min read
An LLM wiki is a set of linked markdown pages that an AI agent writes and keeps
up to date from the sources you give it, while you pick the sources and ask the
questions. Andrej Karpathy described the pattern on 4 April 2026 in a gist,
llm-wiki.md, two days after a post on X about using LLMs to build knowledge
bases for his research topics.
We have run one since 6 September 2026. Four of our agents write to it, and on 23 October it held 115 pages with 606 links between them. This guide covers what the gist asks for, how to start, and what we changed once more than one agent was writing.
What is Karpathy’s LLM wiki?
Karpathy calls the gist an “idea file”: you paste it into your own agent (he names Codex, Claude Code and OpenCode) and work out the specifics together. It has three layers:
- Raw sources: articles, papers, images and data files. The LLM reads them and never changes them.
- The wiki: markdown pages the LLM writes, such as summaries, entity pages, concept pages and comparisons. You read it and the LLM writes it.
- The schema: a file such as
CLAUDE.mdorAGENTS.mdthat tells the LLM how the wiki is laid out and what steps to follow. You and the LLM revise it over time. Our guides to CLAUDE.md and AGENTS.md cover what goes in each.
The work happens in three operations. Ingest reads a new source, writes a summary page and updates the pages it affects; one source might touch 10 to 15 pages. Query answers from the wiki with citations, and a good answer is filed back as a new page. Lint, run now and then, looks for contradictions, stale claims, orphan pages and missing cross-references.
Two files help the LLM find its way. index.md lists every page with a
one-line summary and is read first; Karpathy says this works at about 100
sources and hundreds of pages without embedding-based search. log.md is an
append-only record of ingests, queries and lint passes.
The case against RAG is that retrieval makes the model rediscover the same knowledge on every question, while a wiki is “compiled once and then kept current, not re-derived on every query.” People abandon wikis because “the maintenance burden grows faster than the value,” and an LLM will update 15 files in one pass without getting bored of it. RAG vs LLM wiki below compares the two on cost and accuracy.
Karpathy keeps the agent open on one side and Obsidian on the other, and browses the pages and the graph view as the agent edits. In his words: “Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase.” For that setup, see an LLM wiki in Obsidian and Claude Code in an Obsidian vault. To see the graph of an LLM wiki someone has published on GitHub, paste the repository into the wiki graph viewer.
How to set up an LLM wiki
The gist is deliberately abstract. A layout that follows it:
my-wiki/
AGENTS.md # the schema (CLAUDE.md if you use Claude Code)
raw/ # sources; the agent never edits these
assets/ # images downloaded from clipped articles
wiki/
index.md # every page, one line each
log.md # append-only history
sources/
entities/
concepts/
A short schema to start from:
# Wiki schema
## Layout
- raw/ holds sources. Read them. Never edit them.
- wiki/ holds the pages you write, one topic per page.
- Link pages with [[page-name]].
## Ingest
1. Read the new file in raw/ and tell me the key points.
2. Write a summary page in wiki/sources/.
3. Update the entity and concept pages it affects. Note any claim it contradicts.
4. Add new pages to wiki/index.md with a one-line summary.
5. Append to wiki/log.md: ## [YYYY-MM-DD] ingest | Source title
## Query
Read wiki/index.md first, then the pages it points to. Cite the pages you used.
If an answer is worth keeping, file it as a new page.
## Lint
List contradictions, stale claims, orphan pages, and concepts
mentioned without a page of their own.
Paste the gist into your agent and ask it to set up the wiki in this folder
with you. Then drop one source into raw/ and say “Ingest raw/that-file.md and
follow AGENTS.md.” Karpathy prefers to ingest one source at a time, read the
summary, and steer what the agent emphasizes. When you catch yourself repeating
an instruction, add it to the schema so the next session follows it too.
LLM wiki repos on GitHub
Karpathy’s LLM wiki is a gist at gist.github.com/karpathy/442a6bf555914893e9891c11519de94f, with no code to install. Every repository built on it is a community project, somebody’s answer to which app holds the pages, which agent writes them and how the schema is packaged. These are 12 of them, with stars and licenses from the GitHub API on 1 October 2026:
| Repository | What it is | Stars | License | Pick it for |
|---|---|---|---|---|
| nashsu/llm_wiki | Desktop app | 20,132 | GPL-3.0 | One app, no terminal |
| AgriciDaniel/claude-obsidian | Claude Code skills for an Obsidian vault | 15,325 | MIT | Obsidian, written by Claude Code |
| inkeep/open-knowledge | Markdown editor app | 4,360 | GPL-3.0 | Editing pages by hand next to an agent |
| SamurAIGPT/llm-wiki-agent | Agent skill | 3,593 | MIT | The gist’s layout, closely followed |
| Astro-Han/karpathy-llm-wiki | Agent Skills skill | 2,395 | MIT | The smallest setup |
| atomicstrata/llm-wiki-compiler | CLI compiler | 2,156 | MIT | A repeatable build from batches of sources |
| lucasastorian/llmwiki | Web app with MCP | 1,658 | Apache-2.0 | Clipping pages from Chrome |
| nvk/llm-wiki | Plugin for Claude Code, Codex, OpenCode | 1,362 | MIT | Deep research runs |
| kytmanov/obsidian-llm-wiki-local | Local pipeline with Ollama | 828 | MIT | Fully local models |
| GD4AI/obsidian-llm-wiki | Obsidian plugin | 677 | Apache-2.0 | Obsidian, no terminal |
| praneybehl/llm-wiki-plugin | Claude Code plugin and skill | 116 | MIT | One skill across many agents |
| microsoft/llmwiki | VS Code extension | 67 | MIT | VS Code with Copilot |
Ten of the 12 were pushed to in September or later, so check the README before you rely on any detail. If you are unsure, the gist plus one skill is the cheapest start, and because everything is plain markdown you can move to any of the others later.
In September 2026 we also looked at 46 public LLM wikis on GitHub, counting
repositories with a folder of at least 20 markdown pages and at least 30
[[wikilinks]] between them. Together they held 7,195 pages, and the median
wiki had 76. 13 of the 46 were templates or sat in example folders, so a recent
log.md with many entries is a better sign of real use than a high star count.
In 28 of the 46 the wiki sat at the repository root next to the project’s own
README and docs; a wiki/ folder keeps the two apart. Any of them opens as a
graph in the wiki graph viewer.
RAG vs an LLM wiki
RAG (retrieval-augmented generation) splits your documents into chunks, indexes them, and at question time pulls the best-matching chunks into the model’s context. Nothing is written back, so the model redoes the synthesis on every question. The gist puts NotebookLM, ChatGPT file uploads and most RAG systems in this group. An LLM wiki does the synthesis when a source arrives: the agent edits the pages the source affects, and a later question reads conclusions that already exist.
| RAG | LLM wiki | |
|---|---|---|
| When the model does the synthesis | On every question | When a source arrives, and on lint passes |
| What is stored | Chunks of raw documents, plus an index | Pages the model wrote, plus the raw sources |
| What a person can read | The sources | The sources and the pages |
| Where a mistake lives | In one answer | In a page, until someone fixes it |
Freshness cuts both ways. RAG is current as soon as a document is indexed, but it cannot tell that one claim replaced another: a March decision and the June change that reversed it sit in the index with equal standing, and the model has to sort them out on every answer. A wiki is only as current as its last ingest, though it settles a contradiction once, and the page says what changed and when.
What the one public head-to-head measured
The only comparison with published numbers we have found is a practitioner’s
evaluation on the osisdie blog, written in Chinese. It ran hybrid RAG (BM25 plus
dense vectors, merged with reciprocal rank fusion) against a wiki pipeline that
reads index.md, picks pages and answers from them. The data was one internal
knowledge base: a 60-page wiki on one side, a vector store of 1,402 points on
the other. 13 questions, a single-tenant subset of 43, were graded by hand.
| Measure (their run) | Hybrid RAG | LLM wiki |
|---|---|---|
| Correct answers | 13 of 13 | 12 of 13 |
| Tokens per question, average | 1,407 | 13,055 |
| Latency, median | 3.3 s | 8.2 s |
| Latency, 95th percentile | 24.3 s | 27.3 s |
| LLM calls per question | 2 | 4 |
| Building the wiki | None | About 194,000 tokens, once |
The questions were mostly direct FAQ lookups, where RAG is strong, and none needed several documents put together, which is the case a wiki is built for. The wiki’s one miss started at write time. Pages were grouped by entity name, so two tenants’ policies were merged into one page, and the wiki answered one tenant’s question with the other tenant’s policy. The author also found noise a small model had written into a page, which every later answer repeated, and short paraphrased questions that got one-line answers without the exceptions. The wiki reported higher average confidence than RAG (0.862 against 0.808) while scoring lower. Their conclusion was to keep hybrid RAG as the default and offer the wiki as an opt-in mode per request.
If your data has partitions that must never mix, such as customers or tenants, put the partition in the page path or the frontmatter, or keep separate wikis.
When to use each, and how to combine them
RAG suits a large collection, or one that changes faster than anyone would re-ingest it, and lookups whose answer sits in one place, such as FAQs, policies and docs. It is also the better choice when answers must trace back to the original wording. A wiki suits knowledge that builds up over weeks, questions that span several sources and keep coming back, and any case where people need to read and correct what the agent believes.
Setups that last tend to use both. The gist says the index file works at
moderate scale and that a growing wiki needs proper search, and it names qmd, a
local search engine for markdown with hybrid BM25 and vector search. Another
pattern is to answer from the pages first and fall back to RAG over raw/
when they do not cover the question, then file that answer as a new page.
LLM wiki vs Mem0 and other fact memory
Mem0 is the best-known fact store. Its docs describe two calls. After an
exchange, your app sends the messages to add, and an LLM extracts
“preferences, decisions, plans, and other details” and stores them per user.
Before the next model request, your app calls search and puts the best
results in the prompt. By default Mem0 keeps the extracted memories and not the
transcript, so “Let’s use Postgres for this project” is stored as “Project
decision: use Postgres”. Extraction only ever adds: if a user says they moved
from Austin to Seattle, Mem0 “can store the new fact without silently rewriting
the old one”, and your app calls update or delete to correct a memory.
| Fact memory (Mem0 style) | Wiki memory | |
|---|---|---|
| Unit | A short fact with an embedding | A markdown page linked to other pages |
| Who decides what is kept | An extraction model, on every add |
The agent, when it learns something worth keeping |
| How it changes | New facts are added; corrections are explicit calls | Pages are edited in place |
| Holds well | Preferences and small facts about many separate users | How systems work, decisions and the reasons for them |
| Struggles with | Reasons and relationships spread across fragments | Personal details for thousands of users |
Take a planning chat that says annual plans are moving from Stripe Checkout to Stripe Billing because renewal invoices kept failing, and that Dana owns the move. A fact store keeps several separate memories. A later search for why the team left Checkout finds the failed invoices only if the wording is close, and nothing ties that memory to the decision unless the extraction kept the link. A wiki agent updates one page on the billing migration that holds the decision, the cause and the owner together.
No one has published a head-to-head of a wiki against a fact store that we know of. The nearest numbers come from interested parties. Mem0’s own paper (arXiv 2504.19413) reports a 26% relative improvement over OpenAI’s memory on the LoCoMo benchmark, judged by an LLM, and 91% lower 95th-percentile latency than putting the whole conversation in context. Letta, a Mem0 competitor, stored the LoCoMo conversations as files, gave a gpt-4o-mini agent grep and semantic search, and reported 74.0% against the 68.5% Mem0 reported for its best graph variant. Letta’s reading is that how the agent manages its context matters more than the retrieval mechanism. A study of AGENTS.md files (arXiv 2602.11988) adds a caution for wikis too: context files did not generally raise coding agents’ task success and raised inference cost by over 20% on average. Specific instructions in them were followed, and repository overviews did not help.
The two rarely compete for the same job. Keep what you know about each customer of your app in a fact store your product calls, and keep what your team and its agents know in a wiki. A rough rule: if it is about one user and fits on one line, it is a fact, and if someone will ask why, or how something works, it belongs on a page. Mem0 alternatives compares the fact stores and memory servers.
What changed when four agents shared one
Our wiki started on 6 September 2026 from a Hermes wiki scaffold that follows
the gist, with an index.md and a log.md. Four Hermes agents write to
it: one builds Dexio, one does its marketing, one runs a second company, and one
keeps personal finance notes. Since 25 September it has been a hosted wiki, and
the agents reach it over MCP with no local copy. On 23 October it had 115 pages in
13 folders, 606 links and about 206,700 words.
We retired the index and the log on 27 September. Each page’s index line moved
into a description: field in its own frontmatter, and the tool that lists
pages returns it, so the listing is the catalog and cannot fall out of step
with the pages. The log became the note that every change carries: each page’s
history keeps who changed it, when and why, and the history of the whole wiki
is its recent-changes feed. The two files had made sense for plain markdown
read with file tools, which had no search, page listing or history. They were
also the files every ingest rewrites, so they are where two agents writing at
once would collide.
The schema is a page in the wiki too, about 1,070 words. Before substantial work an agent reads it, lists the pages, reads the recent changes, and searches before creating anything new.
Answers do get filed back. 24 of the 115 pages sit in a queries/ folder, each
the answer to a question someone asked, for example which graph layouts suit an
agent wiki whose links pile up on a few hub pages.
Logs live on topic pages instead of one global file. The page for our search content, where the marketing agent adds a line for each day’s work, has grown to about 9,600 words.
Lint is a single call that reports orphan pages, pages that may be stale, and pages that are named elsewhere without a link. On 23 October it found one orphan and no stale pages. We do not treat orphans as a problem, because our agents find pages by search.
Hub pages keep growing. The page about Dexio itself has 93 links and about 47,400 words. Our schema says to split pages past about 200 lines, and that one has not been split yet.
Where a local LLM wiki breaks down
The reference setup is one person, one agent and one folder. The gist does list a team use, an internal wiki fed by Slack threads, meeting transcripts and customer calls, and says a git repo gives you history and collaboration. Once more than one agent or machine writes to the wiki, three problems show up.
Two writers edit the same files. Every ingest rewrites index.md, log.md
and up to 10 to 15 other pages, so two ingests at once, from two agents or two
laptops, touch the same files. A synced folder can drop one of the saves or
leave a conflicted copy, and git gives you merge conflicts in prose.
Pages go stale between lint passes. A page can keep a claim that a newer source replaced, and every agent that reads it repeats the old claim.
Nobody knows which agent wrote what. A folder without git keeps no history. With git, commits carry whatever author name the agent was given, which is often just yours.
How to share an LLM wiki between agents
A git repo works if every agent pulls before it works and commits after, under
its own author name. You get history and diffs, along with conflicts in shared
files like index.md, and an agent that cannot run git, such as a chat app in
a browser, cannot take part.
A synced folder is easy for one person on two machines. It has the same overwrite problem with two writers at once and records nothing about who changed what.
A hosted wiki that agents reach over MCP keeps one copy, so there is nothing to sync or merge. The server has to handle concurrent writes and history for you.
The hosted wiki our agents use
Ours runs on Dexio. Agents list, read, search, write, edit, move and link markdown pages over MCP, and Hermes, OpenClaw, Claude Code, Codex, Cursor, Claude and ChatGPT can all write to the same wiki.
- A write can carry the
base_versionthe agent last read, so one agent never overwrites another’s edit. - Pages are plain markdown with
[[wikilinks]], and the web app shows how they connect as a graph. - Every change is kept in
page_historywith the name the agent gives in theagentfield. - Agents can read or edit one section instead of a whole page, which saves tokens.
It is free for one person, agents never count as members, and you can download any wiki as a zip of markdown files whenever you like. Connect your agent in the docs has the setup, and there is a guide for each agent: Hermes, OpenClaw, Claude Code, Codex, Cursor, Grok Bot, Muse and the rest in Guides. To choose between the first two, see Hermes Agent vs OpenClaw.
Start with one folder
A folder, a schema file and one source are all the gist asks for, so start there. When a second agent or a second machine starts writing, move the wiki to one copy that every writer shares.
Sources
- https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
- https://x.com/karpathy/status/2039805659525644595
- https://x.com/karpathy/status/2040470801506541998
- https://github.com/nashsu/llm_wiki
- https://github.com/inkeep/open-knowledge
- https://github.com/microsoft/llmwiki
- https://github.com/GD4AI/obsidian-llm-wiki
- https://github.com/AgriciDaniel/claude-obsidian
- https://github.com/kytmanov/obsidian-llm-wiki-local
- https://github.com/Astro-Han/karpathy-llm-wiki
- https://github.com/praneybehl/llm-wiki-plugin
- https://github.com/SamurAIGPT/llm-wiki-agent
- https://github.com/nvk/llm-wiki
- https://github.com/atomicstrata/llm-wiki-compiler
- https://github.com/lucasastorian/llmwiki
- https://osisdie.github.io/blog/2026/hybrid-vs-llm-wiki-eval/
- https://docs.mem0.ai/core-concepts/how-it-works
- https://arxiv.org/abs/2504.19413
- https://www.letta.com/blog/benchmarking-ai-agent-memory
- https://arxiv.org/abs/2602.11988