A pattern for building persistent knowledge bases using LLMs.
This is an idea file, designed to be copied into your own LLM agent (OpenAI Codex, Claude Code, OpenCode, Pi, etc.). Its purpose is to communicate the architecture, while leaving implementation details to the agent and the user.
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 rediscovers knowledge from scratch on every question. Nothing accumulates.