A step-by-step setup for Andrej Karpathy's LLM Wiki pattern: a coding agent writes and maintains a linked markdown wiki, and you read it in Obsidian.
Short answer: make a folder with raw/ for sources and wiki/ for pages, add a schema file (AGENTS.md or CLAUDE.md) that tells your coding agent how to ingest, answer and lint, then open the folder as an Obsidian vault. You drop sources in raw/, ask the agent to ingest them, and browse the result in Obsidian.
Karpathy published the idea in April 2026 as an "idea file" you paste into your own agent, not as software. The steps below turn that idea into a working setup. Everything here is checked against his gist and the Obsidian Help pages as of October 2026.
What you need
- Obsidian, which is free.
- A coding agent that can read and write files in a folder, such as Claude Code or OpenAI Codex. Karpathy names both.
- Optional: git, the Obsidian Web Clipper browser extension, and the Dataview plugin.
Step 1: Create the folder layout
Make one folder per knowledge base. Karpathy's three layers map to:
my-wiki/
raw/ # sources you add; the agent reads but never edits
raw/assets/ # images downloaded from clipped pages
wiki/ # pages the agent writes and maintains
wiki/index.md # catalog of every page with a one-line summary
wiki/log.md # append-only record of ingests, queries and lint passes
AGENTS.md # the schema (CLAUDE.md if you use Claude Code)
Run git init in the folder. Karpathy notes the wiki "is just a git repo of markdown files", so you get history and the ability to undo a bad edit.
Step 2: Write the schema file
The schema is what turns a general chatbot into a disciplined wiki maintainer. Start small and let it grow. A useful first version:
# Wiki rules
- raw/ is read-only. Never edit or delete files there.
- Every source gets a summary page in wiki/sources/.
- People, companies and products get entity pages in wiki/entities/.
- Ideas and themes get concept pages in wiki/concepts/.
- Link pages with [[wikilinks]]. Every new page links to at least one existing page.
- After each ingest: update wiki/index.md and append to wiki/log.md as
"## [YYYY-MM-DD] ingest | <source title>".
- When a new source contradicts an existing page, keep both claims, mark the
conflict, and say which source each came from.
Step 3: Open the folder in Obsidian
- Open Obsidian and choose Open folder as vault, then pick
my-wiki/. - In Settings → Files and links, set Attachment folder path to
raw/assets/. - In Settings → Hotkeys, search for "Download attachments for current file" and bind a key. After you clip an article, press it so images are saved locally.
- Optional: install Dataview from Settings → Community plugins → Browse if you want tables built from page frontmatter.
Step 4: Add your first source and ingest it
- Save a source into
raw/: a clipped article, a PDF, or a meeting transcript as a text file. - In your coding agent, from the
my-wiki/folder, say: "Read AGENTS.md. Ingest raw/. Tell me the key takeaways before you write." - Review what it proposes, then let it write. Karpathy says one source can touch 10 to 15 pages.
- Check the changes in Obsidian's graph view and in
git diff. Commit when you are happy.
Karpathy prefers to ingest one source at a time and stay involved. Batch ingest works too, with less oversight.
Step 5: Ask questions and file good answers back
Ask the agent questions against the wiki: "Using wiki/index.md, what do we know about X? Cite pages." When an answer is worth keeping, ask it to save the answer as a new page. That is how the wiki compounds.
Step 6: Lint it on a schedule
Once a week, ask: "Lint the wiki. Find contradictions, stale claims, orphan pages and missing links. Propose fixes, then apply the ones I approve." Karpathy describes this lint pass as what keeps the wiki healthy as it grows. Past a few hundred pages, add a search tool; he suggests qmd, a local markdown search engine.
Using it for client work
- One vault per client. The pattern assumes one knowledge base per topic. Mixing clients in one wiki invites the agent to cross-link them.
- Transcripts go in raw/. Export each call transcript from your recorder and save it under that client's
raw/. - Put corrections in the schema. If the agent keeps getting a client's naming wrong, add the rule to that client's
AGENTS.md, not just the page.
Sources
Checked October 9, 2026.
- Andrej Karpathy, llm-wiki (GitHub gist)
- Obsidian Help, Community plugins
- Obsidian, Pricing
Related: Armbrain vs Karpathy's LLM Wiki · Agentic memory vs RAG · All comparisons