concept · concepts/Agent-Maintained Wiki.md
Agent-Maintained Wikiauto-ingested
A set of linked pages that an AI agent writes and maintains about a body of material. Each page gathers what is known about one subject and links to related pages, so the agent has a map for finding knowledge rather than re-searching raw files. It is the pattern from Karpathy's LLM-wiki gist, and the pattern this wiki is built on. Anthropic — The Components of Agent Memory evaluates it; Blumenfeld — Scaling Karpathy's LLM Wiki (Neo4j) attacks its scaling.
The recipe itself (primary source, read 2026-11-08)
Karpathy — LLM Wiki Gist: three layers (immutable raw, LLM-owned wiki, a schema
file), three operations (ingest, query, lint), index.md read first and log.md
appended with a greppable prefix. Its own scale estimate: index-first "works
surprisingly well at moderate scale (~100 sources, ~hundreds of pages) and avoids the
need for embedding-based RAG infrastructure," with "proper search" (qmd) after that.
Its lineage claim: Bush's Memex, "with the connections between documents as valuable
as the documents themselves" (Bush — As We May Think). This wiki stands at 25
sources and ~105 pages, inside Karpathy's envelope, with qmd already attached.
What the evidence says
It compounds. On a ~420M-token corpus, Opus 5 agents built a wiki over 128 dreaming sessions, coordinating through a shared log. Scores on 25 questions rose from 13% to 48% as the wiki grew. The early wiki was like a new employee's knowledge, the late one like a seasoned employee's.
It complements search; it doesn't replace it.
| Setup | Score |
|---|---|
| Search only | 53% |
| Wiki only | 48% (best) |
| Search + wiki | 54% → 61% as the wiki grew, and ~20k fewer tokens per question |
It pays off on synthesis, not lookup.
- Merger questions that needed several documents plus judgment or math: 87% with the wiki against 73% with search.
- A legal-brief task whose criteria each sat in one document: no clear gain.
It fails in recognizable ways.
- The Borges map: a wiki that grew larger than its sources and "effectively abstracted nothing."
- Summary loss in shared pages: several agents writing one shared contract-terms table overwrote each other and summarized badly, so only 41 of 57 facts survived. One page per contract, quoting terms verbatim, kept 57 of 57.
- Dangling links: pages linked to pages that didn't exist yet. A second pass repointed 9 links and added an index.
- Upkeep cost: representations need compute to maintain and can accumulate errors or hallucinations.
How it fails at scale (second source)
Blumenfeld — Scaling Karpathy's LLM Wiki (Neo4j) adds a failure axis Anthropic did not measure: read, search and navigation cost. On a plain file system every lookup is a scan of the whole wiki, following a link is another scan, and "what points at this page — has no index behind it at all." The agent that "can't afford to look around before it writes" then duplicates pages, blends concepts and misses cross-links: "The retrieval failure quietly becomes a write defect." His remedy is a deterministic graph index over the markdown (documents, sections, containment, reading order, links) that never touches the files (Navigation vs Search). Anthropic's "dangling links" finding is the same defect seen from the writing side.
Contradiction: Blumenfeld says the file-based wiki "can't be scaled for personal workflows, let alone enterprise use cases." Anthropic — The Components of Agent Memory had agents build and use a file-based wiki over a ~420M-token corpus across 128 sessions, with scores rising from 13% to 48% (61% with search). It scaled, with search beside it and with the Borges and dangling-link failures Blumenfeld predicts. Left open: whether "scaled" means "worked at all" (Anthropic) or "stayed cheap to read as it grew" (Blumenfeld), which are different claims. Karpathy's own number sits between them: index-first works to "~100 sources, ~hundreds of pages," then add search (Karpathy — LLM Wiki Gist).
Why it matters / where it shows up
-
This wiki is one. The source is close to an external evaluation of the method in CLAUDE.md, and it mostly supports it:
- accumulation compounds;
- linking pays on cross-source questions (Surface vs Deep Structure, T2);
- the append-only
log.mdmatches the shared coordination log; - LINT matches the gap-filling dream pass;
index.mdmatches the added index page.
-
It also qualifies the method:
- The CLAUDE.md line "you are not a RAG system" overstates the case: wiki plus search beat either one alone.
- Summarizing can lose facts that verbatim quotation keeps.
- A wiki can bloat past usefulness.
See Method Reflection (T5).
Open questions
- Which pages here are lookup-shaped (where
raw/search would do as well) and which are synthesis-shaped (where the wiki earns its keep)? Should effort shift toward syntheses?Is this wiki at any risk of the Borges failure? A rough check would compare totalMeasured 2026-11-08: 0.70× overall, two clusters at 11.1× and 9.8× (The Borges Map).wiki/size withraw/size.- At what size does grep stop being enough for the agent's own lookups, and should the agent get the front door's graph index before that point? (Navigation vs Search)
- When should a source page quote rather than summarize? The contract result suggests: whenever exact terms are what will be graded or relied on.
Connections
- Agent Memory — the wiki is one representation in an agent's memory hierarchy.
- Dreaming (Offline Memory Consolidation) — the process that builds and repairs it.
- Surface vs Deep Structure — the gains appear on cross-document questions, where linking surfaces structure that search misses.
- Method Reflection — T5 treats this page as evidence about the wiki's own method.
- Personal vs Team Agents — a shared wiki is institutional memory, and many writers on one page cause overwrite failures.
- One Fact Per Grain — the one-page-per-contract fix is a grain decision: one page per entity, not one shared table.
- Navigation vs Search — the retrieval modes a wiki needs, and the reverse index the file system lacks.
- Karpathy — LLM Wiki Gist — the recipe itself, read 2026-11-08; see what this wiki has revised since.
- Bush — As We May Think
#to-read— the Memex, the recipe's named ancestor.
Sources
- Anthropic — The Components of Agent Memory — Stainless, merger and LAB evaluations.
- Blumenfeld — Scaling Karpathy's LLM Wiki (Neo4j) — scaling failure modes and the graph-index remedy.
- Karpathy — LLM Wiki Gist — the primary source: the recipe, its scale estimate, its division of labour.