LLM Wiki
Build a second brain that maintains itself — an AI reads your sources and keeps a living, cross-referenced wiki of what you know.
A visual overview: what it is, how it works, and how to start.
In one line. You collect the sources. An AI reads each one and maintains a living, cross-referenced wiki of what you know, so your knowledge compounds instead of scattering.
The big picture
You bring the sources and the judgment. The AI does the reading and the bookkeeping. You read the result.
Color key: gray is your raw sources, blue is the AI, green is the wiki, amber is you.
Think of it as a team of two: you are the editor; the AI is the writer and librarian who has read everything you have.
Why it beats "chat with your docs"
A chat tool answers from your raw files and keeps nothing, so it starts over every time. A second brain does the synthesis once, writes it down, and keeps it.
| Chat tool (RAG) | Second brain | |
|---|---|---|
| Knowledge | Retrieved per question | Built once, then kept |
| Repeat questions | Rebuilt from scratch | Read from the wiki |
| Connections | Found, then discarded | Saved and linked |
| You get | An answer | An answer and a growing wiki |
A chat tool retrieves. A second brain remembers and builds.
That's a fair contrast, not a dismissal — RAG is the right architecture when the corpus is the authority and answers must cite it. The RAG transit planning note works through that case in detail: an agency's own reports as institutional memory, where grounding and citations matter more than synthesis.
How it works: the loop
Drop sources in and the AI files and links them; ask a question and a good answer gets filed back as its own page. So the wiki grows on both ends — whether you're feeding it or querying it.
What the wiki looks like
Not a pile of notes. A connected web, where every idea links to related ideas and to the sources it came from.
A single page is small and plain:
# Compound Interest
Returns earn their own returns over time, so growth accelerates.
Starting small and early tends to beat starting big and late.
Related: [[dollar-cost-averaging]], [[time-in-the-market]]
From: [[author-2023-letter]], [[book-notes]]Multiply that by a few hundred linked pages and you have a map you can ask questions of.
What you set up
my-second-brain/
├── raw/ # your sources, left untouched
│ ├── article.md
│ └── book-notes.pdf
└── wiki/ # the AI writes everything in here
├── overview.md # the running thesis
├── index.md # catalog of every page
├── concepts/ # ideas and frameworks
├── sources/ # one summary per source
└── entities/ # people, places, productsYou need an AI agent that can read and write files (Claude Code, Codex) and, ideally, a markdown app like Obsidian to view the result.
Good for
Researching a topic over weeks · reading a dense book · learning a new field · planning a trip or a big purchase · a hobby you love · personal reflection · a team's shared memory.
Anything where knowledge piles up and you wish it were organized.
What it is not
- Not a thinker. Quality tracks your sources and your questions.
- Not a dumping ground. Depth beats breadth.
- Not free. It uses real compute, usually minor for personal use.
- Not locked in. Just text files you own.
Start in 4 steps
- Make a folder with a
raw/subfolder for sources and awiki/subfolder for the AI's pages. - Give the AI a short brief: keep a wiki of linked pages, summarize each source, connect ideas, maintain an overview.
- Drop in one source and ask the AI to file it. Read what it writes.
- Add a few more, ask a question, and watch it take shape.
Lighter on-ramp: with no setup at all, ask any good AI to keep a structured running summary of a topic and paste it back each time so it builds on itself.
The one rule: start tiny and let the structure grow out of your real sources. Do not design an elaborate system for an empty folder.
Wiring it up: AI agent + vault
Everything above describes the idea. This is the implementation layer — how you give
an AI reliable, ongoing read/write access to an Obsidian vault so it does the heavy lifting
(reading sources, summarizing, linking, maintaining overview.md) while you stay the
editor. It's the automation that turns a static pile of Markdown into a living, compounding
system.
The specific tools below shift fast — treat them as examples of each pattern, not a fixed list. The architectures are the durable part.
Three architectures
| Architecture | What it is | Strengths | Weaknesses | Best for |
|---|---|---|---|---|
| In-app plugins | AI inside Obsidian — RAG chat, inline generation, agents | Seamless UX, no external setup | Limited autonomy and long-running tasks | Daily interaction, light assistance |
| External agents | Coding agents or scripts with direct file-system access to the vault | High autonomy; multi-step and scheduled workflows | Needs careful prompting and oversight | Heavy maintenance, bulk processing, a self-updating wiki |
| Hybrid | External agents do the heavy lifting; in-app plugins keep a human in the loop | Best of both | More to orchestrate | Serious second-brain builders |
The hybrid model is the most powerful for a self-maintaining wiki: an autonomous agent does the bookkeeping, and you review and steer from inside Obsidian.
The industry has a name for the skill this demands: Context Engineer
— architecting the information environment an agent works in, rather than the agent itself.
Curating raw/ and writing the librarian brief is that job, at personal scale.
The tools
In-app plugins — for interacting with your knowledge, weak for autonomous upkeep:
- Smart Connections — RAG chat over the whole vault, grounded in your actual notes.
- Copilot — multi-model assistant with strong inline editing and generation.
- Claudian and similar — direct Claude integration.
- Also: Text Generator, various local-LLM plugins.
External agents — the real power layer, because they read and write files directly:
- Claude Code / Claude Projects — point it at the vault folder, give it skills/prompts for maintenance; in the terminal it can loop over files, edit, and commit.
- Cursor, Aider, Windsurf — coding agents that excel at large-scale refactoring, consistent linking, and structure across many files.
- Custom frameworks — LangChain, CrewAI, or a simple script plus a model with file-system tools.
- Git-backed workflows — wrap any agent in version control so every change is tracked
and reversible.
revertandreflogare the two that matter most here; the git reference has both, and the reasoning forrevertoverreseton anything already shared.
The Karpathy "LLM wiki" pattern (the idea introduced above) in practice: sources land
in raw/; the agent turns them into summaries in wiki/sources/, maintains overview.md,
creates concept pages, adds [[links]], and updates connections; you review through Graph
View and give direction. It's exactly what the big picture at the top of this page shows.
A production layout
A fuller version of the earlier What you set up sketch, organized for an agent:
my-second-brain/
├── raw/ # you drop sources here — AI never edits
│ ├── articles/
│ ├── books/
│ ├── emails/
│ └── notes/
├── wiki/ # AI writes and maintains everything here
│ ├── overview.md # the living thesis (updated regularly)
│ ├── index.md # catalog of every page
│ ├── concepts/ # idea pages, richly linked
│ ├── sources/ # one clean summary per source
│ ├── entities/ # people, companies, models
│ └── projects/ # (optional) project-specific synthesis
├── .obsidian/ # your Obsidian config
└── prompts/ # (optional) stored system prompts / skillsThe agent owns
wiki/. You ownraw/. That one boundary is what keeps the system safe to automate.
Who does what
The agent — librarian and writer:
- Reads new files in
raw/. - Creates and updates summaries in
wiki/sources/. - Extracts concepts into
wiki/concepts/, linked with[[wikilinks]]. - Maintains and evolves
overview.md; keepsindex.mdcurrent. - Flags contradictions and proposes updates when new context arrives.
You — editor:
- Drop high-quality sources into
raw/. - Review Graph View — Local for recent notes, Global for the whole web — for connection quality.
- Curate the pages that matter; correct major mistakes.
- Give high-level direction ("focus on investment frameworks this month").
Setup paths
Claude Code / Claude Projects.
Give it a skill/brief: "You are the librarian for my second brain. When new files appear in raw/, process them by these rules…" — spell out summary style, linking philosophy, and overview maintenance.
For autonomous runs, use Claude Code in the terminal — it loops over files, edits, and commits via Git.
Cursor or Aider (large-scale maintenance). Open the vault as a project, use agent/composer mode with a strong system prompt, and run targeted passes — "process all new files in raw/ and integrate them with proper linking and overview updates." Git tracks every change.
Hybrid daily loop. Drop sources in the morning → the agent processes them on a schedule or on demand → you open Obsidian, scan the Local Graph on recent notes and the Global Graph for new connections → use Smart Connections or Copilot for quick questions → weekly, run a deeper agent pass for overview and link cleanup.
Best practices
Prompt the agent like an editor. Be specific about output format, linking style, and when not to create a page. Give editorial guidelines (tone, depth, link vs. keep-separate) and a few good-versus-bad page examples.
Keep a human in the loop.
- Graph View (especially Extended Graph) is your audit tool — weak or hallucinated links show up visually.
- Git gives full history and one-command rollback.
- Keep a review queue note where the agent logs uncertain decisions.
- Run periodic "knowledge health" passes using filtered graphs (orphans, high-degree hubs, recent changes).
Risks and mitigations:
| Risk | Mitigation |
|---|---|
| Hallucinated or wrong links | Have the agent propose changes; apply via Git + review, not blind auto-commit |
| Over-linking / structure drift | Strong, versioned system prompts + regular Graph review |
| Privacy and security | A local vault with local models, or a carefully chosen API, beats cloud note apps |
| Context-window limits | Retrieval (Smart Connections style) or hierarchical processing — summarize, then synthesize |
Scale. On large vaults, point the agent at recent changes or specific subfolders rather than the whole vault each run. Pair with Bases for structured dashboards the agent can also update.
Done well, the agent layer hands you back your attention: you stop doing the bookkeeping by hand and spend it on judgment, curation, and direction — with Graph View as your window into the system's health. It's the closest most people get to a self-maintaining second brain without building everything from scratch.
Why it works
The hard part was never the reading. It was the upkeep: linking, updating, and staying consistent across hundreds of pages. People quit because that work scales badly. An AI does not get bored and can revise many pages in a single pass, so the wiki stays alive, and only a living wiki compounds.
The idea is old. Vannevar Bush imagined a personal, linked knowledge machine in 1945; the sociologist Niklas Luhmann wrote dozens of books from a system of linked index cards; the modern note apps turned that into software. The missing piece was always someone willing to do the upkeep forever, and that is the part the AI handles.
Origin: Andrej Karpathy's short "LLM wiki" idea file (search "Karpathy LLM wiki"). The diagrams above render in Obsidian, GitHub, and most markdown viewers. The best way to understand it is to start one.
Related pages
- RAG Transit Planning ReportAI-synthesized walkthrough of IFP's proposal to use RAG over FTA planning/construction documents as agency institutional memory.
- AI-Augmented Software Engineering 2025The essential numbers, shifts, tools, and risks reshaping how software gets built — from agentic IDEs to the junior squeeze.
- Git commands & workflowsEveryday git — branching, undoing, stashing, and cleanup.
- Building an AI-First Bank CultureKey takeaways from JPMorgan Chase CAO Derek Waldron's conversation with McKinsey on LLM Suite, the two-pillar AI strategy, workforce transformation, and emerging risks in agentic AI.
- Agents, Robots, and UsA cheatsheet on MGI's methodology for assessing skill partnerships in the age of AI — covering automation potential, adoption modeling, occupation archetypes, and the Skill Change Index.