
Cross-Agent Memory
io.github.indamicesPublished by GitHub account indamicesv1.0.0Updated Oct 25, 2026
Local-first shared memory for AI coding agents: one searchable store, served over MCP. MIT.
The publisher's own server: Memory.fit
Overview
A local-first shared memory service that indexes AI coding session history and project files so any MCP-capable agent can search and add to one store.
- What you can do
- Search indexed sessions and project files semantically across all connected tools and projects (memory_search). Write decisions, insights and discoveries into the shared store for later sessions (memory_write). List collections and their sizes (memory_stats). Behind the tools, a local service ingests Claude Code, OpenCode and ZCode session stores plus registered project folders, embeds them locally and keeps a single SQLite store.
- When to use it
- Use it when you work with several AI coding agents and want them to share what was already decided, explained or discovered, instead of re-pasting context each time. It suits a single machine with a growing corpus of sessions and project docs that should stay private and offline.
- Requirements
- macOS or Linux (Windows not supported yet), Python 3.10+, and Ollama running locally with an embedding model such as bge-m3. The memory service must be started separately; the MCP server is a local stdio process pointed at it via MEMORY_SERVICE_URL, and MEMORY_SERVICE_TOKEN if auth is enabled. No accounts or cloud access.
Installation
In SourceWeft
- Open Cross-Agent Memory in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: README.md at commit 6e95aed
Tools
0Version history
1- v1.0.0LatestOct 25, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Memory integrations

Memory.fit
fit.memoryOfficial publisher
Hosted Memory.fit server that lets an AI read your training, sleep, recovery and nutrition data and write back weekly plans, targets and meal plans.
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pgOfficial publisher
pg.ddx.io: the PostgreSQL community's memory's hosted MCP server, published by pg.ddx.io; no sign-in required; Streamable HTTP; 29 tools.
var.gg Naming Memory
gg.varOfficial publisher
Remote MCP server that suggests and searches code identifier names from domain concepts in Korean, Japanese, Chinese, Vietnamese and English, and exposes ERD…

Counterparts
ai.counterparts
Local-first long-term memory for Claude Code and Claude Desktop: the assistant writes notes about you and your projects and recalls them in later sessions.

LAHZE - Persian AI Memory Platform
Published by GitHub account pedramgholizadeh
LAHZE - Persian AI Memory Platform's hosted MCP server; no sign-in required; Streamable HTTP; 13 tools.