
MemVault - Local-First Agent Memory
io.github.dreamor由 GitHub 帳號 dreamor 發布v0.7.0更新於 Nov 7, 2026
Local-first memory for AI agents: save, recall, dedupe, and share across MCP clients.
發布方自己的服務:Memory.fit
概覽
自架的本地優先記憶庫,讓任何支援 MCP 的助理跨工作階段、跨代理儲存、檢索、去重並共享持久記憶。
- 可以做什麼
- 儲存、擷取並匯入記憶、技能以及其他代理的記憶檔案,可設定優先級、類型與到期時間
- 以混合、關鍵字或語意方式檢索記憶,並支援指定時間點與事件時間範圍的查詢
- 記錄任務結果與經驗教訓,並執行去重、衰減、封存與提升流程
- 提出、審核、核准、駁回、軟刪除或永久清除記憶,並提供待審核收件匣
- 在工作階段開始時注入能辨識代理的上下文,並回報注入記憶的遵循率與有效性
- 追蹤記憶背後的證據鏈,並提供使用者輪廓與專案上下文資源
- 適用情境
- 適合同時使用一個或多個支援 MCP 的代理,希望偏好、專案慣例和過往決策能跨工作階段保留、不必反覆重述的情況。也適合需要在混合代理環境中維持一致上下文,或想採用私有自架記憶層而非託管服務的團隊。
- 執行需求
- 以本機程序執行(stdio,或在連接埠上提供 SSE/HTTP),使用本機資料庫檔案。可透過安裝腳本、Homebrew、Docker 映像或 cargo 安裝;預編譯 Linux 二進位檔需 glibc 2.39 以上,原始碼建置需 GCC 13 等級工具鏈。可選的 Ollama 或 OpenAI 相容服務透過 MEMVAULT_* 環境變數或本機 env 檔設定;預設原生嵌入模型首次啟動時會從 HuggingFace 下載權重。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MemVault - Local-First Agent Memory,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MemVault
The Shared Memory Layer for Every AI Agent You Run
Not "agent learns to search memory" — memory finds the agent.
MCP Native · Hybrid Retrieval · Auto-Injection · Zero-Config Sync
Open Source · Self-Hosted · Private · MIT Licensed
[Crates.io] [GitHub Release] [CI] [License: MIT] [Rust] [MCP] [Glama] [Status]
English · 简体中文
If MemVault solves a real problem for you, a star helps others find it.
Every AI agent session starts from scratch. Claude Desktop doesn't know what Cursor just learned. DeepSeek Harness (dsh) doesn't know what you told Claude Code yesterday. Whatever agent you're running — international or domestic, IDE plugin or CLI harness — it forgets your preferences every time you start a new conversation.
You've been manually repeating context — project conventions, personal preferences, past decisions — across agents that should already know. This isn't a limitation of the models. It's a missing infrastructure layer.
MemVault is that layer. A lightweight, self-hosted memory router that sits between your agents and their context. It speaks plain MCP — no MemVault-specific SDK, no per-agent API integration. Any MCP-compatible agent, from any vendor, automatically shares the same persistent memory the moment it connects.
Who it's for:
- Anyone running an MCP-capable agent — Claude Code, Claude Desktop, Cursor, Cline, Continue, DeepSeek Harness (dsh), or any other MCP client, domestic or international — who wants preferences, project context, and past decisions to persist across sessions without repeating yourself
- Multi-agent power users running several of the above side by side, on different models, from different vendors — all sharing the same memory without configuration
- Platform teams deploying AI-assisted workflows where consistency matters across a mixed agent fleet: code review conventions, architecture decisions, project-specific preferences
- Anyone tired of telling their AI the same thing twice — MemVault works the way your brain should: you say it once, it's there when you need it, no matter which agent is asking
Quick Start · How It Works · What MemVault Gives You · Why MemVault · MCP Server · CLI Reference · Integrations · Architecture · Project Status · Testing · Documentation · Contributing · License
Quick Start
Don't install MemVault by hand — paste this one prompt into Claude Code, Codex, Cursor, dsh, or any other MCP-capable agent. It points the agent at a machine-readable install guide, so the agent does the whole setup itself:
Or install manually:
System requirements:
- Prebuilt Linux binaries (install script / GitHub release): glibc ≥ 2.39 + GLIBCXX_3.4.31 (GCC 13-era runtime — Ubuntu 24.04+ / Fedora 40+ / Arch). Release builds are pinned to Ubuntu 24.04 runners, and the release workflow gates the highest glibc/GLIBCXX symbol version every binary may require plus a startup smoke test, so this floor cannot silently drift upward (0.6.9 shipped x86_64 binaries requiring glibc 2.43 that way). TLS is rustls, so no OpenSSL dependency. Ubuntu 22.04 / RHEL or EL8/EL9 users: use the Docker image (
dreamor/memvault) or build from source.- Building from source (
cargo install/cargo build): links fastembed's prebuilt ONNX Runtime static library and needs a GCC 13-class toolchain. Older toolchains (e.g. GCC 8, CentOS 7/8-era libstdc++) fail at link time with missing C++20/23 stdlib symbols (std::format,std::to_chars). macOS / Windows (MSVC) / Homebrew / Docker are unaffected.
Verify your install in 5 seconds:
Local Ollama Demo (Zero Cost, Stays on Your Machine)
MemVault is plug-and-play with a local Ollama: unconfigured LLM extraction (full-text understanding / failure reflection / relation extraction) auto-detects a local Ollama; embeddings use the local model with the ollama or auto provider.
With no configuration at all (neither env vars nor ~/.memvault/.env), LLM extraction auto-detects a local Ollama and enables itself (default model qwen2.5:7b; pull it in advance with ollama pull qwen2.5:7b, or point MEMVAULT_LLM_EXTRACTION_MODEL at an installed model). Embeddings still default to the in-process native embedder; set MEMVAULT_EMBEDDING_PROVIDER=auto in ~/.memvault/.env to prefer Ollama and fall back to native when it isn't running. The native model's first launch downloads the weights from HuggingFace silently in the background — the server/dashboard come up immediately and hot-swap to semantic search once the download finishes, so a fresh install never blocks on it (set MEMVAULT_EMBEDDING_PROVIDER=none to run pure keyword and skip the download).
How It Works
MemVault is a pipeline, not a single script. Every stage below is a shipping module:
- Storage: SQLite with bundled FTS5 (full-text search); embeddings stored int8-quantized (~1/4 the size of f32 at near-identical ranking quality, legacy f32 rows still readable)
- Retrieval: BM25 keyword search over FTS5 with CJK bigram tokenization (Chinese two-character words match correctly) and tiered match fallback (strict → relaxed unigram → synonym OR; relaxations are reported, never silent), local-first embedding (in-process native by default — switch to local Ollama or any OpenAI-compatible model), RRF fusion with per-result recall provenance (
kw#2/vec#5), synonym expansion, relevance scoring, soft intent filtering - Pipeline: Automatic entity extraction, delta-write on save (near-duplicates skipped, similar memories absorb only the residual), semantic deduplication, time-based decay, archive of stale memories
- Sync: Zero-invasion file generation —
memvault-cli syncproduces CLAUDE.md, AGENTS.md, etc. directly from database contents
What MemVault Gives You
- Auto-Injected Context: Session start automatically pulls relevant memory by agent identity — MUST-level rules land as instructions, not just chat history
- Hybrid Retrieval: BM25 + vector + RRF fusion with synonym expansion, relevance scoring, and per-result provenance (which path recalled each memory, at what rank) — available via CLI, MCP tool, and REST API
- Explainable Injection: every candidate dropped on the way into an agent's context is recorded with a reason (budget, caps, intent/type penalties) — "why didn't the agent get this memory?" always has an answer
- Degrade Before Dropping: when the token budget runs out, a memory is shortened — excerpt, then summary — rather than cut, so more of the ranked list stays reachable at a lower per-memory cost. Shortened text always carries a
[…]marker and the level is reported separately from the dropped list, because an abbreviation that looks complete is worse than a drop. MUST is never shortened: a binding rule with its qualifying clause summarised away is worse than one that overflowed - MUST Enforcement: MUST-priority memories are never filtered or truncated. Always in context, always obeyed — trust comes from provenance (human-authored/reviewed), with an opt-in fallback for memories independently corroborated by multiple identity-verified agents (
MEMVAULT_CORROBORATION_GATE), so a single spoofed/compromised agent can't unilaterally inject a binding MUST - Multi-Agent Awareness: Agent Registry with type/tag-based soft filtering (score demotion, not hard exclusion)
agent_idIs Provenance, Not a Filter: retrieval never filters byagent_id— the field only records which agent wrote a memory (source_agent). Every agent searches the same shared corpus; per-agent differences apply only at injection time (type/tag soft scoring viaagents.yamlinject_rules)- MCP Proxy: Transparent proxy that injects memory into ANY upstream MCP server's responses — zero client changes
- Compliance Tracking:
inject_session_idtraces what was injected and measures follow-through rate - Cross-Platform: CLI + MCP Server (stdio & SSE) + Web Dashboard (browser) + Obsidian Plugin
- Zero-Invasion Sync: Generate AGENTS.md / CLAUDE.md from memory — no per-agent config files to edit. Applies the same exclusions as session injection (unreviewed drafts behind the review gate, superseded facts, pending edit proposals, expired memories) and reports how many it held back and why, so "why isn't this rule in my AGENTS.md" has an answer
- Contextual Extraction, Local-First: Rule-based keyword extraction by default; optionally understands a full user+assistant exchange via an LLM, auto-detecting a local Ollama for free before ever touching a remote API
- History & Rollback: Every update/delete is snapshotted into
memory_history—memvault-cli checkpoints+memvault-cli restoreroll one memory back without touching the rest - Time Travel (
as_of): ask what MemVault believed at any past instant —memvault-cli as-of <id> --at 2026-08-01T00:00:00Z,list --as-of,search --as-of,search_memory,POST /api/search. Reconstructed from the same snapshot chain that powers rollback, so it needed no new version schema. Memories deleted or superseded after that instant still come back, because they were the current truth then. Search also recalls from a historical full-text index, so a memory reworded sinceas_ofis still found by the words it had — those hits are taggedhist-kw#Nto keep "matched today" distinct from "matched then". Each answer says where it came from (live row vs. a named history snapshot), so a far-back result is never mistaken for a current one - Two Time Axes, Never Folded:
as_ofasks what did MemVault believe in March;--occurred-from/--occurred-toask what happened in March. A memory can be true for both answers at once, so they are separate parameters rather than onesince/untilrange — folding them is what makes one of the two questions permanently unanswerable. Undated memories never match an event-time window, and the CLI says so whenever the flag is used rather than only when the result comes back empty - Self-Expiring Facts (
expires_at): a temporary fact ("the deploy freeze runs until Friday") retires itself instead of decaying slowly and being re-injected as stale truth.save --expires-at <RFC3339>or--ttl 7d. Past the bound it leaves retrieval and injection but stays inspectable and restorable — expiry retires a fact, onlyforgeterases one. Honored even for MUST: an explicit bound is not the inferred disuse signal thatmust_exemptprotects against - Self-Diagnostics:
memvault-cli statusreports exactly which features are degraded when no embedding provider is configured, plus a schema fingerprint (migration version + checksum) for cross-database comparison - Episodic Memory:
record_outcomerecords task results; failures are distilled into lessons and auto-injected next time (REFERENCE → MUST only with human approval), so the same trap isn't hit twice - Procedural Skill Activation: skills whose
triggermatches intent are injected as structured[SKILL]blocks with success-rate stats (shown after ≥3 runs); failures flag the skill for revision (version++on human edit), repeated successes auto-draft new skills into the review inbox - Semantic Knowledge Links: lightweight relation triples, repeated facts consolidated into a linked semantic fact with provenance, and superseded facts archived (never re-injected, still listable & restorable)
- Team Shared Pool & SOP Import: memories marked
sharedare injected into every session (capped at 20); Markdown SOPs can be batch-imported as verifiable skills - Delta-Write on Save: every save is checked against its namespace first — near-duplicates are skipped, similar memories absorb only the residual (what's genuinely new) and get their strength refreshed, so the library converges instead of accumulating near-copies;
--force/force_insertbypasses - Task-Level Evaluation:
memvault-cli benchsamples your own failure history (episodes that distilled a lesson) and measures lesson retrieval/injection rates — and with--judge, an LLM scores "plan without vs. with memory" against the known failure cause, so you see task-success lift, not just retrieval recall - Two-Phase Injection (never blocks): MUST rules resolve deterministically with zero embedding calls and are served immediately; the semantic pipeline prefetches in the background and lands within a short window (250ms) — if it doesn't, the deterministic baseline is served and the request moves on (two-phase design)
- Conversation-N-Gram Retrieval: retrieval keys are conditioned on the recent turn window, weighted by recency so the current focus dominates — not a single flat query
- Single Canonical Injection Channel: per-agent
inject_channel(mcp/proxy/syncinagents.yaml) restricts automatic injection to one delivery path, so the same memory is never sent to the same agent twice - Data You Own: Single SQLite file. Full export/import. No cloud dependency. Your data, your machine.
- The Index Is Disposable, the Memory Is Not: every derived structure in MemVault can be thrown away and rebuilt, so a corrupt or stale index is never a data-loss event.
- markdown backend — the
.mdfiles are the memory;.memvault-cache.dbis a shadow index derived from them. Delete the cache and the next open rebuilds it from the vault. Edit a file by hand in Obsidian, in an editor, or viagit checkout, andmemvault-cli reindex(or--watch) reconciles it — content is diffed against the cached row and resynced on any mismatch. Your memories are plain text you cangrep,git blame, and take to any other tool. - sqlite backend —
data.dbis the source of truth, and the derived parts inside it still self-heal: the FTS index is rebuilt automatically on open whenever its row count disagrees withmemories, and the embedding column can be dropped and backfilled (switch embedding models, or run with no provider configured and add vectors later). - What is never derived: your content, your review state, your provenance, and the
memory_historysnapshot chain that powers rollback andas_oftime travel. Note the one asymmetry — history snapshots live in the cache, so on the markdown backend a rebuilt cache loses the version chain and point-in-time reads fall back to the live row (docs/DESIGN.md§9.6). Expiry and everything else survive a rebuild intact.
- markdown backend — the
Why MemVault
Storing and retrieving memories is solved — a dozen products do it well, and since 2025 the Code Agents do it natively. What is not solved is the part after retrieval: getting one shared corpus into every agent you run, deciding what entitles a memory to bind that agent, and knowing whether it obeyed.
The claims below come from a 15-product survey refreshed 2026-11
(docs/DESIGN.md §2). They
are falsifiable — the table there names every product and every source.
What only MemVault does
What MemVault does differently
On that latency comparison, honestly. The two numbers are not measured the same way and should not be read as a like-for-like win. Mem0's published p50 covers its whole retrieval pipeline; ours is the
/api/sessioninjection call alone, from a 20-probe plumbing run against a local debug build with no embedding provider configured. The defensible claim is narrower and still worth making: MUST resolution does not touch an embedding model at all, so its latency does not depend on one being installed, warm, or reachable — that is §17.3's two-phase design, and it is whyedge-litecan turn embeddings off without losing MUST injection. A comparable end-to-end number needs the BEAM scored run, which has not happened.
Platform-native memory is the real competition now, and it is good — zero infrastructure, zero configuration. Its structural ceiling is that each platform only loads its own silo: Claude Code's memory directory is invisible to Cursor, and Codex's memories do not leave Codex. If you run more than one agent, that is the gap.
Where MemVault is behind
Stated plainly, because a comparison that only lists wins is not a comparison:
Everything in that table is tracked in §16 with either a plan or a reason it is not being done.
MemVault complements your existing agent setup rather than replacing it. Keep your LLM, your IDE, and your workflow exactly as they are. MemVault adds the memory layer underneath — and the part that checks whether it was used.
MCP Server
Tier-1 agents (Claude Code, OpenCode, dsh, Gemini CLI, Codex) have one-command plugin installs — see Installing into your agents first. Everything below is the universal fallback for any other MCP client.
stdio (any standard MCP client)
MemVault speaks plain MCP stdio — the same mcpServers JSON works verbatim in Claude Desktop, Cursor, Cline, Continue, and any other client that reads this format:
A couple of clients use their own one-liner instead of hand-editing JSON:
DeepSeek Harness (dsh) — a domestic (China) agent harness — gets deeper treatment than a generic stdio config: a native Cordis plugin (dsh-plugin/) that auto-injects memory into the system prompt and auto-extracts at turn end, with no per-turn cooperation required from the agent. See docs/INSTALL.md §2.5 for both the zero-code MCP route and the deep-integration plugin.
Other MCP-compatible agents — international or domestic, IDE plugin or CLI harness — should work the same way: any client implementing standard MCP stdio/SSE can connect without MemVault-side changes. The ones above are the ones we've actually verified; if you get MemVault working with another one, a PR to this list is welcome.
SSE (multi-client, network-accessible)
SSE features: multi-client simultaneous connections, auto-triggered embedding backfill on initialization, HTTP remote access.
Note:
--transport sseonly mounts the MCP-over-HTTP endpoint (/mcp) — it does not expose the REST API (/api/*). The Web Dashboard is served by the REST backend (memvault-mcp --transport http --serve-web <dist>), and the Obsidian plugin also uses the REST API and requires--transport httpinstead. See docs/INSTALL.md §2.6.
21 MCP Tools
2 MCP Resources
Configuration (.env file & environment variables)
Copy .env.example to ~/.memvault/.env and uncomment what you need — it is also the single source of truth documenting every key.
Precedence (high → low): CLI flags > process environment > ~/.memvault/.env > MEMVAULT_PROFILE scenario profile > built-in defaults. Every binary loads the env file first thing at startup; --env-file <path> or MEMVAULT_ENV_FILE points elsewhere, and a missing file is silently skipped. memvault-cli status prints where each setting came from (env / file / profile / default).
Don't want to read fourteen switches? memvault-cli init --profile <name> writes a coherent bundle instead — coding-agent, assistant, team, edge-lite — with each line commented by its rationale (init --list shows them all, --dry-run previews). A profile is the lowest-precedence layer: it fills only keys your shell and env file leave unset, so leaving one configured permanently can never silently undo your own tuning. It writes no secrets, only provider names. See .env.example for what each profile sets and why.
Two groups are intentionally not in the table below: the host installation contract (MEMVAULT_AGENT_ID, MEMVAULT_HOOK_EXTRACT, … — per-agent values authored in each host's plugin/mcpServers config), and the proxy's upstreams topology (structured data, lives in ~/.memvault/proxy.yaml).
CLI Reference
save · outcome · search · list · review · delete · session-start · compliance-enqueue · compliance-finalize · resource · extract · dedup · decay · forget · forget-log · doctor · promote · backup · export · export-skill · import · import-skills · import-agent · ingest · confirm-read · backfill-embeddings · sync · reindex · migrate-to-markdown · checkpoints · restore · supersede · status · bench · eval-history · server start|status|stop · dashboard
Key Commands
Integrations
Installing into your agents
MemVault ships native adapters for most agents — one shared store, per-host identity via MEMVAULT_AGENT_ID, four tiers (Tier 1/2/3 details below; per-client registration snippets in integrations/mcp-clients/).
Core packages & versions:
Shipped plugins & versions — each bumps on its own schedule:
Tier 1 — one-command native plugins (memory injected by hooks; extraction opt-in where the host exposes lifecycle hooks):
⚠️ = the host has no injection hooks; recall is rule-driven (the agent calls session_start once) with the bundled canonical rule text.
Tier 2 — paste an MCP snippet. Strict-JSON registrations with per-host identities in integrations/mcp-clients/ (target paths in its README): Cursor · Windsurf · Cline/Roo · Continue · Zed · JetBrains AI/Junie · VS Code (Copilot Chat) · Claude Desktop.
Tier 3 — native manifests. Qoder (.qoder/rules/ + .qoder-plugin/ + a UserPromptSubmit hook template), Grok Build (grok plugin install dreamor/memvault --trust), the Hermes Python plugin (integrations/hermes/, pre_llm_call recall + extraction helper) and the pi extension (pi-extension/, declared by the root package.json pi manifest; pi install git:github.com/dreamor/memvault) ship in-repo; OpenClaw and Swival consume the generated root skills/ (also exported to .openclaw/skills/); Devin stays a manual recipe in integrations/README.md.
Tier 4 — instruction-only rule copies. Canonical text + scripts/gen-rule-copies.sh (parity-checked in CI) produce AGENTS.md/CLAUDE.md blocks, .cursor/rules/, .clinerules/, .kiro/steering/, Junie guidelines; memvault-cli sync --watch keeps them fresh from the store.
Any other MCP-speaking client (domestic or international, IDE plugin or CLI harness) connects with zero MemVault-side changes via the standard stdio config below — not individually verified; PRs adding a verified entry are welcome.
GUI surfaces are independent of agent installs: Web Dashboard (9 tabs) · Obsidian plugin (α — Vault sync + browse/capture) · MCP Proxy (transparent memory injection for any upstream server).
Architecture
Project Status
MemVault is in beta. The Rust core (storage / search / injection) is CI-gated and stable; plugin adapters and GUI surfaces evolve faster. All configuration is environment-driven (see .env.example), and every change is recorded in CHANGELOG.md.
Testing
The unit and integration suites are the primary gate, but e2e-release-check.sh
exists because several defects were visible only by running the built binaries
end to end — an edit that approved cleanly and changed no behaviour, a second
injection channel that bypassed the review gate, a provenance field dropped by the
reranker. All of them lived in the wiring between layers, where every layer's own
tests passed. It needs no LLM key and no embedding provider, so it is safe to gate
a release on, and CI runs it on every push.
Documentation
Contributing
- 🐛 Bugs: Issue Tracker
- 💡 Ideas: Feature Request
- 📖 Guide: CONTRIBUTING.md
- 🔒 Security: SECURITY.md
- ♿ Accessibility: ACCESSIBILITY.md
License
MemVault is released under the MIT License.
來源:README.md,提交 6997c12
工具
0版本歷史
11- v0.7.0最新Nov 7, 2026
- v0.6.12Nov 4, 2026
- v0.6.11Oct 30, 2026
- v0.6.10Oct 29, 2026
- v0.6.4Oct 25, 2026
- v0.6.3Oct 22, 2026
- v0.6.1Oct 21, 2026
- v0.6.0Oct 20, 2026
- v0.5.0Oct 16, 2026
- v0.4.3Oct 15, 2026
- v0.3.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Memory 整合

Memory.fit
fit.memory官方發布者
託管式 Memory.fit 伺服器,讓 AI 讀取你的訓練、睡眠、恢復與飲食資料,並寫回每週計畫、每日目標和飲食計畫。
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pg官方發布者
pg.ddx.io: the PostgreSQL community's memory 的託管 MCP 服務,由 pg.ddx.io 發布;無需登入;Streamable HTTP;29 個工具。
var.gg Naming Memory
gg.var官方發布者
遠端 MCP 伺服器,可依領域概念推薦並檢索韓、日、中、越、英多語言的程式識別字名稱,並提供 ERD 結構查詢。

Counterparts
ai.counterparts
為 Claude Code 與 Claude Desktop 提供的本地優先長期記憶:助理自行寫下關於你與專案的筆記,並在之後的對話中回想起來。

LAHZE - Persian AI Memory Platform
由 GitHub 帳號 pedramgholizadeh 發布
以波斯語為先的地理記憶平臺:發現地點,起草併發布僅限波斯語的記憶。AI 翻譯