llmwiki

MCP serverDocs & knowledge

Lets your agent compile documents into a searchable wiki with citations and answer questions from it.

Unavailable. This server has no hosted endpoint yet, so ahel can't serve it.

Add to setup to save this item as a reference. ahel cannot run it, and signing in will not install it.

About this server

Compile documents into a cited knowledge wiki. Retrieve evidence, query, and review via local MCP.

Getting started

  1. Save this item in Your setup as a reference.
  2. Read the source or reference documentation for its setup requirements. Saving it here does not connect it to your AI.
  3. Check this page for availability before trying to install it through ahel.

From the project's README

As published by atomicstrata/llm-wiki-compiler in README.md.

New in 1.4.0 — Review answers before publishing.

  • Choose what becomes part of your wiki. Review generated answers and check their citations before saving them as published pages.
  • Approve pages together. Review a batch of generated pages and publish the ones you choose in one operation.
  • See the pages behind an answer. Follow citations back to your wiki and see which pages were used to answer your question.

Release notes · Upgrade guide · Install llmwiki

New in 1.3 — A fresh look for your wiki.

Meet Scientific Clay, with soft surfaces and rounded typography, and Minimal, which follows your system’s light or dark setting. Switch instantly between four themes, including Nebula Light and Dark.

The same page in a demonstration wiki. Click either screenshot for a closer look.

Recursive source folders, path exclusions, project-specific compile instructions, and storage for larger embedding indexes.

New in 1.2 — Explore your records and their evidence.

Browse profile-defined categories, declared fields, connected records, provenance, and supporting source passages in the local viewer.

New in 1.1 — Publish and share domain templates.

Create signed template distributions, discover them through explicitly trusted catalogs, and install or update them with compatibility checks.

New in 1.0 — Configurable Lifecycle Profiles.

Build a knowledge system around the way you work. Define your records, relationships, review gates, and workflows in one validated profile. Start with AutoSci for research or Newsroom for editorial work, or create your own.

Explore Configurable Lifecycle Profiles →


What llmwiki does

Compile raw sources into an interlinked, citation-traceable markdown wiki that agents and humans can browse, query, lint, export, and reuse. The default profile preserves the classic concepts-and-queries layout; optional profiles add domain-specific types and workflows without adding domain branches to the compiler.

llmwiki implements the LLM Wiki pattern: instead of re-discovering knowledge from raw files at query time, compile it once into durable pages that accumulate structure, provenance, review state, and retrieval metadata over time.

When to use this repo

Use llmwiki when you need a persistent knowledge base from raw material:

  • Compile papers, notes, READMEs, transcripts, PDFs, images, or web pages into typed wiki pages.
  • Give agents a stable, citation-aware context pack instead of a pile of loose files.
  • Keep generated knowledge auditable with source citations, review queues, freshness checks, and quality gates.
  • Browse the result locally, query it from the CLI, expose it over MCP, or embed it through the SDK.
  • Exchange compiled knowledge with other tools using Open Knowledge Format (OKF), JSON, JSON-LD, GraphML, Marp, and llms.txt.

Do not use llmwiki as a general static-site generator, a heavy ontology database, or a replacement for ad-hoc search over fast-changing raw logs. It is strongest when source knowledge is worth compiling, reviewing, and reusing.

What you get

  • Compiled wiki, not chunks. A two-phase LLM pipeline extracts concepts, then generates typed pages: concept, entity, comparison, and overview.
  • Configurable Lifecycle Profiles. A fail-closed .llmwiki/profile.json can declare entity schemas, typed relations, lifecycle state machines, transition requirements, workflows, artifacts, connectors, content tiers, and retrieval policy.
  • Installable domain templates. llmwiki template init autosci creates a research project with papers, ideas, experiments, manuscripts, evidence artifacts, workflows, and Crossref import. newsroom demonstrates the same machinery for editorial work.
  • Runtime trust gates. Relation, evidence, artifact, and human/agent gates are enforced by the write path rather than left as prompt conventions; standing lint detects drift after the fact.
  • Citation-traceable output. Paragraphs and claims cite source files and line ranges, and llmwiki lint validates the links.
  • Hybrid retrieval. Semantic chunk search, BM25 reranking, and wikilink graph expansion build compact evidence packs for queries and agents.
  • Local viewer. llmwiki view opens a read-only browser UI with search, page metadata, graph exploration, source-freshness badges, and citation chips.
  • Review policy. Generated pages can be auto-held for review when confidence, contradiction, schema, or provenance rules trip.
  • Freshness repair. llmwiki lint and llmwiki next surface stale/orphaned pages; llmwiki refresh --stale repairs changed knowledge without compiling unrelated new sources.
  • Eval harness. llmwiki eval reports health score, a per-page health distribution that flags the worst pages, wikilink-graph health, citation coverage/precision, corpus stats, regression deltas, and optional judge-model citation support.
  • MCP server. llmwiki serve exposes ingest, compile, query, lint, read, status, eval, context-pack, and OKF exchange tools to MCP-compatible agents.
  • SDK. createWiki({ root }) drives ingest, compile, query, context, status, export, eval, and OKF import/export from TypeScript without shelling out.
  • Open Knowledge Format exchange. Export and import OKF bundles for portable, markdown-native knowledge exchange. External OKF imports are staged through the review queue by default; trusted bundles can be written live explicitly.
  • Other portable exports. Export JSON, JSON-LD, GraphML, Marp slides, and llms.txt for downstream systems.
  • Provider portable. Anthropic, Claude Agent SDK local login, OpenAI Codex CLI local login, OpenAI-compatible servers, Ollama, GitHub Copilot, Atlas Cloud, OrcaRouter, and local OpenAI-compatible runtimes.

Configurable Lifecycle Profiles (CLP)

CLP turns llmwiki's knowledge compiler into a reusable substrate for domain-specific knowledge systems. A validated .llmwiki/profile.json is the single contract for:

  • typed entities, fields, and directed relations;
  • lifecycle states, transition evidence, and trust gates;
  • multi-stage workflows and declared actions;
  • hash-pinned artifacts and first-party connector bindings; and
  • content tiers and retrieval behavior.

These rules are enforced by the runtime, not left as prompt conventions. The CLI, SDK, MCP server, viewer, context builder, lint, status, export, and OKF exchange surfaces all operate from the same profile contract. Invalid profiles and writes that bypass a declared gate fail closed.

CLP is backward-compatible by construction: a project without .llmwiki/profile.json uses the built-in default concepts-and-queries profile and preserves the pre-1.0 behavior. You can start three ways — scaffold your own profile, install a built-in or local template, or install a signed template from a trusted tap:

# author your own profile, one entity type at a time
llmwiki profile init research --entity paper

# or install a built-in or local declarative template
llmwiki template list
llmwiki template inspect autosci
llmwiki template init autosci

llmwiki profile validate
llmwiki workflow list

autosci is a practical research system with papers, ideas, experiments, manuscripts, evidence artifacts, workflows, and Crossref ingestion. newsroom applies the same generic machinery to articles, desks, bylines, and editorial workflows. Templates contain configuration and examples, never executable plugin code.

Templates can also be distributed securely. Publishers build signed, offline distributions with llmwiki template publish — Ed25519 signing, key rotation, and package revocation — and verify them with template publish verify. Consumers add explicitly trusted taps, discover and inspect signed catalogs, and install or update templates with continuity, revocation, and compatibility checks enforced under lock.

Read the CLP concept guide, follow the AutoSci research workflow, or explore the Newsroom editorial workflow.

Karpathy's LLM Wiki pattern

Andrej Karpathy described the LLM Wiki pattern as a way to turn raw material into compiled knowledge that future agents can reuse. llmwiki is a concrete compiler for that pattern.

The key shift is moving work from query time to compile time. Traditional RAG repeatedly retrieves raw chunks and asks the model to reconstruct relationships for each question. llmwiki first turns sources into typed, interlinked pages with citations, metadata, and review state. Queries, context packs, exports, and MCP tools then operate over that compiled artifact.

That makes llmwiki useful when knowledge should compound: concepts shared across sources become one page, saved answers become future context, stale pages can be detected and repaired, and agents can consume a stable evidence pack instead of re-reading the same raw files from scratch.

See docs/concepts/karpathy-pattern.mdx for the deeper explanation.

Agent decision guide

Use llmwiki for a reusable corpus of documents, research, or project knowledge. Start with wiki_status and get_context_pack when you need evidence for your own reasoning. A one-off file read or live web search does not need a wiki.

The npm package includes an Agent Skill. See the MCP setup guide for installation. The MCP Registry identifier is io.github.atomicstrata/llmwiki; the npm package is llm-wiki-compiler and the executable is llmwiki.

Choose the entry point that matches the task:

GoalUse
Create a wiki from one source and inspect itllmwiki quickstart <source>
Start a typed research or editorial projectllmwiki template list, then llmwiki template init autosci|newsroom
Inspect or validate the active domain contractllmwiki profile show and llmwiki profile validate
Run a declared lifecycle workflowllmwiki workflow list, then llmwiki workflow start <id>
Write or verify a profile-declared artifactllmwiki artifact write ... and llmwiki artifact verify <ref>
Import external records through a connectorllmwiki connector list, then llmwiki connector run <id> --input key=value
Add more files or URLsllmwiki ingest <url-or-file>
Compile or recompile changed sourcesllmwiki compile
Add project-specific writing guidancellmwiki compile --instructions ./SOUL.md; pass the option on each instructed compile
Remove a bad source and its derived pagesllmwiki rm <source>
Hold generated pages for human approvalllmwiki compile --review or review policy config
Ask grounded questionsllmwiki query "question"
Save an answer back into the wikillmwiki query "question" --save
Build an evidence pack for another agentllmwiki context "<task>" --json or MCP get_context_pack
Inspect the compiled knowledge basellmwiki view --open
Check broken links, citations, confidence, freshness, and qualityllmwiki lint and llmwiki eval
Repair stale compiled pagesllmwiki refresh --stale --dry-run, then llmwiki refresh --stale
Drive llmwiki from an agentllmwiki serve --root <project>
Drive llmwiki from TypeScriptcreateWiki({ root })
Export for another systemllmwiki export --target <format>
Export an Open Knowledge Format bundlellmwiki export --target okf --out <dir>
Import an Open Knowledge Format bundlellmwiki import --okf <dir> --dry-run, then review/approve

Quick start

npm install -g llm-wiki-compiler

export ANTHROPIC_API_KEY=sk-...
# or choose another provider:
# export LLMWIKI_PROVIDER=openai
# export OPENAI_API_KEY=sk-...

llmwiki quickstart ./notes.md
llmwiki query "what are the key ideas?"
llmwiki view --open

quickstart ingests one source, compiles pages, and opens the viewer. Inside an existing project, run llmwiki next when you want the safest next action.

To start with a domain model instead of the default concepts-and-queries layout:

mkdir research-wiki && cd research-wiki
llmwiki template inspect autosci
llmwiki template init autosci
llmwiki profile validate
llmwiki workflow list

Template installation is for a new or empty typed project. It materializes the chosen profile into .llmwiki/profile.json; normal project loading never depends on a template registry or lockfile.

Demo

Try it on any article or document:

mkdir my-wiki && cd my-wiki
llmwiki quickstart https://en.wikipedia.org/wiki/Andrej_Karpathy
llmwiki query "What terms did Andrej coin?"

The examples/basic/ directory includes a small pre-generated wiki you can inspect without an API key.

Core commands

CommandWhat it does
llmwiki ingest <url-or-file>Fetch a URL or copy a local file into sources/.
llmwiki ingest-session <path>Import exported Claude, Codex, or Cursor sessions into sources/.
llmwiki quickstart <source>Ingest, compile, and optionally open the viewer in one step.
llmwiki compileIncrementally extract concepts and generate wiki pages.
llmwiki rm <source> [--dry-run]Delete a source and the concept pages derived exclusively from it.
llmwiki refresh --stale [--dry-run]Recompile changed owners of stale pages and clean selected orphaned ownership.
llmwiki template list|inspect|initDiscover and install validated declarative profile templates.
llmwiki profile init|show|validate|diffCreate a minimal profile, inspect it, validate it, or assess profile changes.
llmwiki workflow ...Discover and drive profile-declared workflows, stages, gates, and outputs locally, retaining run state between invocations.
llmwiki artifact write|verifyWrite trusted profile-declared artifacts and verify hash-pinned references.
llmwiki connector list|runDiscover first-party connectors and stage external records for review.
llmwiki review list/show/approve/rejectInspect and manage held candidates.
llmwiki query "question" [--save]Ask questions against the compiled wiki, optionally saving the answer.
llmwiki context "<prompt>" --jsonBuild a citation-aware evidence pack for agents.
llmwiki view [--open]Start the read-only local browser viewer.
llmwiki status [--json]Report page/source counts, stale and orphaned pages, pending work, and state health.
llmwiki lintValidate wiki structure, citations, links, metadata, and freshness.
llmwiki eval [--suite fast|full]Measure wiki quality and optional citation support.
llmwiki export --target <format>Export the wiki to portable formats, including Open Knowledge Format (okf).
llmwiki import --okf <dir> [--dry-run] [--trusted]Import an Open Knowledge Format bundle, staged for review by default.
llmwiki serve --root <dir>Start the MCP server.

Full command docs live in docs/cli/.

Open Knowledge Format

llmwiki is an Open Knowledge Format (OKF) producer and consumer. OKF is a Google Cloud initiative for sharing compiled knowledge as portable markdown files with structured frontmatter.

llmwiki export --target okf --out ./dist/okf
llmwiki import --okf ./dist/okf --dry-run
llmwiki import --okf ./dist/okf

OKF import is intentionally review-first: untrusted bundles become review candidates, not live wiki pages. The importer preserves foreign OKF metadata, stores llmwiki provenance under x-llmwiki, and re-exports imported pages honestly after local edits, including safe original nested paths.

See docs/guides/open-knowledge-format.mdx, docs/cli/export.mdx, and docs/cli/import.mdx.

What llmwiki creates

A project has raw inputs in sources/, compiled markdown in wiki/, and compiler state under .llmwiki/:

sources/
  raw source files
wiki/
  concepts/      compiled pages
  queries/       saved answers
  <entity>/      profile-declared typed pages
  graph/         typed relation and audit-event stores
  outputs/       derived workflow projections
  index.md       generated TOC
.llmwiki/
  profile.json   active domain contract
  template-lock.json  advisory install provenance
  config.json    review policy and source selection
  schema.json    page-kind/cross-link policy
  state.json     source hashes and ownership
  candidates/    held review candidates
  workflows/     signed workflow run state
  eval/          quality history and thresholds
artifacts/       hash-pinned profile-declared files and manifests
log.md           activity journal

Compiled pages are plain markdown with YAML frontmatter, plus enough metadata for agents to reason about citations, freshness, confidence, contradictions, and review state. See docs/concepts/wiki-model.mdx.

Sources are top-level Markdown files by default. Opt into nested source folders and exclusions in project config. Excluding a compiled source retires its contribution on the next ordinary compile without deleting the source file.

Agent integration

MCP

Run:

llmwiki serve --root /path/to/wiki-project

MCP clients can ingest sources, compile, query, search pages, read pages, lint, run eval, inspect status, request context packs, and exchange OKF bundles. Read-only tools work without provider credentials; LLM-backed tools validate provider credentials at call time. The run_eval tool runs its fast suite without a provider; its full suite (which LLM-judges citation support) requires one.

See docs/guides/mcp-agent-integration.mdx.

SDK

import { createWiki } from "llm-wiki-compiler";

const wiki = createWiki({ root: "/path/to/wiki-project" });
await wiki.ingest({ source: "./notes.md" });
await wiki.compile();
const answer = await wiki.query({ question: "What changed?" });

See docs/guides/sdk.mdx. llm-wiki-compiler is the supported entry point; its scoped supporting packages are implementation dependencies. The local workflow engine and an application's own coordinator are two tiers, not a migration path: llmwiki workflow runs a profile-declared workflow through local invocations with persisted state between sessions. An external coordinator calls the same SDK without using local workflow execution methods; the supporting engine dependency remains installed. See SDK package selection, SDK upgrade notes, and When to use the local engine.

Configuration

Minimum requirement: Node.js 24 or newer.

The default provider is Anthropic:

export ANTHROPIC_API_KEY=sk-...

Provider selection is environment-driven:

ProviderTypical setup
AnthropicANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN
Claude Agent SDKLocal Claude Code login, LLMWIKI_PROVIDER=claude-agent
OpenAI Codex CLILocal Codex login / ChatGPT subscription, LLMWIKI_PROVIDER=codex-agent; explicit embedding provider required
OpenAI-compatibleLLMWIKI_PROVIDER=openai, OPENAI_API_KEY, optional OPENAI_BASE_URL
OllamaLLMWIKI_PROVIDER=ollama, OLLAMA_HOST
GitHub CopilotLLMWIKI_PROVIDER=copilot, GITHUB_TOKEN=$(gh auth token)
Atlas CloudLLMWIKI_PROVIDER=atlascloud, ATLASCLOUD_API_KEY
OrcaRouterLLMWIKI_PROVIDER=orcarouter, ORCAROUTER_API_KEY

See docs/configuration/providers.mdx and docs/configuration/environment-variables.mdx.

Quality and safety model

llmwiki is designed for auditable generated knowledge:

  • Review before write. Use compile --review or .llmwiki/config.json review policy to hold risky pages as candidates.
  • Profile floors are runtime checks. Field contracts, lifecycle transitions, relation counts, evidence, and artifact requirements are enforced across page, lifecycle, workflow, import, and approval write surfaces.
  • External connector data is untrusted. First-party connectors use confined fetches and stage fenced review candidates; approval is pinned to the exact body the operator reviewed.
  • Artifacts are content-addressed evidence. Artifact reads and writes are path-confined, size-capped, schema-checked, and verified against hash-pinned references.
  • Fail-closed config. Invalid review-policy config aborts compile instead of silently disabling review.
  • Source confinement. Source snippets and import/export paths are confined to the project.
  • Freshness is explicit. Pages can be fresh, stale, orphaned, or unverified; stale pages are flagged and repairable. The JSON export is active-page-only: it carries freshness for live pages (fresh/stale/unverified); computed-orphaned pages (all sources deleted) surface only as lint and viewer signals and are dropped from the export.
  • Imported compiled knowledge is staged by default. External bundles go through the review queue unless explicitly trusted.
  • CI gates are supported. llmwiki lint and llmwiki eval can enforce quality thresholds.

See docs/configuration/review-policy.mdx, docs/troubleshooting/stale-pages.mdx, and docs/guides/ci-quality-gates.mdx.

Scale and what works

llmwiki is still early software, but it is no longer a toy pipeline for a handful of notes.

Shortened here. Read the whole README on GitHub.

Signals

GitHub stars
2k
Forks
232
Last commit
Oct 2026
Weekly downloads
3k
Weekly_downloads
2k weekly_downloads
Advanced
Delivery
llmwiki MCP server → your ahel connector (mcp.ahel.ai) → your AI.
Item type
mcp-server
Key
io-github-atomicstrata-llmwiki
Source
github.com/atomicstrata/llm-wiki-compiler