mimir
Mimir is a local-first, MCP-native persistent memory engine for AI agents, offering 43 tools across entity storage, search, knowledge graphing, journaling, state management, and lifecycle management — running as a single zero-dependency Rust binary with optional AES-256-GCM encryption, bearer token auth, and multi-transport support (stdio, SSE, HTTP).
Entity CRUD & Storage
Store/update entities (
mimir_remember) — idempotent key-value memory with categories, tags, importance, encryption, and workspace scopingSearch memories (
mimir_recall) — FTS5 keyword, dense vector, or hybrid (RRF) search with filters, query expansion, and recency-aware rankingProactive recall (
mimir_recall_when) — surface memories whose triggers match the current task contextFetch by ID (
mimir_get_entity), time-travel queries (mimir_as_of), and soft-delete (mimir_forget)
Search & RAG
Natural language Q&A (
mimir_ask) — RAG-style question answering over stored memories via a configured LLMGenerate/store dense vector embeddings (
mimir_embed) via Ollama or OpenAI-compatible endpointsSession context injection (
mimir_context) — pre-formatted markdown block of top entities for agent contextIngest external connectors (
mimir_ingest— GitHub issues, file watcher), local documents (mimir_ingest_file— text, markdown, DOCX, PDF), and extract structured knowledge (mimir_extract) via rule-based heuristics
Knowledge Graph
Create typed relationships (
mimir_link), remove them (mimir_unlink), and traverse the graph to configurable depth (mimir_traverse)
Journal & Audit Trail
Append structured events (
mimir_journal) — decisions, observations, actions, errors with actor attributionQuery by time range, event type, or category (
mimir_timeline)
State Management
Key-value store with optional TTL expiration (
mimir_state_set,mimir_state_get,mimir_state_delete,mimir_state_list)
Memory Lifecycle
Ebbinghaus decay scoring (
mimir_decay), bulk pruning (mimir_prune), compaction (mimir_compact), permanent purge with VACUUM (mimir_purge), and autonomous grooming (mimir_cohere,mimir_autocohere)
Quality & Conflict Management
Assign quality scores (
mimir_score), detect contradicting entities (mimir_conflicts), capture corrections for agent learning (mimir_correct), and mark superseded facts (mimir_supersede)
Vault & Federation
Export to Obsidian-compatible markdown (
mimir_vault_export), import back (mimir_vault_import), federate entities between workspaces (mimir_federate), share individual entities (mimir_share), and discover workspaces (mimir_workspace_list)
Metrics, Ops & Learning
Health check (
mimir_health), database statistics (mimir_stats), performance benchmarking (mimir_bench), LLM session synthesis for agent self-improvement (mimir_synthesize), database maintenance — dedup, orphan detection, VACUUM, FTS5 reindex (mimir_maintenance,mimir_reindex), and schema migration (mimir_migrate)
Perseus Vault
Persistent Memory for AI Agents — MCP-Native. Local-First. Zero Dependencies.
Perseus Vault is a single Rust binary that gives AI agents durable memory across sessions. One binary. One file. No Docker. No Postgres. No cloud. Just persistent memory that works with any MCP host.
One-Line Install
curl -sSf https://raw.githubusercontent.com/Perseus-Computing-LLC/perseus-vault/main/scripts/install.sh | shThat's it. Perseus Vault is installed to ~/.local/bin/perseus-vault. Start it:
perseus-vault serve --db ~/.mimir/data/perseus-vault.dbmacOS note. On Apple Silicon, an unsigned binary is killed on launch (
Killed: 9, no output) by the OS binary policy — even with no quarantine attribute. The installer ad-hoc code-signs Perseus Vault for you. If you build or copy the binary yourself (cargo build --release && cp target/release/perseus-vault ~/.cargo/bin/), sign it once after each rebuild:codesign --sign - "$(command -v perseus-vault)"
Connect any MCP host (Claude Desktop, Cursor, Hermes Agent, Perseus, etc.):
{
"mcpServers": {
"perseus-vault": {
"command": "perseus-vault",
"args": ["serve", "--db", "~/.mimir/data/perseus-vault.db"]
}
}
}Related MCP server: mesh-memory
30-Second Quickstart
# Start Perseus Vault
perseus-vault serve --db memory.db &
sleep 1
# Remember a fact (via MCP JSON-RPC on stdio)
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"mimir_remember","arguments":{"category":"demo","key":"hello","body_json":"{\"text\":\"Hello from Perseus Vault!\"}"}}}' | perseus-vault serve --db memory.db
# Search for it
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"mimir_recall","arguments":{"query":"Hello"}}}' | perseus-vault serve --db memory.dbWorks With Every MCP Client
Perseus Vault is a standard MCP stdio server — the same perseus-vault serve command works
everywhere. Run perseus-vault doctor to validate your install and print this matrix locally.
Client | Status | Config |
Claude Desktop | ✅ |
|
Claude Code / Hermes | ✅ |
|
Cursor | ✅ |
|
Windsurf | ✅ |
|
VS Code + Continue.dev | ✅ |
|
Zed | ✅ |
|
Codex CLI | ✅ |
|
Copy-paste config snippets for each: docs/clients/.
Why Perseus Vault
Perseus Vault is the only memory engine that is simultaneously MCP-native, local-first, zero-dependency, AND agent-first.
Comparison Matrix
Perseus Vault | Mem0 | Letta | Zep | |
Deployment | Single binary (~8MB) | Cloud + self-host | Docker/Postgres | Docker/Postgres |
Dependencies | None (SQLite embedded) | Python + vector DB | Postgres + Python | Postgres + Go |
MCP-Native | ✅ 55 tools | ❌ Not MCP-native | ❌ Not MCP-native | ❌ Not MCP-native |
Offline/Local | ✅ Fully local | Cloud-dependent | Docker needed | Docker needed |
Encryption | AES-256-GCM ✅ | ❌ | ❌ | ❌ |
Hybrid Search | BM25 + Dense + RRF | Vector only | Vector only | Vector + Graph |
Entity Lifecycle | Decay + Promote + Archive | ❌ | ❌ | ❌ |
Entity Graph | Link + Traverse | ❌ | ❌ | ✅ |
Journal Audit Trail | ✅ Immutable | ❌ | ❌ | ❌ |
State Management | ✅ Key-value + TTL | ❌ | ❌ | ❌ |
MCP Tools | 55 | 5 | 8 | 0 |
GitHub Stars | ~20 | ~55K | ~15K | ~3K |
License | MIT | Apache 2.0 | Apache 2.0 | Apache 2.0 |
Full comparison: Perseus Vault vs Mem0 → vs Letta → vs Zep →
Stress Test: 100K Entities
Perseus Vault handles production workloads on modest hardware:
Metric | Result |
100K entity insert | 1.01s (98,732 entities/s) |
FTS5 recall (10 results) | 0.022s |
Decay tick (100K entities) | 1.317s (batched, transactional) |
Memory (100K entities) | ~85MB RSS |
DB file size (100K) | ~45MB (with FTS5 index) |
Run it yourself: cargo test stress_100k --release -- --ignored --nocapture
Framework Integrations
Ready-to-use adapters that make Perseus Vault the default memory backend for popular AI agent frameworks:
Framework | Integration | Type |
|
| |
| Agent tool | |
|
|
Each adapter:
Connects via MCP stdio subprocess (persistent session)
Maps the framework's memory interface to Perseus Vault tools
Comes with a README quickstart (5 minutes to working)
Has passing tests with mocked MCP transport
Any MCP-compatible framework works with Perseus Vault directly. See Awesome Mimir for the full list.
55 MCP Tools
Entity CRUD
Tool | Description |
| Store/update entity. Idempotent by (category, key); a content change snapshots the prior version into history. |
| Search with FTS5/dense/hybrid modes, filters, stemming expansion. |
| Recall from a specific biomimetic layer (world, episodic, semantic). |
| Proactive just-in-time recall: surface entities whose |
| Fetch one entity by ID with full |
| Transaction-time time-travel: the version of a fact (category + key) that was believed at a past instant. |
| Valid-time lookup: the version that was actually true in the world at an instant, per current knowledge (SQL:2011 APPLICATION_TIME). |
| Full 2-axis bi-temporal query: "as of transaction time T, what did we believe was true at valid time V" — the exact rectangle cell. |
| List superseded versions of a fact (category + key), newest first — paginated ( |
| Soft-delete (archived=1). |
Search & RAG
Tool | Description |
| RAG: recall context, query LLM, return grounded answer with sources. |
| Generate dense vectors via the bundled model, Ollama, or OpenAI-compatible endpoint. |
| Dense-only semantic search shortcut — find entities by meaning, ranked purely by embedding similarity (no keyword fallback). |
| Pre-formatted markdown block for session injection. Recall-first by default: pass |
| Trigger connector syncs (GitHub, file watcher). |
| Locally extract a document's text (plaintext/markdown always; DOCX/PDF with the |
| Local, deterministic, rule-based knowledge extraction (facts / preferences / temporal events / episodes) from text or a stored entity. Read-only. |
| Anthropic memory-tool compatible file interface ( |
Graph
Tool | Description |
| Create typed relationship links between entities. |
| Remove entity links. |
| Walk entity link graph up to configurable depth. |
| GraphRAG community detection over the link graph (deterministic label propagation or greedy-modularity "louvain"; pure Rust, offline). |
| Extractive (optionally LLM-polished) summary of one community, materialized as an entity with |
| GraphRAG global search: breadth over community summaries, then depth into the best communities' members — holistic answers across clusters. |
Journal
Tool | Description |
| Append structured event with actor attribution. |
| Query journal by time range with filters. |
State
Tool | Description |
| Set key-value state with optional TTL. |
| Get state value. Returns null if expired. |
| Delete state entry. |
| List state keys, optionally filtered by prefix. |
Lifecycle
Tool | Description |
| Recalculate Ebbinghaus decay scores (batched 1000-entity transactions). |
| Bulk archive by category, decay threshold, or age. |
| Permanently delete archived entities + VACUUM. Destructive. |
| Autonomous coherence grooming pass — promote, decay, link, archive. |
| Full atomic grooming: cohere → decay → compact in one pass (supports dry-run). |
| Archive entities below decay threshold. |
| Rebuild FTS5 search index from entities table. |
| Merge overlapping/duplicative entities in a category into durable, evidence-tracked observations (mirror image of |
| Sleep-time LLM consolidation: reflect over clusters of related episodic memories via the configured LLM and write back durable semantic insights, provenance-linked to every source. Idempotent (evidence-set hash), contradiction-aware, bounded; requires |
Quality
Tool | Description |
| Assign quality score (0.0-1.0). |
| Detect conflicting entities via trigram similarity; opt-in |
| Structured correction capture for learning from errors. |
| Mark a new fact as superseding an old one (sets the old entity to |
| Record whether an entity was actually FOLLOWED or MISSED — follow-rate efficacy signal that feeds decay scoring. |
Vault & Federation
Tool | Description |
| Export entities to .md files with YAML frontmatter. |
| Import from .md vault directory (idempotent). |
| Copy entities between workspaces. |
| Share one entity (by category + key) into another workspace, preserving content. |
| List all distinct entity categories. |
Metrics & Ops
Tool | Description |
| Full DB statistics across all tables. |
| Server and DB health check. |
| Performance benchmark tracking. |
| DB maintenance: dedup, orphan detection, VACUUM, FTS5 reindex (supports dry-run). |
| LLM session synthesis — extract lessons from transcripts. |
| Migrate v0.1.x DB to current schema. |
CLI
# Server
perseus-vault serve --db /data/perseus-vault.db
perseus-vault serve --web --port 8767 --encryption-key ~/.mimir/secret.key
perseus-vault serve --llm-endpoint http://localhost:11434/api/generate --llm-model llama3
perseus-vault serve --transport sse --port 8787 --mcp-token my-secret-token
# Maintenance (operate directly on DB, no server needed)
perseus-vault stats --db /data/perseus-vault.db
perseus-vault forget --db /data/perseus-vault.db --category decision --key stale-choice --reason "superseded"
perseus-vault prune --db /data/perseus-vault.db --category junk --min-decay 0.1 --dry-run
perseus-vault purge --db /data/perseus-vault.db --dry-run
perseus-vault decay --db /data/perseus-vault.db
perseus-vault reindex --db /data/perseus-vault.db
perseus-vault vault-export --db /data/perseus-vault.db --vault-dir ./export/
perseus-vault vault-import --db /data/perseus-vault.db --vault-dir ./export/
perseus-vault obsidian-sync ~/obsidian-vault/Perseus Vault/ # one-shot export to an Obsidian vault
perseus-vault obsidian-sync ~/obsidian-vault/Perseus Vault/ --watch # continuous sync on every memory change
# Key management
perseus-vault keygen --key-file ~/.mimir/secret.keyFlags
Flag | Description |
| SQLite database path (default: |
| Start web dashboard |
| Dashboard port (default: 8767) |
| Dashboard bind address (default: 127.0.0.1) |
| MCP transport: |
| Bearer token for SSE/HTTP transport auth |
| AES-256-GCM key file path |
| LLM API endpoint for |
| LLM model name (default: llama3) |
| API key for LLM endpoints (OpenAI, Azure, etc.) |
| OpenAI-compatible embedding endpoint |
| Path to connectors.yaml |
Your AI Memory in Obsidian
Perseus Vault is your AI agent's long-term memory — and it doubles as your second brain. Every entity your agent remembers exports to a plain Markdown note with YAML frontmatter, so your AI's memory becomes a navigable personal knowledge base inside the tools you already use: Obsidian, Logseq, or Notion.
# Export your entire memory to an Obsidian vault as linked Markdown notes
perseus-vault obsidian-sync ~/obsidian-vault/Perseus Vault/
# Keep it live — re-export automatically on every memory change
perseus-vault obsidian-sync ~/obsidian-vault/Perseus Vault/ --watchOpen the vault in Obsidian and you get a graph of your agent's knowledge.
WikiLink backlinks. When one entity links to another (via mimir_link or a
depends_on / implements / references relationship), the exported note gets
a ## Links section with [[WikiLink]] backlinks that resolve natively in
Obsidian's graph view:
---
id: cli-de8dfb8364b6
category: architecture
key: api
type: insight
decay_score: 0.5000
---
{"content":"axum service"}
## Links
- [[cli-99756b494c7d|database]] (depends_on)Links resolve by entity id (notes are written as <id>.md) so they never
break, and Obsidian shows the human-readable key as the link label. Open the
graph view and your agent's architecture, decisions, and insights become a
clickable knowledge map.
--watch polls Perseus Vault's cheap, deterministic state digest on an interval and
re-exports only when memory actually changes. It naturally catches every
mimir_remember write with no filesystem-watcher dependency and no coupling to
the server. Tune the interval with MIMIR_SYNC_INTERVAL_SECS (default: 2s).
Other PKM tools
Tool | How |
Obsidian |
|
Logseq | Point |
Notion | Run |
Unlike cloud-only "second brain" tools, Perseus Vault runs 100% local, is written in Rust, encrypts at rest with AES-256-GCM, and applies decay scoring so stale memories fade — your knowledge base stays yours and stays fresh.
Features
Semantic Search (on by default)
Bundled, in-process embeddings — a quantized all-MiniLM-L6-v2 model (384-dim) is compiled into the binary, so dense/semantic search works with zero config and zero network: no Ollama, no API key, no model download. This is the default build (
bundled-embeddingsfeature).Auto-embed on write (#271) —
mimir_rememberembeds each new (or content-changed) entity synchronously as it is written, using the bundled model. Single-entity embedding is deterministic and LRU-cached, so it is cheap and adds no background tasks. Embedding failures are non-fatal (logged to stderr); the write always succeeds.Hybrid is the default recall mode (#271) —
mimir_recall(query=...)with nomodeflag automatically selects hybrid (dense + keyword fused via RRF) whenever embeddings exist, and transparently falls back to fts5 keyword search when none do. No manualmimir_embedstep, no flags to remember.mimir_semantic_search(query, limit)— a one-tool shortcut for pure dense, meaning-based search (no keyword fallback) when you just want "find things like this".Optional alternate embedder — to use Ollama or any OpenAI-compatible
/v1/embeddingsendpoint instead of the bundled model, set--llm-endpoint(and--embedding-endpoint/--llm-api-keyas needed). This is entirely optional; the bundled model is used by default.Build a lean binary without bundled embeddings via
cargo build --no-default-features— recall then defaults to keyword search unless a remote embedder is configured.
Hybrid Search internals
FTS5 keyword search with LIKE fallback and Porter stemming expansion
Dense vector search via cosine similarity on stored embeddings
Reciprocal Rank Fusion (RRF) — combine keyword + vector results
Query expansion — automatic stemming variants for broader recall
Memory Lifecycle
Perseus Vault models memory using three biomimetic layers, inspired by human memory pathways:
World (Core): Slow-decaying, global facts about the environment.
Episodic (Buffer): Fast-decaying, session-specific interaction history.
Semantic (Working): Medium-decaying, general knowledge and learned concepts.
You can interact with these layers directly using the mimir_recall_layer tool or by specifying the layer parameter in mimir_remember.
Ebbinghaus decay — memories naturally fade unless retrieved (refresh on access)
Layer promotion — buffer → working → core based on access frequency
Automatic archival — stale entities archive; purge to permanently delete + VACUUM
Always-on entities — pin identity-critical memories for session injection (hard-capped under recall-first; prefer
recall_whentriggers)
Recall-First Context Injection
The vault is the query layer — it retrieves the few facts a turn needs instead of
handing the host a standing blob to staple into every system prompt.
mimir_context and perseus-vault prepare are recall-first by default:
Relevance gating — pass
query(the current task/message) and only entities whoserecall_whentriggers or indexed content match it are injected. No query, no topical injection: the block is a compact retrieval pointer, byte-stable across unrelated vault writes (prefix-cache friendly).Per-model recall budget — output is clamped to a character budget resolved from the host model: default/lean profile 1500 chars; large-window ("opus") profile 6000 chars;
max_context_charsoverrides both.Capped always-on —
always_on: truestill works for identity-critical facts, but the recall-first set is hard-capped (top 5) and overflow emits a warning steering you torecall_whentriggers.Legacy opt-in — the old unconditional top-N dump is still available with
mode: "always_inject"(--legacy-contextforprepare), unclamped unless you pass a budget.
perseus-vault prepare --task "deploying the payments service" --model claude-sonnet-4-6
perseus-vault prepare --task "..." --max-context-chars 800 # explicit budget
perseus-vault prepare --task "..." --legacy-context # old dump, opt-inRAG & Embeddings
mimir_ask— natural language Q&A over stored memories via any LLM (Ollama, OpenAI, etc.)mimir_embed— generate and store dense vectors via Ollama or OpenAI-compatible/v1/embeddingsSupports single-entity and batch-category embedding
Encryption
AES-256-GCM transparent encryption for entity
body_jsonOpt-in via
--encryption-keyflagperseus-vault keygensubcommand for key generationFTS5 index stays plaintext for search
Web Dashboard
Built-in Axum HTTP server (
perseus-vault serve --web --port 8767)Dark-themed dashboard with search, entity table, vis.js graph, timeline
Default bind:
127.0.0.1(use--web-bind 0.0.0.0to expose)Separate SQLite connection in WAL mode for concurrent reads
External Connectors
GitHub issues connector — ingest issues/PRs by repo, rate-limit aware
File watcher — scan directories for
.md/.txt/.jsonfiles with content-hash dedupYAML-based connector config via
--connectors-config
Multi-Transport
stdio (default) — zero-config, works with any MCP host
SSE — Server-Sent Events for HTTP-based MCP clients
HTTP — REST-style MCP endpoint
Bearer token auth — for SSE/HTTP transports
Perseus Integration
Perseus Vault is the default memory backend for Perseus:
mimir:
enabled: true
transport: "stdio"
command: ["perseus-vault", "serve", "--db", "~/.mimir/data/perseus-vault.db"]
timeout_s: 30.0
merge_strategy: "local_first"
fallback_to_local: true
context_categories: ["decision", "architecture", "convention"]
context_limit: 10Government & Federal Procurement
Perseus Vault is built for government deployment from the ground up.
Capability | Status |
License | MIT — no copyleft, no GPL/AGPL |
SBOM | Published — NTIA minimum elements |
Air-gapped | Fully offline — no telemetry, no API calls, no network by default |
Encryption at rest | AES-256-GCM, transparent, opt-in |
Audit trail | Immutable journal with chain-of-custody |
Supply chain | SLSA attestation in progress |
For federal buyers: See docs/federal-buyers.md for procurement information, compliance status, and deployment models (air-gapped, on-premises, classified environments).
Perseus Computing LLC is a US-owned small business. SAM.gov registration in progress. NAICS: 541715, 541511, 541512.
Privacy Policy
Perseus Vault is a local-first MCP server — it runs entirely on your machine.
Data Collection
No data collection. Perseus Vault does not collect, transmit, or phone home any user data, usage statistics, or telemetry.
All data remains in your local SQLite database file.
Data Usage & Storage
All memory entities, journal entries, and state are stored locally in a SQLite database at the path you specify via
--db.Optional AES-256-GCM encryption at rest is available — when enabled, entity bodies are encrypted before storage.
No data is shared with Perseus Computing LLC or any third party.
Third-Party Sharing
None. Perseus Vault is fully air-gapped by default. No API calls, no cloud services, no external network requests.
The optional dense vector embeddings feature uses a locally-compiled model — no external embedding API is called.
Data Retention
You control retention: entities can be soft-deleted (
mimir_forget), archived (via decay/compact), or permanently purged (mimir_purge).No automatic off-machine backup is performed.
Contact
Email: privacy@perseus.observer
License
MIT — see LICENSE.
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Perseus-Computing-LLC/perseus-vault'
If you have feedback or need assistance with the MCP directory API, please join our Discord server