MemSearch Memory Layer
Persistent, cross-platform semantic memory for AI coding workflows.
- Source repo
- zilliztech/memsearch
- Stars
- ★ 2.6k
- Last updated
- 4d ago
- License
- MIT
- Primary language
- Python
- FA score
- 53/100 · Major gaps
At a glance
- Works with
- Universal · cross-platformCodex · Claude Code · OpenAI API · Claude API
- You'll need
- Typical use
- A developer alternating between Claude Code and Codex CLI who wants to retrieve an earlier Redis, deployment, or architecture discussion.
- Main limitation
- The default ONNX bge-m3 path requires an initial network download of an approximately 558 MB model.
- Source review
- 53/100 · Major gaps
What does this agent do, and when should you use it?
MemSearch is a persistent semantic-memory layer for AI coding agents, with plugins for Claude Code, Codex CLI, OpenClaw, and OpenCode plus a CLI and Python API. It stores captured summaries and other memories as editable, versionable Markdown, then maintains Milvus as a rebuildable shadow index. Retrieval combines dense vectors, BM25 sparse search, and RRF reranking, and can move from a matching chunk to its Markdown section or a raw session transcript. It defaults to local single-file Milvus Lite, while Zilliz Cloud and self-hosted Milvus are configurable alternatives. It fits teams or individual developers who want durable context across coding-agent sessions and tools, provided they are comfortable managing local files, indexing, and embedding runtime choices.
Platform plugins capture conversation turns after a session turn completes, summarize them, and append the result to date-based Markdown files under .memsearch/memory/; the documented Claude Code flow also adds a <!-- session:UUID --> anchor. memsearch index re-chunks Markdown, uses SHA-256 to skip unchanged content, embeds changed chunks, and upserts them into Milvus. memsearch search performs BM25 plus dense-vector hybrid retrieval with RRF reranking, while memsearch expand <chunk_hash> returns the full surrounding Markdown section. For deeper recall, the documented third layer uses parse-transcript <session.jsonl> to access raw dialogue. Developers can also use MemSearch(paths=[...]), await mem.index(), and await mem.search() in a Python agent.
- A developer alternating between Claude Code and Codex CLI who wants to retrieve an earlier Redis, deployment, or architecture discussion.
- An engineer maintaining a long-lived codebase who needs to recover why a module, configuration, migration, or API choice was made before changing it.
- A Python agent developer who wants to index Markdown knowledge and add semantic recall through the
MemSearchclass. - A team keeping project journals in local Markdown and wanting those files to remain editable and version-controllable while indexes stay current.
- A multi-user team that needs to point the same workflow at Zilliz Cloud or a dedicated self-hosted Milvus instance.
How do you install or deploy this agent?
Python >=3.10 is required. To install the CLI with the default local ONNX embedding option:
uv tool install "memsearch[onnx]"Then run:
memsearch config init
memsearch index ./memory/The default ONNX bge-m3 embedder runs locally on CPU and needs no API key, but downloads an approximately 558 MB model from HuggingFace Hub on first launch. To use OpenAI embeddings, run memsearch config set embedding.provider openai and supply OPENAI_API_KEY. For the Codex CLI plugin, the documented commands are:
git clone --depth 1 https://github.com/zilliztech/memsearch.git
bash memsearch/plugins/codex/scripts/install.sh
codex --yoloHow do you use this agent?
Place searchable Markdown in a directory and run memsearch index ./memory/. Query it with memsearch search "Redis caching", or use memsearch search "auth flow" --top-k 10 --json-output for script-friendly results; use memsearch expand <chunk_hash> to inspect the complete section around a result. Run memsearch watch ./memory/ for live re-indexing. In Python, create mem = MemSearch(paths=["./memory"]), call await mem.index(), then call await mem.search("Redis config", top_k=3). After installing the Codex CLI plugin, use $memory-recall what did we discuss about deployment? to recall saved context.
What are this agent's strengths and limitations?
- Markdown remains the source of truth, so memories are human-editable and version-controllable while the Milvus index is rebuildable.
- One backend is documented for Claude Code, Codex CLI, OpenClaw, and OpenCode, with both CLI and Python
MemSearchinterfaces for custom integrations. - Hybrid BM25, dense-vector, and RRF retrieval is paired with progressive search → expand → transcript recall.
- SHA-256 content hashing and the file watcher avoid re-embedding unchanged content and keep changed files synchronized.
- The default ONNX bge-m3 path requires an initial network download of an approximately 558 MB model.
- Milvus Lite is a single-file default; dedicated multi-user deployments require configuration of Zilliz Cloud or a Docker-based self-hosted Milvus Server.
- Automatic capture depends on platform-specific plugins and hooks; the Codex CLI instructions require
codex --yolofor ONNX model network access. - Advanced
PROJECT.mdandUSER.mdmaintenance and memory-to-skill distillation are off by default and require provider, model, and interval configuration when enabled.
How does this agent compare with similar options?
MemSearch explicitly treats Markdown as editable source data and Milvus as a rebuildable shadow index, rather than making the vector database the primary memory store. Its documented embedding choices include local ONNX, OpenAI, and Ollama, and its Milvus deployment options include Milvus Lite, Zilliz Cloud, and self-hosted Milvus.
Key facts side by side with the most closely related agents.
| Agent | Source review | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|
| MemSearch Memory Layer This agent | 53 · Major gaps | ★ 2.6k | 4d ago | Python | Codex · Claude Code · OpenAI API · Claude API |
| Obsidian Mind | 79 · Good | ★ 4.7k | 21d ago | TypeScript | Codex · Claude Code |
| Compartment | 76 · Good | ★ 582 | 1d ago | Python | Codex · Claude Code |
| deja-vu | 75 · Good | ★ 875 | 4d ago | Go | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
Evidence shows: plugins capture conversations by default and write to local Markdown, but least privilege is not explicitly addressed; skill installation requires user confirmation, but background maintenance tasks are off by default; data flow transparency is good, README details capture, indexing, retrieval; sensitive data handling lacks explicit encryption or redaction; dependency versions are pinned but no vulnerability scanning evidence; external effects include downloading models and uploading to cloud, but not clearly warned; rollback only mentioned for skill candidates, not memory index rebuild; source attribution not explicit. Deductions: least privilege, user confirmation, sensitive data handling, dependency security, external effects, rollback, source attribution are insufficient or partially missing.
Evidence shows: README and pyproject.toml are consistent, tests cover chunking logic, but no full test results; dependencies are declared but availability not verified; failure messages not documented. Deduction: failure messages insufficient.
Evidence shows: clearly targets agent users and developers, scenarios rich; capability boundaries defined via CLI/API and plugins; triggers clear (commands or natural language); environment fit covers multiple platforms and deployment modes. Deduction: some boundaries (e.g., background maintenance) not detailed.
Evidence shows: clear information architecture with diagrams; detailed install notes; stable naming (memsearch); rich examples; known limitations not explicitly listed; MIT license clear; version exists but no changelog; maintenance responsibility not explicit. Deductions: known limitations, changelog, maintenance responsibility insufficient.
Evidence shows: output is Markdown files, directly usable; high marginal value, cross-platform memory; good cost-benefit, local ONNX free. Deduction: none.
Evidence shows: README claims partially supported by code examples, but no independent verification; tests cover some functionality, but no external corroboration; facts and inferences not clearly separated. Deductions: claim traceability, cross-source corroboration, fact-inference separation insufficient.
- Plugins capture all conversations by default, which may include sensitive information; users should be aware and configure storage location.
- Background maintenance tasks and skill distillation are off by default, but when enabled may automatically modify files; explicit user authorization is required.
- Dependency on ONNX model download and cloud service upload introduces network dependencies and potential data exfiltration risks.
- No vulnerability scanning or dependency security audit evidence provided; users are advised to check themselves.
FAQ
Is Zilliz Cloud required?
Does the default setup require an API key or paid embedding service?
Where is memory stored, and can I edit it?
.memsearch/memory/. Milvus is a derived index, and edited files can be re-indexed with memsearch index or kept current with memsearch watch.