Tools
Llm Wiki
Karpathy-style LLM-maintained personal knowledge wiki plugin for OpenClaw
README
# LLM Wiki Plugin
A Karpathy-style LLM-maintained personal knowledge wiki for your OpenClaw agent. Build a living, compounding knowledge base from any set of sources โ papers, articles, repos, meeting notes, datasets โ without the overhead of RAG.
## The Idea (Karpathy's Pattern)
Instead of retrieving and re-deriving from raw documents at query time, an LLM incrementally builds and maintains a persistent wiki โ a structured set of interlinked markdown files. Each ingest operation transforms a raw source into structured knowledge: a source summary, concept pages, entity pages, and cross-links. Over time, the wiki compounds. Queries are fast because the knowledge is already organized.
The key insight: **compounding knowledge beats repeated retrieval.**
## Components
| Skill | Trigger | What it does |
|-------|---------|-------------|
| `wiki-init` | "start a new wiki", "initialize my knowledge base" | Bootstraps directory structure, schema, index, and log |
| `wiki-ingest` | "ingest this source", "add this to my wiki" | Transforms raw source โ structured wiki pages with backlinks |
| `wiki-query` | "what does my wiki say about X", "query my wiki for Y" | Answers questions from compiled wiki pages with citations |
| `wiki-lint` | "audit my wiki", "find contradictions", "health check" | Detects contradictions, stale content, orphaned pages, broken links |
| `wiki-update` | "update my wiki", "correct X in my wiki", "fix stale content" | Revises pages with diffs, sweeps for related stale claims, logs all changes |
## Wiki Structure
```
your-wiki/
โโโ raw/ # Immutable source files โ never modified
โโโ wiki/
โ โโโ concepts/ # One page per key concept
โ โโโ entities/ # One page per person, tool, paper, project, etc.
โ โโโ topics/ # Thematic groupings you define
โ โโโ sources/ # One summary page per ingested source
โโโ index.md # Table of contents โ all pages reachable from here
โโโ log.md # Append-only operation log
โโโ SCHEMA.md # Governs how the wiki is operated
```
## Recommended Workflow
1. Run `wiki-init` once to scaffold your wiki for a domain.
2. Drop source files into `raw/` and run `wiki-ingest` for each one.
3. Use `wiki-query` anytime you want to ask a question.
4. After every ~10 ingest operations, run `wiki-lint` to catch issues.
5. Use `wiki-update` to fix lint issues or apply corrections.
## Setup
No external services or environment variables required. The wiki is a directory of markdown files on your local machine. Just tell the agent where your wiki root is when you run any skill.
## Credits
Based on [Andrej Karpathy's LLM Wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f).
tools
Comments
Sign in to leave a comment