{"slug": "karpathy-s-llm-wiki-what-it-is-and-how-to-set-one-up", "title": "Karpathy's LLM wiki: what it is and how to set one up", "summary": "Andrej Karpathy published an \"idea file\" gist, llm-wiki.md, describing a pattern in which an AI agent writes and maintains a linked markdown knowledge base from user-supplied sources, compiling synthesis at ingest time rather than re-deriving it per query as RAG does. The gist specifies a three-layer structure (a CLAUDE.md/AGENTS.md schema, index.md, and an append-only log.md) plus ingest, query and lint operations, and names Codex, Claude Code and OpenCode as agents that can build a wiki from it. Karpathy framed the workflow as \"Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase.", "body_md": "An LLM wiki is a set of linked markdown pages that an AI agent writes and keeps\n\nup to date from the sources you give it. You pick the sources and ask the\n\nquestions; the agent does the summarizing, cross-referencing and filing. Andrej\n\nKarpathy described the pattern in April 2026.\n\nOn 2 April 2026 Karpathy posted \"LLM Knowledge Bases\" on X, about using LLMs to\n\nbuild knowledge bases for his research topics. By late September X counted about\n\n21.9 million views and 108,600 bookmarks on that post. On 4 April he followed up\n\nwith a gist, `llm-wiki.md`, which he calls an \"idea file\": you paste it into your\n\nown agent (he names Codex, Claude Code and OpenCode) and the agent builds the\n\nspecifics with you.\n\nThe gist describes three layers:\n\n`CLAUDE.md` or `AGENTS.md` that tells the LLM\nhow the wiki is structured and which steps to follow. You and the LLM revise\nit over time. Our guides to And three operations:\n\nTwo files help it find its way. `index.md` lists every page with a one-line\n\nsummary, and the LLM reads it first when answering. Karpathy says this works at\n\nabout 100 sources and hundreds of pages without embedding-based search.\n\n`log.md` is an append-only record of ingests, queries and lint passes.\n\nHe keeps the agent open on one side and Obsidian on the other, and browses the\n\npages and the graph view as the agent edits. In his words: \"Obsidian is the IDE;\n\nthe LLM is the programmer; the wiki is the codebase.\" To see the graph of an LLM\n\nwiki someone has published on GitHub, paste the repository into the\n\n[wiki graph viewer](https://dexio.wiki/wiki-graph/).\n\nMost people use LLMs with documents through retrieval (RAG). You upload files,\n\nthe model pulls matching chunks for each question, and it writes an answer. The gist's\n\nobjection is that the model rediscovers the knowledge from scratch every time.\n\nA question that needs five documents means finding and joining the same\n\nfragments again on every ask. Nothing builds up.\n\nIn an LLM wiki the synthesis happens when a source comes in. The knowledge is\n\n\"compiled once and then kept current, not re-derived on every query.\" The\n\ncross-references are already written and the contradictions already noted. And\n\nbecause good answers are filed as pages, your questions add to the wiki as well\n\nas your sources.\n\nFor an agent that keeps working on a subject, this is the difference between\n\nreading last week's conclusion and redoing last week's search. The gist also\n\nexplains why people give up on wikis: \"the maintenance burden grows faster than\n\nthe value.\" An LLM does not get bored of that upkeep and can update 15 files in\n\none pass.\n\nThe gist is deliberately abstract. It says to share it with your agent and\n\nbuild a version that fits your needs together. A layout that follows it:\n\n```\nmy-wiki/\n  AGENTS.md          # the schema (CLAUDE.md if you use Claude Code)\n  raw/               # sources; the agent never edits these\n    assets/          # images downloaded from clipped articles\n  wiki/\n    index.md         # every page, one line each\n    log.md           # append-only history\n    sources/\n    entities/\n    concepts/\n```\n\nA short schema to start from:\n\n```\n# Wiki schema\n\n## Layout\n- raw/ holds sources. Read them. Never edit them.\n- wiki/ holds the pages you write, one topic per page.\n- Link pages with [[page-name]].\n\n## Ingest\n1. Read the new file in raw/ and tell me the key points.\n2. Write a summary page in wiki/sources/.\n3. Update the entity and concept pages it affects. Note any claim it contradicts.\n4. Add new pages to wiki/index.md with a one-line summary.\n5. Append to wiki/log.md: ## [YYYY-MM-DD] ingest | Source title\n\n## Query\nRead wiki/index.md first, then the pages it points to. Cite the pages you used.\nIf an answer is worth keeping, file it as a new page.\n\n## Lint\nList contradictions, stale claims, orphan pages, and concepts\nmentioned without a page of their own.\n```\n\nThen tell the agent what to do. Paste in the gist and ask it to set up the wiki\n\nin this folder with you. After that, drop one source into `raw/` and say\n\n\"Ingest raw/that-file.md and follow AGENTS.md.\" Karpathy prefers to ingest one\n\nsource at a time, read the summary, and steer what the agent emphasizes. When\n\nyou find a rule you keep repeating, add it to the schema so the next session\n\nfollows it too.\n\nThe reference setup is one person, one agent and one folder. The gist does list\n\na team use, an internal wiki fed by Slack threads, meeting transcripts and\n\ncustomer calls, and notes that a git repo gives you history and collaboration.\n\nOnce more than one agent or machine writes to the wiki, four problems show up:\n\n`index.md`,\n`log.md` and up to 10 to 15 other pages. Two ingests at once, from two agents\nor two laptops, touch the same files. A synced folder can drop one of the\nsaves or leave a conflicted copy; git gives you merge conflicts in prose.\nThere are three ways to do it.\n\n**A git repo.** Every agent pulls before it works and commits after, under its\n\nown author name. You get history and diffs. You also get conflicts in shared\n\nfiles like `index.md`, and agents that cannot run git, such as a chat app in a\n\nbrowser, cannot take part.\n\n**A synced folder.** Easy for one person on two machines. It has the same\n\noverwrite problem with two writers at once, and it records nothing about who\n\nchanged what.\n\n**A hosted wiki that agents reach over MCP.** One copy, so nothing to sync or\n\nmerge. The server has to handle concurrent writes, history and link checks for\n\nyou.\n\n[Dexio](https://dexio.wiki) is a hosted wiki for AI agents, and it takes the\n\nthird option. Agents list, read, search, write, edit, move and link markdown\n\npages over MCP. Hermes, OpenClaw, Claude Code, Codex, Cursor, Claude and ChatGPT\n\ncan all write to the same wiki. Against the failure modes above:\n\n`base_version` the agent last read, so one agent never\noverwrites another's edit.`[[wikilinks]]`. Dexio flags links to pages\nthat do not exist when they are written, and the graph at app.dexio.wiki\nshows them.`page_history`, with the agent's name from the\n`agent` field on every change.\nTo connect an agent that runs commands, tell it \"Look at dexio.wiki and log me\n\nin.\" It gives you a sign-in link, you click Allow access, and it adds Dexio to\n\nits own settings. Or add the MCP server yourself: `https://app.dexio.wiki/mcp`\n\nover Streamable HTTP, with the header `Authorization: Bearer` followed by your\n\nAPI key. Your other agents can use the same key; each names itself on every\n\nchange. Dexio is free for one person, and agents never count as members. You can\n\ndownload any wiki as a zip of markdown files whenever you like.\n\nSetup for each agent, step by step: [Hermes](https://dexio.wiki/guides/hermes-agent-memory/),\n\n[OpenClaw](https://dexio.wiki/guides/openclaw-memory/), [Claude Code](https://dexio.wiki/guides/claude-code-memory/),\n\n[Codex](https://dexio.wiki/guides/codex-mcp/), [Cursor](https://dexio.wiki/guides/cursor-mcp/) and the rest in\n\n[Guides](https://dexio.wiki/guides/).\n\nA folder, a schema file and one source are all the gist asks for, so start\n\nthere. When a second agent or a second machine starts writing, move the wiki to\n\none copy that every writer shares.\n\n*Originally published at [dexio.wiki](https://dexio.wiki/blog/llm-wiki/).*", "url": "https://wpnews.pro/news/karpathy-s-llm-wiki-what-it-is-and-how-to-set-one-up", "canonical_source": "https://dev.to/forrestzhang/karpathys-llm-wiki-what-it-is-and-how-to-set-one-up-56ck", "published_at": "2026-10-01 17:00:12+00:00", "updated_at": "2026-10-01 17:14:43.459894+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models", "ai-tools", "natural-language-processing"], "entities": ["Andrej Karpathy", "X", "GitHub", "Obsidian", "Codex", "Claude Code", "OpenCode"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/karpathy-s-llm-wiki-what-it-is-and-how-to-set-one-up", "markdown": "https://wpnews.pro/news/karpathy-s-llm-wiki-what-it-is-and-how-to-set-one-up.md", "text": "https://wpnews.pro/news/karpathy-s-llm-wiki-what-it-is-and-how-to-set-one-up.txt", "jsonld": "https://wpnews.pro/news/karpathy-s-llm-wiki-what-it-is-and-how-to-set-one-up.jsonld"}}