
DeepMem
io.github.deepmemteam由 GitHub 帳號 deepmemteam 發布v0.1.0更新於 Oct 24, 2026
Mem0-compatible persistent memory for AI agents: write facts once, recall them semantically.
概覽
DeepMem 是相容於 Mem0 的託管持久記憶服務,其 MCP 端點讓助理寫入事實並在後續工作階段中依語意檢索。
- 可以做什麼
- 寫入記憶:依 user_id 儲存對話訊息或原始文字,可選擇由 LLM 擷取事實。
- 檢索記憶:融合向量相似度、關鍵字比對、實體加權與時間衰減的語意搜尋。
- 刪除記憶:刪除已存記憶,支援軟刪除與依使用者重設。
- 管理與移轉記憶:依使用者、代理或執行範圍隔離資料,並以 JSON 匯出或匯入。
- 適用情境
- 當你希望助理在工作階段之間記住使用者、專案或偏好的長期事實,又不想自行架設記憶服務時使用。也適合已使用 Mem0 風格 API、想換成可直接替換方案的團隊。
- 執行需求
- 需要 deepmem.dev 上的遠端 MCP 端點(streamable HTTP)。必須提供 DeepMem API 金鑰,透過 Authorization 標頭以 bearer 方式傳送。免費額度之外可能需要付費方案。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 DeepMem,將其新增到工作區。
- 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.deepmemteam%2Fdeepmem/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"deepmem": {
"type": "http",
"url": "https://deepmem.dev/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
DeepMem
Drop-in AI memory layer with 2× faster response and 10× lower cost.
Fully compatible with Mem0 API. Migrate in 5 minutes - one import line.
Self-hostable. No auth, no payment, no lock-in. Or use the managed cloud at deepmem.dev.
[Docker Image] [DeepMem Cloud] [License: MIT]
Cloud · Self-host · Benchmarks · Reproduce them
Migrate from Mem0 in one line - same MemoryClient, same method signatures:
Turn conversations into searchable long-term memory: a FastAPI HTTP API in
front of a Qdrant vector store, with LLM fact extraction, hybrid retrieval
(vector + BM25 + entity boost + time-decay), semantic caching, async batched
distillation, GDPR controls, and a built-in MCP server. It runs in open
mode - no API key, no user registration - so you can deploy it for your own
agents in minutes. Multi-tenant isolation is driven by user_id in the
request body.
Prefer not to self-host? DeepMem Cloud is the managed version of this exact engine at deepmem.dev - same API, no infra. Sign up, grab a key (
dm_live_...), point your base URL athttps://deepmem.dev, done. The cloud and the open-source server speak the same Mem0-compatible API, so client code is identical.
Migrate from Mem0
Already using Mem0? Switch to DeepMem cloud in one line. The deepmem-client
package mirrors mem0.MemoryClient - same class name, same method signatures,
same filters={"user_id": ...} style - so everything after the import stays
untouched.
Behavioral notes
add(infer=True)(the default) is asynchronous on DeepMem cloud - it returnspending=Truewithresults=[]and extracted facts land a few seconds later. (Mem0 cloud'saddis async too - it returnsPENDING.) Passinfer=Falsefor synchronous raw-text storage that's immediately searchable.- No graph relations - DeepMem uses hybrid vector retrieval (vector + BM25
- time-decay), so
relationsis always[]. Mem0's graph features aren't replicated.
- time-decay), so
resetdiffers - Mem0's is account-wide; DeepMem's is per-user_idwith a confirm guard.
Pricing
DeepMem Cloud is 10x cheaper than Mem0 at every paid tier - the same shape of plans, a tenth of the price.
Self-host instead and it's $0 - you pay only your own LLM/embedding provider (the same LLM cost Mem0 charges on top of its plan price), with no memory-service markup. Batched distillation also cuts LLM calls ~80%, so even your provider bill is smaller than per-message extractors.
Plans and limits: deepmem.dev · mem0.ai.
Benchmarks
No cherry-picked headline. The scripts and workload ship in
/benchmarks - run them yourself. Here's what we
measured and the exact config that produced it:
¹ BGE-M3 on a GTX 1070 GPU (2016-era), local file Qdrant,
infer=False, 100 ops, concurrency 1. ² Dominated by local-file Qdrant I/O - a Qdrant server cuts this sharply. ³ Mem0 has no raw-store mode;addalways runs LLM extraction, so this row isn't apples-to-apples.
- Self-hosted is where intrinsic latency lives - no internet RTT, your embedder, your Qdrant. 73 ms p50 search on an old consumer GPU.
- DeepMem cloud beats Mem0 cloud on search p50 (643 ms vs 653 ms) and returns ~2.3x more candidates per search (195 vs 84 hits across 40 queries).
- Cloud latency is RTT-dominated - both cloud columns were measured
through a proxy from mainland China; run-to-run jitter is ~±10%. Run
/benchmarksfrom a low-RTT location for your own numbers.
Why DeepMem
Agent frameworks keep re-discovering that they need persistent, retrievable memory. The hosted options bill per call and send your data to someone else's cloud. DeepMem is the self-hostable alternative: the same Mem0-shaped API you can drop in, but it runs on your box, with your embedder, your LLM key, and your Qdrant - and the code is right here to verify it.
How does DeepMem compare to other Mem0 alternatives? Most are hosted-only or layer memory on top of someone else's vector DB. DeepMem combines three things at once: it's self-hostable (your data stays on your box - $0 beyond your own LLM key), MCP-native (Claude Desktop / Cursor read and write memories directly as tools), and fully open-source - and the managed cloud runs the exact same engine, so cloud and self-host are one API, not two products.
What it is (honestly)
- Hybrid retrieval, not a knowledge graph. Search fuses vector similarity, BM25 keyword match, entity boost, and time-decay scoring. There is no temporal graph layer; if that's what you need, look at Zep.
- Stores preferences, not code dumps. Large fenced code blocks are stripped before LLM extraction, so the store fills with durable user/project facts instead of pasted implementations.
- BYOK, multi-provider. Bring your own LLM (OpenAI / Anthropic / any OpenAI-compatible endpoint) and embedding (BGE-M3 / Google / OpenAI-compatible).
- MCP-native. Ships an MCP server so Claude Desktop / Cursor can read and write memories directly.
Quick start
Three ways to run. All speak the same Mem0-compatible API.
1. Cloud (zero ops)
2. Docker (one command)
Or pull the published image:
The image exposes :8000 (HTTP) and :8001 (MCP). The Dockerfile
and docker-compose.yml cover the GPU variant (CUDA torch + BGE_DEVICE=cuda)
and BGE-M3 model-download options (HF mirror, proxy, or local mount).
3. From source
Write and search in three lines:
user_idis optional (defaults to"default"); send differentuser_ids to isolate end-users.infer: falsestores raw text immediately (test-friendly); the defaultinfer: truequeues for LLM fact extraction.
Feature highlights
Multi-provider by config, not code. Both layers switch on env vars:
BGE_DEVICE=auto|cpu|cuda picks GPU when available, else CPU (force cpu
on small-VRAM cards to avoid multi-process contention). BYOK overrides the
LLM per-request.
Hybrid retrieval. Vector similarity + BM25 keyword + entity boost + time-decay, fused into one score. Over-fetch, re-rank, return.
Async batched distillation. Writes queue behind a silence window and are extracted in batches - ~80% fewer LLM calls than per-message extraction.
Semantic cache. Repeat adds/searches hit a similarity-gated cache and return cached facts without re-embedding or re-querying Qdrant.
Stores preferences, not code. extraction_filter strips large fenced
code blocks before LLM extraction, so the store fills with durable facts,
not pasted implementations.
MCP server. deepmem_write / deepmem_search / deepmem_delete tools
for Claude Desktop, Cursor, and any MCP client.
GDPR. Soft-delete with retention window, hard-delete reset, SHA-256
id masking in logs, export/import for portability.
API
agent_id / run_id optionally scope writes/reads (mirrors Mem0's three-level
isolation: user -> agent -> run). Interactive docs at /docs.
MCP integration
The cloud exposes a remote MCP endpoint (streamable HTTP):
Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.
Claude Code - one command:
Or install the plugin (bundles a /deepmem:setup command that guides API-key
configuration):
Cursor → Settings → MCP → Add new MCP server, or edit
~/.cursor/mcp.json (global) / .cursor/mcp.json (per project). Cursor
resolves ${env:NAME} variables in url and headers, so the key can live
in an environment variable instead of the config file:
(with DEEPMEM_API_KEY=dm_live_... exported in your shell, or paste the
literal key if you prefer). Community MCP listings with one-click "Add to
Cursor" live on cursor.directory; official
plugins ship in the Cursor Marketplace.
DeepSeek Harness (dsh) - one overlay file, no dsh plugin needed (dsh
connects any MCP server through its generic dsh-mcp-client bridge):
See examples/dsh for details and self-hosted variants.
Self-hosted (stdio, bundled server, no key needed in open mode):
This repo ships a .cursor/mcp.json preconfigured for the self-hosted server - open the repo in Cursor and enable it under Settings → MCP.
Architecture
Single Qdrant collection (memories), hard-filtered by user_id payload.
TenantValidator NFC-normalizes and enforces a [A-Za-z0-9._:-]{1,256}
charset on user_id - never trust the raw request value.
Configuration
Config loads once from env vars (.env, auto-loaded) > config.json > defaults.
Key variables:
Backends auto-switch on env vars - no code changes:
QDRANT_URLset -> remote Qdrant; unset -> local file Qdrant under./data/qdrant.CORS_ORIGINS=*is refused at boot unlessDEEPMEMORY_DEBUG=1.
Production (systemd)
For HTTPS, put Caddy or Nginx in front; scripts/start.sh runs under systemd
or any process manager.
Benchmarks
Two reproducible scripts in /benchmarks:
- Cloud vs cloud - DeepMem cloud vs Mem0 cloud. Register keys at
deepmem.dev + mem0.ai, then
python benchmarks/benchmark_cloud.py. - Self-hosted - your DeepMem, your hardware (no key, no external service):
python benchmarks/run_benchmark.py.
Both ship a self-contained workload and report P50/P95/P99 + throughput. The numbers at the top of this README were produced with these scripts - rerun them and read your own percentiles.
FAQ
Do I need the cloud? No. The open-source server is fully functional on its own. The cloud (deepmem.dev) is the zero-ops option - same API.
Does it work offline? Retrieval and raw-store (infer=false) work with no
network. LLM fact extraction (infer=true) needs an LLM key - or run a local
OpenAI-compatible model (Ollama / vLLM / LM Studio) and point LLM_BASE_URL
at it.
Where is my data? In your Qdrant (local file or server) + a SQLite audit log. Nothing leaves your machine except the LLM/embedding calls you configure.
Multi-tenant? Yes - single Qdrant collection hard-filtered by user_id.
agent_id / run_id add agent and session scope.
Is it production-ready? Used in production under systemd with a remote Qdrant. Local file Qdrant is fine for dev/single-worker; use a Qdrant server for multi-worker or high-throughput.
Development
License
MIT.
來源:README.md,提交 d63016a
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具必需15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分