
Cross-Agent Memory
io.github.indamices由 GitHub 帳號 indamices 發布v1.0.0更新於 Oct 25, 2026
Local-first shared memory for AI coding agents: one searchable store, served over MCP. MIT.
發布方自己的服務:Memory.fit
概覽
本地優先的共享記憶服務,索引 AI 程式開發工作階段歷史與專案檔案,讓任何支援 MCP 的代理都能搜尋並寫入同一份記憶。
- 可以做什麼
- 跨所有已連接的工具與專案進行語意搜尋,查找已索引的工作階段與專案檔案(memory_search)。將決策、見解與發現寫入共享儲存,供後續工作階段使用(memory_write)。列出集合及其規模(memory_stats)。工具背後是一個本機服務,負責匯入 Claude Code、OpenCode、ZCode 的工作階段儲存與已註冊的專案資料夾,在本機產生向量並保存在單一 SQLite 資料庫中。
- 適用情境
- 當你同時使用多個 AI 程式開發代理,希望它們共享先前已定案的決策、說明與發現,而不必反覆貼上上下文時使用。適合單一機器上工作階段與專案文件持續成長、且需要保持私密與離線的情境。
- 執行需求
- macOS 或 Linux(尚未支援 Windows)、Python 3.10+,以及在本機執行的 Ollama 與 bge-m3 等嵌入模型。記憶服務需另行啟動;MCP 伺服器是本機 stdio 程序,透過 MEMORY_SERVICE_URL 指向該服務,啟用驗證時還需 MEMORY_SERVICE_TOKEN。不需帳號或雲端存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Cross-Agent Memory,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Cross-Agent Memory
One local memory for all your AI coding agents.
Your Claude Code history, Codex sessions, Cursor work, project docs and decisions —
indexed once, searchable from every agent, forever yours.
[License: MIT] [Python 3.10+] [CI] [Local-first]
English | 中文
🎬 ▶ Play the full demo (2 min, Mandarin narration)
https://github.com/user-attachments/assets/a8d5d77c-98bc-42f7-9c58-7b48295875fe
[Terminal demo: install, verify, store and search memory — click to play the full video]
Real run: install → verify → store → search. No mock-ups. Click the poster to play the 2-minute narrated walkthrough.
The problem
Every AI coding tool starts from zero.
You spend a week with Claude Code designing an architecture, switch to Codex next week, and it knows nothing about what you decided or why. You paste context again. You re-explain the project. Three tools later, the same conversation has happened five times, and none of it is searchable.
cross-agent-memory fixes this. It runs a small local memory service that:
- Ingests your session history from any AI tool (Claude Code / Codex-style CLIs / OpenCode / ZCode / …) and any project folder you point it at.
- Indexes everything with local embeddings into a single searchable store.
- Serves it back to every agent through an HTTP API or directly as MCP tools — so any MCP-capable agent can recall what every other agent (and you) already figured out.
No cloud. No accounts. Nothing ever leaves your machine.
Features
- 🔒 Local-first, private by design — embeddings and search run on your machine (Ollama + SQLite + sqlite-vec). Airplane mode is a supported mode.
- 🧠 Cross-tool by design — connectors for Claude Code, OpenCode and ZCode session stores, plus a generic file watcher for any project/docs folder. Agents share one memory regardless of which tool produced it.
- 🔌 One-line MCP integration —
memory_search,memory_writeandmemory_statsare exposed over the Model Context Protocol. Claude Code, Codex CLI, Cursor and anything else MCP-capable can use them today. - ⚡ Fast at real scale — built for large corpora: sqlite-vec vec0 KNN with a 1-bit coarse recall prefilter and hot/warm/cold tiering. The reference deployment searches 2,000,000+ chunks in 0.36–1.20 s (see measured numbers).
- 🛠 Ops included — health/monitor endpoints, rolling-window degradation detection, backups & restore, snapshot archiving, tier maintenance scripts.
- 📈 Battle-tested — extracted from a continuously running multi-agent system where four different AI tools share one memory daily, with millions of chunks and daily incremental indexing.
Architecture
Design notes and the full retrieval pipeline are documented in docs/ARCHITECTURE.md.
🤖 Let your AI agent install it (one paste)
The fastest path: open this repository in your AI coding assistant and paste the block below. It installs everything locally — venv, dependencies, a fresh isolated database — verifies a real write/search round trip, and reports back with exact commands and results. Nothing is sent anywhere; the agent works on your machine only.
Prefer doing it yourself? The manual path is right below. The same protocol is documented for agents in INSTALL-FOR-AI.md and AGENTS.md.
Quickstart
0. Prerequisites
- macOS or Linux (Windows is not supported yet — connectors use POSIX file locks)
- Python 3.10+
- Ollama running locally (for embeddings)
1. Install
2. Start the service
3. Give it something to remember
Register any project folder (docs, decisions, notes):
The folder needs a
.memory-service.yamlor sensible defaults are used — see examples/. Files are indexed immediately; later changes are batched by a debounce window (default 1 hour,MEMSVC_WATCH_DEBOUNCE). For instant pickup:POST /api/reindex {"project": "..."}or start withMEMSVC_WATCH_DEBOUNCE=0.
Or ingest AI-tool session history with a connector:
4. Search from anywhere
Or write a memory directly (decisions, insights — great for agent hooks):
Connect your agents (MCP)
mcp_server.py is a zero-dependency MCP (stdio) server that exposes the
memory API as tools. Point your agent at it:
Claude Code
or in .mcp.json:
Codex CLI (~/.codex/config.toml)
Cursor / other MCP agents — same server command and args in that tool's MCP
settings. If you started the service with MEMSVC_TOKEN set, also set
MEMORY_SERVICE_TOKEN for the MCP server.
Once connected, your agent gets:
How retrieval works
Each /api/search request runs a staged pipeline:
- Query embedding — computed locally (Ollama), cached by text hash.
- Coarse recall — a 1-bit-per-dimension code per chunk is prefiltered by Hamming distance (skipped automatically for small collections).
- Exact KNN — sqlite-vec
vec0cosine KNN over the shortlist (falls back to a numpy brute-force path when sqlite-vec is unavailable). - Re-ranking — time decay (30-day half-life) + MMR diversity + a small
helpfulfeedback factor. - Result — text + source + distance + score per hit.
Under the hood it also handles the boring-but-critical parts: content-hash deduplication, per-connector increment watermarks, skipping sessions that are still being written, batch-write pacing, WAL tuning, and stale-index self-healing.
Measured numbers
From the reference deployment (a Mac mini M4 Pro running this service 24/7 for a multi-agent setup):
These are real numbers from a heavy, messy, constantly-growing corpus — not a toy benchmark. Your numbers will vary with corpus size and hardware; on a fresh database everything is sub-100 ms.
API overview
Full reference with request/response examples: docs/API.md.
Configuration
Everything works with defaults; tune via environment variables when needed:
Operations
- Health:
GET /api/healthreportsstatus, disk usage, embedding availability and degraded reasons (e.g. slow queries, disk pressure) — designed to be scraped by a cron/monitor without false alarms. - Backups:
scripts/backup_silent.py(cron-friendly) orPOST /api/backup. Restore withPOST /api/restore. - Tiering (optional):
scripts/migrate_to_vec0.pybuilds the vec0 index;scripts/tier_rebuild.pybuilds hot/warm/cold tier tables to keep the hot set small on very large corpora. - Snapshot archiving:
scripts/archive_silent.py. - Health cron with alerts:
scripts/health_check.py(optional Feishu webhook support is built in — configure.alert.env).
Design choices (and non-goals)
- SQLite, not a vector server. One file, zero services, trivially backed up, works offline. The vec index is derived and rebuildable.
- Local embeddings, not an API. Privacy and zero marginal cost; swap the
model in
config.pyif you prefer something else. - Files are the source of truth. Everything indexed can be re-ingested from its source; deleting the database loses nothing that lives on disk.
- Not a cloud sync product. This is a local service for one machine (multiple agents, one memory). Multi-user/server mode is on the roadmap.
- Not a vector database benchmark entry. It prioritizes a small dependency surface and operability over raw ANN throughput.
Roadmap
- Web console (browse / search / curate memories)
- More connectors: Codex CLI session store, Cursor, Aider, generic JSONL
- First-class memory types (facts / lessons / code-change context) with extraction pipelines
- Multi-machine sync for people who work across hardware
- Python package / Docker image for one-command installs
Issues and PRs are welcome — especially new connectors. See CONTRIBUTING.md.
Acknowledgements
Built on the shoulders of excellent tools: SQLite, sqlite-vec, Ollama, numpy, watchdog.
License
MIT © 2026 indamices
來源:README.md,提交 6e95aed
工具
0版本歷史
1- v1.0.0最新Oct 25, 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 翻譯