Understory
A self-hosted AI agent memory server stores linked Markdown notes, connects through MCP, and works with local llama.cpp models or cloud APIs.
Understory gives AI agents persistent knowledge across sessions in Markdown files you can read, edit, and track in Git. It's for people who want their agents' memory accessible outside a chat history.
- Linked memory: Agents add knowledge to existing concepts or create related notes, connect them to other concepts, and replace conflicting facts in place.
- MCP access: Claude Code, Claude Desktop, and compatible clients can query and update memory, with a fresh overview of its contents at the start of each session.
- Browser and graph views: You can browse notes and their connections, inspect update logs, and chat with the memory agent through a web interface.
- Query replay and maintenance: Recorded paths show what an agent searched, read, and changed; maintenance checks find disconnected concepts and broken links for the agent to repair.
Understory runs locally or on your own server, including in Docker, and uses the Apache 2.0 license. Its notes follow the Open Knowledge Format for portability across tools.
Model processing can use a local llama.cpp server, including through llama-swap, or OpenAI-compatible and Anthropic-compatible APIs such as DeepSeek, OpenAI, Groq, OpenRouter, and Anthropic. Memory files stay on your storage; choosing a cloud API sends model requests to that provider. The server is open by default, with optional token authentication for its HTTP interfaces.