█

AI/TLDR

MemSearch

Cross-platform semantic memory for coding agents — Markdown journals are the source of truth, Milvus is a rebuildable index, and a conversation in one agent is searchable from all of them

Agent MemoryOpen source
Language
Python
License
MIT

Overview

MemSearch, from the Zilliz team behind Milvus, is a memory layer for coding agents that deliberately refuses to own your data. Every memory is a plain Markdown file — daily journals under `.memsearch/memory/` that you can read, edit, grep and commit — and Milvus is described as a "shadow index": a derived, rebuildable cache that exists only to make those files searchable. If the index is lost, it is re-created from the Markdown; if the Markdown is lost, nothing recovers it. That ordering is the design.

The reason to run it is portability across agents. Plugins exist for Claude Code, Codex, DeepSeek Harness, OpenClaw and OpenCode, and they share one backend, so a decision explained to Claude Code is recallable from Codex later the same day. Capture is automatic: a stop hook parses the last turn, an LLM summarises it into a couple of lines, and the result is appended to that day's journal with a session anchor and indexed. Recall works either through an explicit `/memory-recall` command or by the agent invoking the skill on its own when a question clearly needs history.

Retrieval is hybrid and staged. Dense vector search runs alongside BM25 sparse search with RRF fusion, and recall proceeds in three layers — search, then expand, then the original transcript — so an answer can be traced back to what was actually said rather than to a summary of it. SHA-256 content hashing skips unchanged content on reindex and a file watcher keeps the index live. Embeddings default to ONNX bge-m3 running locally on CPU with no API key and no cost; OpenAI and Ollama are configuration switches, as is the Milvus backend, which spans a zero-config Milvus Lite file, a self-hosted Docker server and Zilliz Cloud by changing one URI.

Two optional layers sit above the journals. Background maintenance keeps a durable `PROJECT.md` (active threads, decisions, risks, next steps) and `USER.md` (your preferences and working style) current between sessions. Beyond that, "skills from memory" is a third, procedural layer: the agent distils workflows you repeat into installable skills following the open Agent Skills standard, keeping candidates in a git-tracked `.memsearch/skill-candidates/` store that stays inert until you choose to install one. Both are off by default and are turned on by asking the agent in plain language.

What it does

  • One memory across five agents — Claude Code, Codex, DeepSeek Harness, OpenClaw and OpenCode plugins all read and write the same backend
  • Markdown is the source of truth: human-readable daily journals you can edit and version-control, with Milvus as a rebuildable shadow index
  • Hybrid retrieval — dense vectors plus BM25 with RRF reranking, and three-layer progressive recall that can fall back to the original transcript
  • Local-first embeddings: ONNX bge-m3 on CPU by default, no API key; OpenAI or Ollama by a single config command
  • Milvus backend spans Milvus Lite (a single file, zero config), self-hosted Docker, and Zilliz Cloud — switch by changing `milvus.uri`
  • Optional background maintenance of durable PROJECT.md and USER.md notes, plus procedural "skills from memory" distilled into the open Agent Skills format
  • A CLI and Python API (index, search, expand, watch, compact) for building the same memory into your own agents

Getting started

Each agent has its own one-line install and they all share the same backend, so configuration done once applies everywhere. The first launch downloads the local ONNX embedding model (~558 MB) from the Hugging Face Hub.

Install the plugin for your agent

Claude Code installs from the repository's plugin marketplace; restart it afterwards to activate the plugin. DeepSeek Harness installs the published plugin into a profile.

bashbash
# Claude Code
/plugin marketplace add zilliztech/memsearch
/plugin install memsearch

# DeepSeek Harness
uv tool install "memsearch[onnx]"
dsh plugin --profile web add @zilliz/memsearch-dsh
A terminal running Claude Code whose session-start banner reports the loaded MemSearch plugin — version v0.4.10, the ONNX bge-m3 embedding model, the local Milvus database path and the project's collection name.
What installing the plugin looks like from the agent's side: the session-start line names the embedding model, the Milvus file and the per-project collection MemSearch will write to.MemSearch README ↗

Check that capture is working

Carry on working as usual for a few turns. Each completed turn is summarised and appended to the day's journal, so the files should appear on their own.

bashbash
ls .memsearch/memory/
cat .memsearch/memory/$(date +%Y-%m-%d).md

Recall something

Either call the skill explicitly, or just ask the question — the agent invokes the memory skill itself when it senses the answer needs history.

texttext
/memory-recall what did we discuss about Redis?

Choose an embedding provider

ONNX is the default and runs locally on CPU at no cost. The other providers need their own credentials.

bashbash
memsearch config set embedding.provider onnx     # default — local, free
memsearch config set embedding.provider openai   # needs OPENAI_API_KEY
memsearch config set embedding.provider ollama   # local, any model

Point it at a bigger Milvus when you outgrow the file

Milvus Lite needs no setup and keeps everything in ~/.memsearch/milvus.db. Moving to a self-hosted server or to Zilliz Cloud is the same one setting.

bashbash
memsearch config get milvus.uri                  # → ~/.memsearch/milvus.db
memsearch config set milvus.uri http://localhost:19530
# or a managed cluster:
memsearch config set milvus.uri "https://in03-xxx.api.gcp-us-west1.zillizcloud.com"
memsearch config set milvus.token "your-api-key"

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when you switch between coding agents and want the context from one session available in the next, whichever tool you happen to open
  • Reach for it when you need the rationale behind an old decision — which architecture, library or migration path was chosen, and why — rather than re-deriving it
  • Reach for it when you want agent memory you can read, edit and commit as files instead of an opaque store
  • Reach for it when the same workflow keeps being explained from scratch and you would rather have it distilled into an installable skill

How MemSearch compares

MemSearch alongside other open-source agent memory tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Claude-Mem★ 102kPersistent memory layer for coding agents: it captures what an agent does during a session, compresses it into semantic summaries, and injects the relevant parts back into later sessions.
Mem0★ 67.4kA memory layer that you add to existing LLM agents to extract, store, and recall user facts and preferences across sessions using vector, graph, and key-value backends.
MemPalace★ 59.6kLocal-first agent memory that stores conversations verbatim instead of summarising them, with a structured palace index, pluggable vector backends and an MCP server.
Hindsight★ 51.1kAn agent memory server that stores facts and experiences, consolidates them into observations and mental models, and serves them back through retain, recall, and reflect operations.
OpenViking★ 40.2kA context database that stores an agent's memories, resources, and skills as one browsable viking:// filesystem with three-tier (abstract/overview/details) on-demand loading.
Cognee★ 32.5kA graph-native memory engine that turns raw documents and conversations into a queryable knowledge graph for agents that need to build lasting knowledge.
Graphiti★ 32kA library that builds a temporal knowledge graph from an agent's conversations and data so facts can be tracked and queried as they change over time.
MemSearch★ 2.8kCross-platform semantic memory for coding agents — Markdown journals are the source of truth, Milvus is a rebuildable index, and a conversation in one agent is searchable from all of them