Mimir documentation
Mimir is long-term memory for coding agents. It stores what an agent learned as a tree of paths in your own Postgres, gives back one line per memory at session start, and searches the full text when the agent asks a question.
It is one container and one database. Agents reach it over MCP, or over a small REST API; both use the same bearer token and both write the same audit row. There is no hosted service behind it — the model calls go straight from your install to the provider you chose, with your key.
Why “Mimir”
Mímir was the Norse god whose well held wisdom and memory; Odin traded an eye for a single draught from it. The name is the same word as memory and remember — and a memory worth an eye is the right standard for one your agents drink from. The mark is that eye in the well, with an M in the pupil.
The loop it fits into
memory_digest what do I already know about this repo?
memory_search find the memory about token rotation
memory_write remember that deploys run from mainAn agent calls the digest once at session start, searches before re-deriving something the project already knows, and writes when it learns something durable: a convention, a gotcha, a decision and its reason. The OpenCode plugin does the first call for it; every other agent is configured with the same two values and told the same habit.
What is in the box
- A store, not a chat log — projects, paths, 20 versions per path, soft delete, restore.
- Hybrid search — PostgreSQL full-text plus pgvector, fused by reciprocal rank fusion, with a path prefix to scope it. Keyword search works with no model configured at all.
- Your models — DeepSeek, OpenCode, Ollama, Octen, Mistral or any OpenAI-compatible endpoint, per person for chat and install-wide for embeddings. See Providers and embeddings.
- A web app — browse the tree, read a memory, diff its versions, manage members, and see what the agents have been writing.
- Operations — users, teams, grants, MFA, an IP allowlist, an audit log, encrypted scheduled backups, and a usage page that shows what the model calls cost.
- A localised interface — English, Danish and German, per account for the app and by URL for the public pages.
Start here
- Self-hosting — one container, one database, five minutes.
- How Mimir works — projects, paths, versions, digest, search, teams and audit.
- Connect over MCP — the endpoint and the token an agent needs.
- Per-agent setup — copy-paste configs for OpenCode, Claude Code, Codex and the rest.
- HTTP API — the same operations without MCP, with request and response examples.