LLM Wiki v2
Give it your documents. It files them into a tidy wiki of Markdown notes and answers your questions, citing the notes it used. It runs on your computer, with any AI provider: OpenRouter, OpenAI, Gemini, Ollama (free and local) or any OpenAI-compatible server. It works in CROW mode by default: a small classifier decides where things go, so the wiki stays fast and cheap as it grows.
Start in 2 steps
Rather not use a terminal? Crow is this library as a desktop app, with downloads for macOS, Windows and Linux. The steps below install the library itself, with its web page and command line.
1. Install it with Python 3.11 or later (in a virtual environment, if your system asks for one):
pip install llmwiki2
No Python, or you'd rather keep it apart from your other packages? Use uv,
which also fetches Python: uv tool install llmwiki2. The same install is the Python library too:
from llmw2 import Wiki, see the library guide.
2. Start it:
llmwiki2
Your browser opens. Pick a provider, paste its key, press Test connection, then Save and start. That's it.
Just looking? llmwiki2 demo opens an example wiki, the notes of a fictional coffee
roastery, with no key needed to browse it and its brain. It is copied to ~/llm-wiki-demo,
so you can add to it or delete it. To try it without installing anything but uv:
uvx llmwiki2 demo.
[!TIP] No key? Pick Ollama: free, runs on your computer, no account (download it, then
ollama pull gemma4). Ollama runs the model locally; CROW's classifier is separate and remote by default. It has its own provider (Settings → Advanced): OpenRouter, TypeSafe or a local server. Without one the wiki uses classic mode, where the model decides by itself. One OpenRouter key works for every model, and for CROW too.
What you can do
| Add documents | Drop text, Markdown, PDF, Word, PowerPoint, Excel or OpenDocument files anywhere on the page. Each one lands in the right folder, merged with what the wiki already knows; a spreadsheet gives a note per sheet. |
| Ask questions | Type a question. The answer cites the notes it used: click one to read it. |
| Give Claude a memory | From the terminal only: llmwiki2 setup, then talk to Claude Code or Codex in plain words. With the page: Memory → Start, then paste the claude mcp add … or codex mcp add … line it shows. Either way they recall from your wiki and file what they learn in it (below). |
| See the brain | A live map of your folders, notes and links. |
| Delete | Hover a note or folder in the sidebar and press the bin, or Delete note at the foot of a note. Links to it go from the other notes. Empty the wiki on the home page starts over. |
| Move and describe | Move at the foot of a note files it in another folder; every link to and from it follows. The pencil beside a folder in the sidebar edits its description, the line the librarian routes by. |
| Areas | Areas at the top: create a top-level folder, confirm or dismiss the areas proposed to the wiki, rename one or merge it into another. The wiki never opens or proposes an area by itself. |
| Keep your files | Plain Markdown in ~/llm-wiki: open it in any editor, keep it in git. |
Claude's memory (MCP)
The wiki can be the long-term memory of Claude Code, Codex or any MCP client, documents already filed included.
It comes with the mcp extra (the Docker image has it).
From the terminal only (Claude Code, Codex)
No page, no server to keep running: Claude Code starts the memory by itself.
1. Install it:
uv tool install 'llmwiki2[mcp]' # or: pip install 'llmwiki2[mcp]'
2. Set it up:
llmwiki2 setup
To the first question answer 2 (as the memory of an agentic CLI); after that, Enter takes the default every time:
| It asks | Pick |
|---|---|
| Which models do the work | 1 (the default): Claude Code or Codex do it, on their plan, no key. 2 (hybrid) is quicker and needs an OpenRouter key, or Ollama on your computer |
| Connect Claude Code? | Y. With several configurations (~/.claude, ~/.claude-work), it asks which: Enter for all |
| Add the lines to CLAUDE.md? | Y: they make Claude use the memory when you talk normally |
3. Talk to it, in any language, in Claude Code or Codex, anywhere:
ricorda che Rossi ci paga a 45 giorni · what did we decide about pricing? · add ~/Downloads/offer.pdf to the wiki · move the pricing note to suppliers
The first time it uses each tool, Claude Code asks your permission: choose "don't ask again" for the ones you trust.
To see the brain or browse the notes, run llmwiki2: the page opens on the same wiki, while Claude Code keeps using it.
Run llmwiki2 setup again to change anything. Windows says it blocked llmwiki2.exe? See
Something wrong?.
With the page
Open Memory, press Start, and connect a client:
claude mcp add --transport http --scope user llm-wiki http://127.0.0.1:8000/mcp
codex mcp add llm-wiki --url http://127.0.0.1:8000/mcp
What it can do
The client gets its tools: recall answers from your notes and documents, citing them; remember files what it
learns, in the right folder, merged and linked like any note (CROW); search finds notes by their words with no model
call; read_note reads a note in full; folders, move_note, describe_folder, rename_area, merge_areas and
delete_note reorganize the wiki (the last two only when you ask); rebuild (with confirm) files every note again on
the same folders, from the memory's own raw copies. Started from the terminal (llmwiki2 mcp) it also files documents
from your disk: remember_file and sync_folder. Which models do the work is a choice under Memory or in setup:
- This wiki's settings (the default on the page). OpenRouter or a local model, with Jev or Laya deciding, file the memories; the client only calls the memory.
- Claude or GPT for everything (the default in
setup). The memory hands the client every model call it makes, while CROW runs as always. Claude Code decides with a Haiku subagent and writes with its own model; Codex uses its own. It runs on the client's plan, with no key in the wiki. The requests carry your documents' text to the client: it is told to read it as data and to answer without tools, but that is an instruction, not a sandbox (see Security in the memory guide). - Hybrid. The client's model writes, and the wiki's classifier (Jev through OpenRouter, or Ollama or Laya on your computer) decides: fewer round trips than the above, and no Haiku subagents.
Docker, the tools and security: docs/wiki/memory.md.
Why not RAG?
Because a wiki stays readable. RAG keeps your documents as embeddings, an opaque vector index no one can read or fix. Here every document becomes a Markdown note, filed in a folder that says what it holds and linked to related notes: you can open it, correct it and keep it in git, and every answer cites the notes it used. And knowledge accumulates: a new source updates the note on its subject instead of being rediscovered at every question.
CROW keeps it that way as the wiki grows. In Karpathy's LLM Wiki the model finds pages by reading an index, which works at moderate scale (about a hundred sources); beyond that the gist suggests adding search, hybrid lexical and vector. In CROW a small classifier works with the folders instead: filing picks the folder among every folder of the wiki in one choice, and answering finds the notes by search and lets the classifier reorder them, so the wiki can grow without vectors and stay something a person can read. The LLM lays out the folders: in a batch, before its documents are filed, and for a document filed alone, by splitting a folder that has grown. In the paper, retrieval kept its accuracy across a twentyfold growth of the wiki. A separate test on a private wiki of about 500 notes pointed the same way: with CROW the right note was found nearly as often at the end as early on, while with the LLM taking the decisions it was found markedly less often as the wiki grew. On 1,000 Enron mails filed in their owners' folders, CROW read the right note for every question at each step of the growth while classic went from 76% to 60%. The classifier weighs at most 24 candidate notes per decision, so its tokens per document nearly stopped growing after the first few hundred documents; CROW's cost per document rose 1.4 times over the 1,000, classic's 1.6 times, and at 800 to 1,000 documents CROW cost 0.41 times classic's with the writer at its list price (benchmarks/README.md).
FAQ
Does everything run on my computer? It can, with no key and nothing leaving it.
Crow, the desktop app, does it out of the box. With the library, Ollama
serves the writer and the classifier too: a typed classifier such as tev1 behind Ollama 0.35 or later, or Laya
(see everything on your computer).
The library's default classifier is remote: Jev, through OpenRouter or TypeSafe. Without a classifier the wiki runs in
classic mode, where the LLM takes every decision.
What is Jev? A typed classifier by TypeSafe AI. Given a text, it answers typed questions (pick one of these options; is this statement true?) with probabilities instead of prose. CROW asks it every filing and retrieval decision and keeps the LLM for writing. CROW does not depend on it: any classifier that returns those probabilities can take its place. The authors have no ties to TypeSafe AI.
Aren't these your own benchmarks? Yes. The paper measures one corpus of 525
personal documents, mostly in Italian, with one LLM and one classifier version, and
says so among its limitations; its rates carry 95% intervals. The corpora and
scripts behind these measurements are public in benchmarks/,
and every script has a --dry-run, so you can run them with your own models.
The numbers of the banner come from eleven corpora (handbooks, mail, laws in two languages, contracts, tax manuals,
Wikibooks pages and personal notes, 2,019 documents), each filed in CROW and in classic mode with the same writer, and
656 questions written blind from single documents: the right note was read 99.5% of the time against 79.4%, filing was 1.6
times as fast with 63% fewer LLM tokens. The cost depends on the writer's price: on the cheapest providers, where the writer
costs about what the classifier does, it came out the same; with the writer at its list price CROW costs 0.59 times classic's.
The table per corpus is in benchmarks/README.md.
The filing measures of the CROW routing use, besides the repo's own synthetic coffee
corpus, the Enron email corpus, the
GitLab handbook and the
PostHog handbook: they are linked, not copied.
On the PostHog handbook, CROW files pages closer to their real folders than main (its CROW routing and its classic
mode) with both models measured, at 0.86 to 0.87 times the cost of main's CROW and 0.45 to 0.65 times that of classic,
with retrieval between 93% and 98% for all: the table, what each column measures and how to run it again are in
benchmarks/README.md.
Why AGPL, and why a CLA? The AGPL keeps the code and every change to it open, also when it runs as a service. The CLA keeps the rights clear between the two authors and everyone who contributes; you keep the copyright in your work.
Something wrong?
- "no API key yet": open ⚙ on the page, or run
llmwiki2 setupin the terminal. - Test connection fails: the message is the provider's own, usually a wrong key or model name.
- A PDF adds nothing: it is a scan with no text layer; run OCR on it first.
- Another folder for the wiki:
llmwiki2 --bundle <folder>. Settings live in~/.config/llm-wiki/config.json. - Windows blocks
llmwiki2.exe("an application control policy has blocked this file", common on work PCs): run it through Python, which the policy lets through. Installed with pip:python -m llmwiki2 setup. With uv, in PowerShell:& "$(uv tool dir)\llmwiki2\Scripts\python.exe" -m llmwiki2 setup. Every command works this way (-m llmwiki2 serve,-m llmwiki2 demo), andsetupconnects Claude Code through that same Python.