# LLM Wiki > LLM-compiled knowledge bases for any AI agent. Parallel multi-agent research, collector catalogs, automated session capture, feedback curation, thesis-driven investigation, source ingestion, wiki compilation, topic archiving, inventory tracking, dataset manifests, truth-seeking audits, querying, and artifact generation. Ships as a Claude Code plugin, an OpenAI Codex plugin, an OpenCode instruction file, or a portable AGENTS.md for any other LLM. Obsidian-compatible. MIT-licensed. Author: nvk · Source: https://github.com/nvk/llm-wiki · License: MIT ## What it is LLM Wiki is a set of slash commands and a knowledge model that turns any LLM coding agent into a research engine and an append-only, Markdown-native wiki. It runs parallel multi-agent research (5-10 agents from different angles), collects provenance-rich catalogs of discoverable artifacts and examples, captures redacted session context and user-feedback candidates under `.sessions/`, rehydrates compact context for future turns, ingests URLs and files, archives whole topic wikis that should stay preserved but quiet, tracks durable inventory state, indexes large or external datasets with manifests, compiles raw sources into synthesized articles with cross-references and confidence scores, answers questions against the compiled knowledge, and generates artifacts like reports, slides, study guides, and implementation plans. It is inspired by Andrej Karpathy's "LLM wiki" concept (https://x.com/karpathy/status/2039805659525644595). ## Install - Claude Code (native plugin): `claude plugin install wiki@llm-wiki` — best for full agentic research with 200K context. - OpenAI Codex (marketplace plugin): `codex plugin marketplace add nvk/llm-wiki`, then enable in `/plugins` and invoke with `@wiki`. For a local checkout: `./scripts/bootstrap-codex-plugin.sh --scope user --verify`. - OpenCode (instruction file): add `"instructions": ["path/to/llm-wiki/plugins/llm-wiki-opencode/skills/wiki-manager/SKILL.md"]` to `opencode.json`. Web search requires `OPENCODE_ENABLE_EXA=1`. - Pi (instruction file): `pi --instructions path/to/llm-wiki/plugins/llm-wiki-opencode/skills/wiki-manager/SKILL.md` — best for local models (1K system prompt leaves room for wiki skill on 32K context). - Any LLM agent (portable): `curl -sL https://raw.githubusercontent.com/nvk/llm-wiki/master/AGENTS.md > ~/your-project/AGENTS.md` ## Core commands - `/wiki ` — fuzzy intent router (URLs → ingest, questions → query, etc.) - `/wiki init ` — create a topic wiki at `~/wiki/topics//` - `/wiki:research ` — 5 parallel agents; `--plan` (multi-path), `--deep` (8), `--retardmax` (10), `--new-topic`, `--min-time 1h` - `/wiki:research --mode thesis ""` — thesis-driven: evidence for + against → verdict - `/wiki:ingest ` — add sources; `--inbox` processes the inbox - `/wiki:ingest-collection ` — bulk-ingest Git doc repos, BIP proposal sets, MediaWiki dumps/API sites, message archives, or Wayback CDX snapshots - `/wiki:collect ""` — find, deduplicate, and catalog artifacts, examples, resources, media, memes, tools, entities, or source candidates - `/wiki:collect "" --scale tiny|small|medium|large|huge` — control write behavior by operational scale, not just row count - `/wiki:collect "" --media archive|thumbnail|reference` — download bounded originals by default for media-bearing collections; use thumbnails for previews or reference to opt out - `/wiki:collect "" --inventory corpus|records` — create one corpus record for large/media-heavy sets or per-item records for small durable sets - `/wiki:inventory list|add|show|save-view|scan-outputs|migrate-output` — track durable items, source candidates, corpora, entities, watch items, and next actions - `/wiki:dataset list|add|show|profile|sample|scan-outputs|migrate-output` — index large or external data with manifests, samples, profiles, and query recipes without copying the data - `/wiki:archive list|topic|restore|peek` — archive whole topic wikis under `topics/.archive/`, restore them later, or search archived indexes without loading archived articles - `/wiki:session status|disable|enable|capture|list|show|rehydrate|promote` — manage default-on redacted session capture, opt out, rehydrate context, or promote digests into topic raw notes - `/wiki:feedback list|show|capture|promote` — review redacted user-feedback candidates, manually capture feedback, or promote durable lessons into topic raw notes - `/wiki:compile` — raw sources → synthesized articles with cross-refs - `/wiki:query ` — Q&A; `--quick`, `--deep`, `--list`, `--resume`, `--include-archived` - `/wiki:audit` — umbrella trust audit across wiki, outputs, provenance, and fresh research - `/wiki:librarian` — focused wiki maintenance: score articles for staleness and quality - `/wiki:ll` — extract lessons learned from current session into wiki; `--dry-run`, `--rules` - `/wiki:plan ` — wiki-grounded implementation plan; `--format rfc|adr|spec` - `/wiki:output ` — summary, report, study-guide, slides, timeline, glossary, comparison - `/wiki:assess ` — repo vs wiki vs market gap analysis - `/wiki:librarian` — score articles for staleness and quality; `--article ` for single article, `--resume` from checkpoint - `/wiki:lint [--fix|--deep]` — structural and factual health checks - `/wiki:retract` — remove a source and clean up downstream references - `/wiki:project` — group outputs into projects with goals and manifests ## Sessions and feedback - Default-on, redacted operational memory lives under `HUB/.sessions/` or `.wiki/.sessions/` for local project wikis. - Trusted hooks store harness metadata, current directory, git context, small redacted hook events, per-session state JSON, Markdown digests, and feedback candidates; full transcripts are not stored by default. - `session status|list|show|capture` inspects and creates digests; `session disable` opts out by writing `enabled: false`; `session enable` turns capture back on. - `session rehydrate --cwd "$PWD"`, `--session-id`, or `--topic` returns compact context for the next agent turn without bulk-pasting a transcript. - `session promote` and `feedback promote` are the boundary between operational memory and topic knowledge: selected digests or feedback candidates become distilled notes under topic `raw/notes/`. - `feedback list|show|capture|promote` handles corrections, preferences, approvals, and plan acceptance; generic acknowledgements such as `ok`, `thanks`, and `cool` are ignored. ## Trust model `/wiki:librarian` keeps the `wiki/` layer in check. `/wiki:audit` is broader: it can trace outputs through `wiki/` and `raw/`, detect drift, inspect provenance, and do new research when the stored corpus is not enough to decide whether something is trustworthy. ## Architecture (one-liner) Hub at `~/wiki/` is a lightweight registry (`wikis.json`, `_index.md`, `log.md`, optional `.sessions/` including `feedback/`). All active content lives in isolated topic sub-wikis at `~/wiki/topics//`, each with `inbox/`, `inventory/`, `datasets/`, `raw/`, `wiki/{concepts,topics,references}/`, `output/`, plus its own `.obsidian/` vault config. Archived topic wikis live under `~/wiki/topics/.archive//` and are hidden by default. ## Key design properties - Zero runtime dependencies — uses only the host agent's built-in tools. - Dual-linking: `[[wikilink]] + [standard markdown link](path.md)` on every cross-reference — works in Obsidian, Claude Code, GitHub, and plain text editors. - Raw is immutable — sources are never modified once ingested. - Inventory is operational state, not factual evidence — it tracks items, candidates, corpora, watch records, and next actions. - Collect outputs are discovery maps, not evidence — they preserve aliases, found-in-context provenance, media URLs, cached asset paths, hashes, source context, dedupe notes, and inventory recommendations before selected sources are promoted into raw/wiki/inventory/datasets. - Dataset manifests index large/external data — samples, profiles, and query recipes live in the wiki; the underlying data stays where it belongs. - Archive is quiet preservation — old topic wikis move to `topics/.archive/`, remain structurally maintainable, and stay out of default query/compile/research/collect/output context unless explicitly included. - Session capture is operational memory — trusted hooks write redacted JSONL/state and Markdown digests under `.sessions/` by default; `session disable` opts out, `session rehydrate` restores compact context, and promotion into topic wikis is explicit. - Feedback is candidate memory — high-signal corrections, preferences, approvals, and plan acceptance become redacted candidates under `.sessions/feedback/`; generic acknowledgements are ignored and promotion is explicit. - Topic-isolated indexes — no cross-topic noise, but queries peek sibling wikis for overlap. - Configurable hub — store on iCloud, Dropbox, or any custom path via `/wiki config hub-path`; shared hubs prefer portable `hub_path` config and relative `wikis.json` topic paths so they work across machines with different home directories. - iCloud permission diagnostics — if macOS lets Codex stat the configured hub but denies reads or `topics/` listings, the CLI and skill guidance treat it as a launcher privacy-permission issue, not an invalid registry or reason to use a machine-local fallback path. - v0.12.0 feedback curator — redacted feedback candidates under `HUB/.sessions/feedback/`, generic acknowledgement filtering, review/list/show, manual capture, and explicit topic promotion. - v0.11.1 session helper compatibility — automated session capture works on Python 3.9/macOS system Python as well as newer Python runtimes. - v0.11.0 automated session capture — default-on redacted hook checkpoints under `HUB/.sessions/`, `session disable` opt-out, compact rehydration, and explicit topic promotion. - v0.10.1 collector media downloads — `/wiki:collect` downloads bounded public binary media into `output/assets/collect-/` by default, records local paths and hashes in the catalog, and keeps `--media reference` as the no-download opt-out. - v0.10.0 collector catalogs — `/wiki:collect` finds, deduplicates, and catalogs examples, artifacts, media, memes, tools, entities, and source candidates with aliases, found-in-context provenance, scale handling, and media-safe defaults. - v0.9.0 topic archive lifecycle — archive, restore, and peek archived topic wikis while preserving raw sources, compiled articles, outputs, logs, and registry history. - Append-only activity log at `log.md` in every wiki. ## iCloud shared hub notes - Set the hub with `/wiki config hub-path "~/Library/Mobile Documents/com~apple~CloudDocs/wiki"` so each Mac expands `~` locally. - Keep shared `wikis.json` topic paths relative, for example `topics/bitcoin`, rather than absolute `/Users//...` paths. - macOS privacy permissions are per-machine and per-launcher. Grant Full Disk Access or iCloud Drive access to the exact app launching the agent, then restart it. - If Codex is launched over SSH, Terminal.app permissions do not apply; grant access to `/usr/libexec/sshd-session`, `/usr/libexec/sshd-keygen-wrapper`, and optionally `/usr/sbin/sshd`. - Diagnostic pattern: `stat` succeeds for the hub, `wikis.json`, and `topics/`, but reading/listing fails with `Operation not permitted`. That means the path is correct and access is blocked by macOS privacy controls. ## Docs - Home: https://llm-wiki.net/ - Install: https://llm-wiki.net/#install - Quick start: https://llm-wiki.net/#quickstart - Sessions: https://llm-wiki.net/#sessions - Commands reference: https://llm-wiki.net/#commands - Guides: https://llm-wiki.net/#guides - FAQ: https://llm-wiki.net/#faq - README (canonical): https://github.com/nvk/llm-wiki#readme - Releases: https://github.com/nvk/llm-wiki/releases - AGENTS.md (portable): https://raw.githubusercontent.com/nvk/llm-wiki/master/AGENTS.md ## Related - learntoprompt.org (https://learntoprompt.org) — sister site by the same author. Practical guides for AI coding agent setup (Claude Code, Codex, OpenCode, Pi, llama.cpp, ollama), sandboxing with bondage + nono, secret management with envchain-xtra, and prompting workflows. Includes a dedicated llm-wiki guide at https://learntoprompt.org/guides/llm-wiki.html.