llm-wiki/README.md
2026-06-16 16:04:26 +00:00

71 lines
2.4 KiB
Markdown

# LLM Wiki by Karpathy — Docker / Portainer Deployment
A Docker-based deployment of [Andrej Karpathy's LLM Wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f).
> **A persistent, compounding knowledge base maintained by LLM agents.**
> You curate sources and ask questions — the LLM does all the bookkeeping.
## Architecture
```
llm-wiki/
├── docker-compose.yml # Portainer-compatible stack
├── mkdocs.yml # MkDocs configuration (nav, theme, plugins)
├── .env.example # Environment variables
├── docs/docs/
│ ├── index.md # Home page
│ ├── wiki/ # LLM-maintained content pages
│ │ ├── index.md # Wiki index
│ │ ├── entities/ # Entity pages (people, places, systems)
│ │ ├── concepts/ # Concept pages
│ │ ├── comparisons/ # Comparison pages
│ │ └── syntheses/ # Integrated overviews
│ ├── sources/ # Ingested source summaries
│ ├── raw/ # Raw source files (immutable)
│ ├── schema/ # AGENTS.md (schema for the LLM agent)
│ └── log.md # Append-only changelog
└── schema/
└── AGENTS.md # Master schema file (paste to your LLM agent)
```
## Deployment
### Portainer (recommended)
1. Copy the `docker-compose.yml` content
2. Portainer → Stacks → Add Stack → **Web Editor**
3. Paste the compose content
4. Stack name: `llm-wiki`
5. Environment variables (optional):
- `WIKI_PORT=8787`
6. Click **Deploy the stack**
### Docker Compose CLI
```bash
cp .env.example .env
docker compose up -d
```
Then visit **http://<host>:8787**
## How to Use
### 1. Add content
Drop markdown files into `docs/docs/raw/` — articles, notes, papers, etc.
### 2. Tell your LLM agent
Give your LLM agent (Hermes, Claude Code, Codex) the AGENTS.md schema:
> "Here is my LLM Wiki schema: [paste schema/AGENTS.md]. Please read raw/ and ingest the new sources."
### 3. Explore
Browse the wiki at http://<host>:8787 — search, follow links, see the structure grow.
### 4. Lint
Periodically ask your agent to health-check the wiki for contradictions, orphans, and gaps.
## Credits
- **[Andrej Karpathy](https://karpathy.ai/)** — original LLM Wiki concept
- **[MkDocs Material](https://squidfunk.github.io/mkdocs-material/)** — wiki viewer theme