akm supports Andrej Karpathy's LLM Wiki pattern: a markdown-based knowledge base that an LLM agent maintains together with a human, on a filesystem it can read and write directly, with no special SDK.
As of 0.9.0 an LLM wiki is a bundle format, not an akm asset type.
The akm wiki command family was removed with the 0.9.0 bundle-adapter
architecture; recognition moved into the first-class LLM Wiki adapter.
A wiki is a directory. Full stop.
<wiki-root>/
schema.md rulebook the agent reads first
index.md catalog of pages, regenerable
log.md append-only activity log
raw/ immutable ingested sources (never edit)
pages/<page>.md agent-authored pages
pages/<topic>/<page>.md optional nesting
Three layers, from Karpathy's gist:
- Raw sources (
raw/) — what you ingest. Articles, papers, transcripts, notes. Immutable. - Wiki pages (
pages/<page>.md, optionally nested) — what the agent writes. Summaries, entity pages, concept pages, FAQs. Cross-referenced viaxrefs:frontmatter; provenance recorded viasources:frontmatter pointing at the cited raw files. - Schema (
schema.md) — the per-wiki configuration: voice, page kinds, contradiction policy, any conventions the agent should follow. akm never touches it.
Karpathy's workflow is a conversation between a human, an agent, and a
filesystem. akm is not that agent. Page writes — create, append, xref,
log — all use the agent's native Read / Write / Edit tools. akm's
job is recognition and discovery: it mounts the wiki, indexes the pages,
and makes them searchable alongside every other asset.
No LLM calls are made anywhere in the wiki surface. No network access.
The LLM Wiki adapter recognizes a wiki deterministically at install
time: a bundle component whose root holds a schema.md plus a
pages/ directory is mounted as an llm-wiki component. From there:
pages/**.mdare indexed as searchable documents; each page's ref isbundle//conceptId, where the conceptId is the root-relative path minus.md(a page atpages/attention.mdin bundleresearch-wikiisresearch-wiki//pages/attention).raw/**.mdare indexed — as first-class, addressable, searchablewiki-sourcedocuments (notpage-type items; a ref looks likebundle//raw/<slug>), so citations resolve and raw content is discoverable by search too.schema.md,index.md, andlog.mdare structural and are never indexed as a concept.xrefs:frontmatter becomes cross-reference edges;sources:frontmatter becomes citation edges back to raw files.
akm bundle add github:team/research-wiki # install a wiki bundle (or point at a local dir)
akm search "attention" # pages rank alongside all other indexed content
akm show research-wiki//pages/attention # read a page by ref
akm show research-wiki//pages/attention#historyTo build a new wiki, create the directory shape above by hand (or have
your agent do it — schema.md plus an empty pages/ is enough for
recognition), then add it as a bundle. Ingesting raw sources, writing
pages, and maintaining index.md/log.md are the agent's job, guided
by schema.md.