Perseus Vault

July 5, 2026 · View on GitHub

Perseus Vault — Persistent Memory. Encrypted, local-first, one portable file.

Perseus Vault

Persistent Memory for AI Agents — MCP-Native. Local-First. Zero Dependencies.

License: MIT Rust Version LangGraph CrewAI AutoGen MCP Tools

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 | sh

That's it. Perseus Vault is installed to ~/.local/bin/perseus-vault. Start it:

perseus-vault serve --db ~/.mimir/data/perseus-vault.db

macOS note (Apple Silicon). A freshly built or copied binary is SIGKILLed on first run (Killed: 9, no other output) by the OS binary policy — even with no quarantine attribute. The one-line installer and the bootstrap.sh build-from-source installer ad-hoc code-sign Perseus Vault for you. If you build the binary yourself, sign it once after each rebuild:

cargo build --release
cp target/release/perseus-vault ~/.local/bin/perseus-vault
codesign --force --sign - ~/.local/bin/perseus-vault   # required on Apple Silicon; fixes "Killed: 9"

--force re-signs an already-signed binary (needed after every rebuild); the step is harmless on Intel macOS and unnecessary on Linux/Windows.

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"]
    }
  }
}

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.db

Works 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.

ClientStatusConfig
Claude Desktopclaude_desktop_config.json
Claude Code / Hermes.mcp.json / config.yaml
Cursor.cursor/mcp.json
Windsurfmcp_config.json
VS Code + Continue.devconfig.json
Zedsettings.json
Codex CLI~/.codex/config.toml

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 VaultMem0LettaZep
DeploymentSingle binary (~8MB)Cloud + self-hostDocker/PostgresDocker/Postgres
DependenciesNone (SQLite embedded)Python + vector DBPostgres + PythonPostgres + Go
MCP-Native✅ 55 tools❌ Not MCP-native❌ Not MCP-native❌ Not MCP-native
Offline/Local✅ Fully localCloud-dependentDocker neededDocker needed
EncryptionAES-256-GCM ✅
Hybrid SearchBM25 + Dense + RRFVector onlyVector onlyVector + Graph
Entity LifecycleDecay + Promote + Archive
Entity GraphLink + Traverse
Journal Audit Trail✅ Immutable
State Management✅ Key-value + TTL
MCP Tools55580
GitHub Stars~20~55K~15K~3K
LicenseMITApache 2.0Apache 2.0Apache 2.0

Full comparison: Perseus Vault vs Mem0 → vs Letta → vs Zep →

Stress Test: 100K Entities

Perseus Vault handles production workloads on modest hardware:

MetricResult
100K entity insert1.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:

FrameworkIntegrationType
LangGraphMimirStoreBaseStore implementation
CrewAIMimirMemoryToolAgent tool
AutoGenMimirMemoryMemory implementation

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

ToolDescription
mimir_rememberStore/update entity. Idempotent by (category, key); a content change snapshots the prior version into history.
mimir_recallSearch with FTS5/dense/hybrid modes, filters, stemming expansion.
mimir_recall_layerRecall from a specific biomimetic layer (world, episodic, semantic).
mimir_recall_whenProactive just-in-time recall: surface entities whose recall_when triggers match.
mimir_get_entityFetch one entity by ID with full body_json.
mimir_as_ofTransaction-time time-travel: the version of a fact (category + key) that was believed at a past instant.
mimir_valid_atValid-time lookup: the version that was actually true in the world at an instant, per current knowledge (SQL:2011 APPLICATION_TIME).
mimir_bitemporalFull 2-axis bi-temporal query: "as of transaction time T, what did we believe was true at valid time V" — the exact rectangle cell.
mimir_historyList superseded versions of a fact (category + key), newest first — paginated (limit default 20, plus offset); total reports the full trail size (companion to mimir_as_of).
mimir_forgetSoft-delete (archived=1).

Search & RAG

ToolDescription
mimir_askRAG: recall context, query LLM, return grounded answer with sources.
mimir_embedGenerate dense vectors via the bundled model, Ollama, or OpenAI-compatible endpoint.
mimir_semantic_searchDense-only semantic search shortcut — find entities by meaning, ranked purely by embedding similarity (no keyword fallback).
mimir_contextPre-formatted markdown block for session injection. Recall-first by default: pass query (the current task/message) and only topically relevant entities are injected, clamped to a per-model budget; the legacy unconditional dump requires mode: "always_inject".
mimir_ingestTrigger connector syncs (GitHub, file watcher).
mimir_ingest_fileLocally extract a document's text (plaintext/markdown always; DOCX/PDF with the multimodal feature) and store it as a recallable entity.
mimir_extractLocal, deterministic, rule-based knowledge extraction (facts / preferences / temporal events / episodes) from text or a stored entity. Read-only.
mimir_memoriesAnthropic memory-tool compatible file interface (view/create/str_replace/insert/delete/rename under /memories), backed by vault entities.

Graph

ToolDescription
mimir_linkCreate typed relationship links between entities.
mimir_unlinkRemove entity links.
mimir_traverseWalk entity link graph up to configurable depth.
mimir_communitiesGraphRAG community detection over the link graph (deterministic label propagation or greedy-modularity "louvain"; pure Rust, offline).
mimir_community_summaryExtractive (optionally LLM-polished) summary of one community, materialized as an entity with evidence_for links to members.
mimir_global_recallGraphRAG global search: breadth over community summaries, then depth into the best communities' members — holistic answers across clusters.

Journal

ToolDescription
mimir_journalAppend structured event with actor attribution.
mimir_timelineQuery journal by time range with filters.

State

ToolDescription
mimir_state_setSet key-value state with optional TTL.
mimir_state_getGet state value. Returns null if expired.
mimir_state_deleteDelete state entry.
mimir_state_listList state keys, optionally filtered by prefix.

Lifecycle

ToolDescription
mimir_decayRecalculate Ebbinghaus decay scores (batched 1000-entity transactions).
mimir_pruneBulk archive by category, decay threshold, or age.
mimir_purgePermanently delete archived entities + VACUUM. Destructive.
mimir_cohereAutonomous coherence grooming pass — promote, decay, link, archive.
mimir_autocohereFull atomic grooming: cohere → decay → compact in one pass (supports dry-run).
mimir_compactArchive entities below decay threshold.
mimir_reindexRebuild FTS5 search index from entities table.
mimir_consolidateMerge overlapping/duplicative entities in a category into durable, evidence-tracked observations (mirror image of mimir_conflicts).
mimir_dreamSleep-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 --llm-endpoint.

Quality

ToolDescription
mimir_scoreAssign quality score (0.0-1.0).
mimir_conflictsDetect conflicting entities via trigram similarity; opt-in resolve=true invalidates the lower-certainty side into history (reversible, dry-run by default).
mimir_correctStructured correction capture for learning from errors.
mimir_supersedeMark a new fact as superseding an old one (sets the old entity to deprecated).
mimir_followRecord whether an entity was actually FOLLOWED or MISSED — follow-rate efficacy signal that feeds decay scoring.

Vault & Federation

ToolDescription
mimir_vault_exportExport entities to .md files with YAML frontmatter.
mimir_vault_importImport from .md vault directory (idempotent).
mimir_federateCopy entities between workspaces.
mimir_shareShare one entity (by category + key) into another workspace, preserving content.
mimir_workspace_listList all distinct entity categories.

Metrics & Ops

ToolDescription
mimir_statsFull DB statistics across all tables.
mimir_healthServer and DB health check.
mimir_benchPerformance benchmark tracking.
mimir_maintenanceDB maintenance: dedup, orphan detection, VACUUM, FTS5 reindex (supports dry-run).
mimir_synthesizeLLM session synthesis — extract lessons from transcripts.
mimir_migrateMigrate 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.key

Flags

FlagDescription
--dbSQLite database path (default: ~/.mimir/data/perseus-vault.db)
--webStart web dashboard
--portDashboard port (default: 8767)
--web-bindDashboard bind address (default: 127.0.0.1)
--transportMCP transport: stdio (default), sse, or http
--mcp-tokenBearer token for SSE/HTTP transport auth
--encryption-keyAES-256-GCM key file path
--llm-endpointLLM API endpoint for mimir_ask and embeddings
--llm-modelLLM model name (default: llama3)
--llm-api-keyAPI key for LLM endpoints (OpenAI, Azure, etc.)
--embedding-endpointOpenAI-compatible embedding endpoint
--connectors-configPath to connectors.yaml

Database location

The canonical database path is:

~/.mimir/data/perseus-vault.db

Always pass --db (or set $MIMIR_DB_PATH) in scripts, MCP host configs, and cron/harvest jobs so every invocation targets the same file. When neither is set, Perseus Vault resolves the default in this order and uses the first that already exists (so upgraders and legacy single-user installs are picked up instead of silently starting empty):

  1. ~/.mimir/data/perseus-vault.db — canonical (current name)
  2. ~/.mimir/data/mneme.db — pre-rename
  3. ~/.mimir/data/mimir.db — pre-rename
  4. ~/mimir.db — legacy single-user install location

If none exist, it creates ~/.mimir/data/perseus-vault.db. If more than one of these exists and you did not pass --db/$MIMIR_DB_PATH, Perseus Vault prints a stderr warning naming the chosen file and the others it ignored, so an ambiguous multi-database state is visible rather than silent. Setting --db or $MIMIR_DB_PATH explicitly always wins and suppresses the warning.

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/ --watch

Open 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

ToolHow
Obsidianperseus-vault obsidian-sync <vault> — WikiLinks resolve in the graph view out of the box.
LogseqPoint obsidian-sync at your Logseq graph directory. Logseq reads the same [[WikiLink]] syntax and Markdown frontmatter.
NotionRun perseus-vault vault-export, then use Notion's Import → Markdown & CSV to pull the notes in.

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-embeddings feature).
  • Auto-embed on write (#271)mimir_remember embeds 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 no mode flag automatically selects hybrid (dense + keyword fused via RRF) whenever embeddings exist, and transparently falls back to fts5 keyword search when none do. No manual mimir_embed step, 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/embeddings endpoint instead of the bundled model, set --llm-endpoint (and --embedding-endpoint / --llm-api-key as 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_when triggers)

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 whose recall_when triggers 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_chars overrides both.
  • Capped always-onalways_on: true still works for identity-critical facts, but the recall-first set is hard-capped (top 5) and overflow emits a warning steering you to recall_when triggers.
  • Legacy opt-in — the old unconditional top-N dump is still available with mode: "always_inject" (--legacy-context for prepare), 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-in

RAG & 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/embeddings
  • Supports single-entity and batch-category embedding

Encryption

  • AES-256-GCM transparent encryption for entity body_json
  • Opt-in via --encryption-key flag
  • perseus-vault keygen subcommand for key generation
  • FTS5 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.0 to 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/.json files with content-hash dedup
  • YAML-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: 10

Government & Federal Procurement

Perseus Vault is built for government deployment from the ground up.

CapabilityStatus
LicenseMIT — no copyleft, no GPL/AGPL
SBOMPublished — NTIA minimum elements
Air-gappedFully offline — no telemetry, no API calls, no network by default
Encryption at restAES-256-GCM, transparent, opt-in
Audit trailImmutable journal with chain-of-custody
Supply chainSLSA 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

License

MIT — see LICENSE.