← Back to Plugins
Tools

Llm Wiki

Asubiii By Asubiii 👁 6 views ▲ 0 votes

Karpathy-style LLM-maintained personal knowledge wiki plugin for OpenClaw

GitHub

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

Loading comments...