MemSearch Memory Layer

Persistent, cross-platform semantic memory for AI coding workflows.

Stars
★ 2.6k
Last updated
4d ago
License
MIT
Primary language
Python

At a glance

Works with
Universal · cross-platformCodex · Claude Code · OpenAI API · Claude API
You'll need
Python >=3.10MilvusShell / CLINetwork accessLocal filesystem
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.

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.

  1. A developer alternating between Claude Code and Codex CLI who wants to retrieve an earlier Redis, deployment, or architecture discussion.
  2. An engineer maintaining a long-lived codebase who needs to recover why a module, configuration, migration, or API choice was made before changing it.
  3. A Python agent developer who wants to index Markdown knowledge and add semantic recall through the MemSearch class.
  4. A team keeping project journals in local Markdown and wanting those files to remain editable and version-controllable while indexes stay current.
  5. 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 --yolo

How 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?

Pros
  • 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 MemSearch interfaces 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.
Limitations
  • 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 --yolo for ONNX model network access.
  • Advanced PROJECT.md and USER.md maintenance 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?

FollowAgents source review · FARS-2.1
Major gaps
53/ 100 5-point scale 2.7 / 5
Trust 11/29
Reliability 8/14
Adaptability 12/18
Convention 10/18
Effectiveness 9/13
Verifiability 3/8
Why each dimension lost points
Trust11 / 29 · 1.9/5

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.

Reliability8 / 14 · 2.9/5

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.

Adaptability12 / 18 · 3.3/5

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.

Convention10 / 18 · 2.8/5

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.

Effectiveness9 / 13 · 3.5/5

Evidence shows: output is Markdown files, directly usable; high marginal value, cross-platform memory; good cost-benefit, local ONNX free. Deduction: none.

Verifiability3 / 8 · 1.9/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision b734a142ea01 New commits since this review; the score may not cover them
See the full review method →

FAQ

Is Zilliz Cloud required?
No. The default is zero-configuration, single-file Milvus Lite. You can instead configure Zilliz Cloud or a Docker-based self-hosted Milvus Server.
Does the default setup require an API key or paid embedding service?
No. The default ONNX bge-m3 provider runs locally on CPU without an API key, although it downloads an approximately 558 MB model on first use. Other providers, such as OpenAI, require their corresponding credentials.
Where is memory stored, and can I edit it?
Memory is stored as Markdown; plugin examples use .memsearch/memory/. Milvus is a derived index, and edited files can be re-indexed with memsearch index or kept current with memsearch watch.
Which agent clients have direct plugin support?
The documented plugin platforms are Claude Code, Codex CLI, OpenClaw, and OpenCode. They share the MemSearch backend, but installation and capture mechanisms differ by platform.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents