- Mnemon — Persistent Layered Memory for AI Agents
Mnemon — Persistent Layered Memory for AI Agents
Your AI agent forgets everything after each session. Mnemon fixes that.
It gives any MCP-compatible client — Claude Code, Cursor, Windsurf, or your own — a structured long-term memory backed by a single SQLite database on your machine. No API keys, no cloud, no telemetry.
Why Layered Memory?
Flat key-value stores treat "what happened yesterday" the same as "never commit without tests." Different kinds of knowledge have different lifetimes and access patterns.
| Layer | What it stores | Lifetime |
|---|---|---|
| Episodic | Events, sessions, journal entries | Decays (30-day half-life) |
| Semantic | Facts, preferences, relationships | Stable |
| Procedural | Rules, workflows, conventions | Rarely changes |
| Resource | Reference material, book notes | Decays slowly (90 days) |
7 MCP Tools
- memory_add — Store a memory with layer, entity, confidence, importance, and optional TTL
- memory_search — Full-text or exact search with filters by layer, entity, date, scope, confidence
- memory_update — Update in-place or create a versioned replacement (superseding chain)
- memory_delete — Delete a memory; re-activates predecessor if any
- memory_inspect — Get layer statistics or trace a single memory's version history
- memory_export — Export to JSON, Markdown, or Claude-md format
- memory_health — Run diagnostics and optionally garbage-collect expired entries
Search
FTS5 with BM25 ranking. Multi-word queries use AND with progressive OR fallback. Snowball stemmer for English and Russian morphology.
Scoring: bm25 × (0.3 + 0.7 × importance) × decay(layer)
Optional vector search via OpenAI or Ollama embeddings (hybrid mode with Reciprocal Rank Fusion).
Fact Versioning
Knowledge evolves. Mnemon chains versions — search always returns the latest, memory_inspect reveals full history.
Install
npm install -g mnemon-mcp
Requirements
Node.js ≥22. No external services, no API keys, no cloud.
Server Config
{
"mcpServers": {
"mnemon-mcp": {
"command": "mnemon-mcp"
}
}
}