llmwiki2 is an open-source Python library, command line, web page and MCP memory that files your documents into a wiki of linked Markdown notes and answers questions citing the notes it used. It is the engine of the Crow desktop app, published from the crow-hq/llm-wiki-v2 repository, by Federico Cesarini and Marco Sassarini.
What is llmwiki2?
llmwiki2 is the PyPI package of LLM Wiki v2, a Python engine for LLM wikis. It summarizes each document into a Markdown note, files the note in a folder about its subject, merges it into the note on the same subject when there is one, links related notes, and answers questions citing the notes it read.
It builds on the LLM wiki idea Andrej Karpathy described. It reads text, Markdown, PDF, Word, PowerPoint, Excel and OpenDocument files, and keeps the wiki as plain Markdown, by default in ~/llm-wiki, in a format derived from Google's Open Knowledge Format, with an untouched copy of every source in raw/.
How do I install llmwiki2?
Install llmwiki2 from PyPI with Python 3.11 or later, using pip install llmwiki2, or uv tool install llmwiki2 if you want uv to fetch Python. Then run llmwiki2: your browser opens, you pick a provider, paste its key, press Test connection, then Save and start.
pip install llmwiki2 llmwiki2
uv tool install llmwiki2
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. To try it without installing anything but uv:
uvx llmwiki2 demo
The same example wiki is drawn on Crow's home page, where you can explore its brain without installing anything.
How do I use llmwiki2 as a Python library?
Use llmwiki2 as a library by importing Wiki from llmw2, the package's import name. Wiki.from_env reads the settings and the provider's key from the environment; then ingest files a text, ingest_file files a PDF or Office document, and ask returns an answer with its citations. The web page and the command line call the same object.
from llmw2 import Wiki
wiki = Wiki.from_env(bundle="./wiki") # OKF_* variables and the provider's key, e.g. OPENROUTER_API_KEY
wiki.init()
result = wiki.ingest(open("meeting.md").read(), title="Pricing meeting")
wiki.ingest_file(open("minutes.pdf", "rb").read(), "minutes.pdf") # also .docx, .pptx, .xlsx, .odt, .ods
print(result.action, result.note, result.created_folders, result.related)
answer = wiki.ask("What did we decide about enterprise pricing?")
print(answer.text, answer.citations)
print(wiki.usage.to_dict()) # {"llm": …, "classifier": …, "by_model": …}The same operations are on the command line: llmwiki2 --bundle ./wiki followed by init, ingest, sync, ask, check or serve. Every step of the ingest and ask flows is a function you can replace. The library guide covers the API, and examples/ holds runnable programs.
How do I give Claude Code or Codex a memory with llmwiki2?
To give Claude Code or Codex a memory, install llmwiki2 with the mcp extra, start llmwiki2, open Memory on its page and press Start. The wiki then serves MCP at http://127.0.0.1:8000/mcp: add it with claude mcp add or codex mcp add, and the client recalls from your notes and files what it learns.
pip install 'llmwiki2[mcp]' # or: uv tool install 'llmwiki2[mcp]'
claude mcp add --transport http --scope user llm-wiki http://127.0.0.1:8000/mcp # Claude Code, every project codex mcp add llm-wiki --url http://127.0.0.1:8000/mcp # Codex
| MCP tool | What it does |
|---|---|
recall | Answers from the wiki, citing its notes. Read-only. |
remember | Files a text like a note: right folder, merged, linked. |
search | Finds notes by their words, with no model call. |
read_note | Reads one note in full. |
rebuild | Files every note again from the raw copies, only with confirm. |
Cursor and VS Code take the same URL in their mcp.json. By default the wiki's own models file the memories; the client's models can do it instead, which sends your documents' text to them (see the memory guide). The memory has no authentication: keep the port on your machine.
What is CROW mode?
CROW mode is llmwiki2's default. A small typed classifier takes the filing decisions (which folder, which note it matches, merge or new note, related notes) and reorders the notes found for a question; the LLM writes notes, merges, folder names and answers. When the classifier is unsure or fails, the LLM or a safe default takes over.
CROW stands for Classifier-Routed Organization of LLM Wikis, the method of the CROW paper. Filing picks a note's folder among every folder of the wiki in one classifier choice; the LLM lays out the folders, with a plan before a batch and a split when a folder grows. Asking, in 1.0.0, starts from the wiki's search: the top note stays first, and one batched classifier call reorders the other 15. The LLM walks the folders only when the search finds nothing.
The default classifier is Jev, by TypeSafe AI, through OpenRouter or TypeSafe; any System One server, such as Laya or Ollama 0.35 or later, can take its place. Classic mode (--mode classic) lets the LLM take every decision. Details: docs/wiki/crow.md.
In the CROW paper's benchmark of 525 documents, CROW read the right note in 89.2% of asks against 61.8% for an LLM taking the same decisions, took 18.4 s per document against 38.6 s, and used 68% fewer LLM tokens. These are the authors' own measurements, on a private corpus of the first author's notes, with the paper's pipeline, before 1.0.0 changed how CROW asks.
Which models and providers does llmwiki2 support?
llmwiki2 talks to any OpenAI-compatible chat API. It has presets for OpenRouter (the default, with google/gemini-3.8-flash), OpenAI, Gemini and Ollama, and a custom setting for any other OpenAI-compatible server, such as vLLM, LM Studio or llama.cpp's server. CROW's classifier is a separate setting: Jev through OpenRouter or TypeSafe, or a local server.
| Provider | Default model | Key |
|---|---|---|
openrouter | google/gemini-3.8-flash | OPENROUTER_API_KEY |
openai | gpt-6-luna | OPENAI_API_KEY |
gemini | gemini-3.8-flash | GEMINI_API_KEY |
ollama | gemma4 | none |
custom | the one you set | if it wants one |
The default models are suggestions and can change in a minor release. Everything can also run on your computer, with writer, classifier and an optional embedder all served by Ollama, at the price of time and some quality.
What changed in llmwiki2 1.0.0?
llmwiki2 1.0.0, released on 10 November 2026, is the first stable release: from here on the library follows semantic versioning, with a documented compatibility scope. A wiki written by 0.8.0 opens as it is, with nothing to convert. In CROW mode, asking now starts from the wiki's search, then one classifier call reorders the notes.
- Semantic versioning covers the names in
llmw2.__all__, theStepsAPI, the settings, the command line, the HTTP API, the MCP tools and the wiki on disk; not prompt texts, models, thresholds or caches (Compatibility). - CROW's ask no longer walks the folders with the classifier.
- Search with no model call (
Wiki.search, the MCPsearchtool,llmwiki2 search), and an optional embedder. - Breaking: four removed settings are ignored with a warning, and
over_limitis keyword-only. The rest is in the 1.0.0 release notes.
Is llmwiki2 the same as the LLM Wiki v2 gist?
No. llmwiki2 is installable software: the Python package of the crow-hq/llm-wiki-v2 repository, by Federico Cesarini and Marco Sassarini, released on PyPI. The LLM Wiki v2 gist by Rohit Ghumare, from April 2026, is a separate document with the same name: it extends Karpathy's LLM Wiki pattern with lessons from building agentmemory.
The gist adds ideas such as confidence scores that fade over time, a knowledge graph and hybrid search.
llmwiki2 and Crow
Crow is llmwiki2 as a desktop app for macOS, Windows and Linux, for people who would rather not use a terminal: it finds your documents by itself and works with any model on OpenRouter. Crow does not run local models yet; the engine does, with Ollama. Download Crow, or read what an LLM wiki is.