Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@GeekTrainer
GeekTrainer / Dockerfile.sandbox
Last active April 27, 2026 08:58
Docker Sandbox setup for GitHub Copilot CLI — reusable template with pre-installed deps on ext4
# Base image for Copilot CLI sandbox
FROM docker/sandbox-templates:copilot
USER root
# CUSTOMIZE: Install system-level dependencies your project needs.
# Examples:
# Python/Flask:
# RUN apt-get update && apt-get install -y --no-install-recommends \
# python3-flask python3-sqlalchemy && rm -rf /var/lib/apt/lists/*
@rohitg00
rohitg00 / llm-wiki.md
Last active April 27, 2026 08:55 — forked from karpathy/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

What the original gets right

The core insight is correct: stop re-deriving, start compiling. RAG retrieves and forgets. A wiki accumulates and compounds. The three-layer architecture (raw sources, wiki, schema) works. The operations (ingest, query, lint) cover the basics. If you haven't read the original, start there.

@dabit3
dabit3 / pi_tutorial.md
Last active April 27, 2026 08:54
How to Build a Custom Agent Framework with PI: The Agent Stack Powering OpenClaw

PI is a TypeScript toolkit for building AI agents. It's a monorepo of packages that layer on top of each other: pi-ai handles LLM communication across providers, pi-agent-core adds the agent loop with tool calling, pi-coding-agent gives you a full coding agent with built-in tools, session persistence, and extensibility, and pi-tui provides a terminal UI for building CLI interfaces.

These are the same packages that power OpenClaw. This guide walks through each layer, progressively building up to a fully featured coding assistant with a terminal UI, session persistence, and custom tools.

By understanding how to compose these layers, you can build production-grade agentic software on your own terms, without being locked into a specific abstraction.

Pi was created by @badlogicgames. This is a great writeup from him that explains some of the design decisions made when creating it.

The stack

@shuuyu
shuuyu / feather.md
Last active April 27, 2026 08:53
Feather Client and my official stances behind it.

Feather Client

If you do not want to read the rest of this gist, I will simply provide you with a short and thoughtful summary, that being:

Feather client will never be supported due to the nature of it breaking certain mods, us having to deal with the headache called support, and the many frustrations that come with adding it as a supported platform. Due to this, we strongly recommend users not use Feather Client for the purpose of both the developer and your sake. While you may like the features, developers will hate the burden that comes with maintaining their mod for the client.

I have been dealing with modding support for a while now (Almost precisely 2 years), so I have some first hand experiences with the issues caused by this client. While it may not cause issues for you, it causes a lituny of issues for the developer(s) working behind the mod.