zilliztech/memsearch
A persistent, unified memory layer for all your AI agents (e.g. Claude Code, Codex, DSH), backed by Markdown and Milvus.
memsearch – Cross‑platform semantic memory for AI coding agents
What it is – A Python library (with a CLI) that records every turn of a conversation with an AI coding assistant, stores the transcript as plain‑text Markdown files, and builds a searchable “shadow index” in Milvus. The same memory can be accessed from several popular coding‑agent platforms (Claude Code, Codex, DeepSeek Harness, OpenClaw, OpenCode) via lightweight plugins, so a discussion you have in one tool becomes instantly searchable in the others.
Key ideas
- Markdown‑first storage – memories are ordinary
.mdfiles (human‑readable, version‑controlled). Milvus is only a rebuildable cache. - Hybrid retrieval – a three‑step pipeline: (1) BM25 + dense vector search with RRF reranking, (2) expand the best chunk to the full Markdown section, (3) optionally fetch the original transcript JSON. This gives fast, relevant recall while avoiding duplicate results.
- Plug‑and‑play agents – each supported platform ships a tiny plugin that automatically captures turns, summarizes them with a local or remote LLM, and injects relevant memories before the next model step.
- Background maintenance – optional tasks keep high‑level
PROJECT.md(project state) andUSER.md(personal preferences) up‑to‑date, and can distill repeated workflows into reusable skills that follow the open‑standard Agent Skills format. - Configurable embeddings – default is the free ONNX
bge‑m3model (CPU, no API key). You can swap in OpenAI, Ollama, or any other provider.
Typical workflow for an end‑user
- Install the plugin for your chosen agent (e.g.,
Claude Code→/plugin marketplace add zilliztech/memsearch). - Chat as usual; the plugin silently appends a daily Markdown journal in
.memsearch/memory/. - When you need to recall something, either run the
/memory-recall …command or ask the agent naturally (“What TTL did we pick for Redis?”). The agent triggers the memsearch skill, which runs the progressive search and returns the relevant excerpt.
For developers
- Use the CLI (
memsearch index,memsearch search,memsearch watch, …) or the Python API to embed custom documents, run hybrid queries, or integrate memory into a bespoke RAG pipeline. - The core stack is: Chunker → Embedder → Milvus (Lite file‑based DB by default, or a managed Zilliz Cloud cluster). All components are replaceable via the
memsearch configcommands.
Installation & quick start
# Install the library (Python 3.10+)
pip install memsearch
# Choose an embedding provider (default downloads ONNX model automatically)
memsearch config set embedding.provider onnx
# Pick a Milvus backend – Milvus Lite works out‑of‑the‑box
memsearch config get milvus.uri # → ~/.memsearch/milvus.db
# Install a plugin, e.g. for Claude Code
/plugin marketplace add zilliztech/memsearch
/plugin install memsearch
After a few conversation turns, you’ll see daily .md files under .memsearch/memory/ and can query them with /memory-recall ….
Supported platforms (plugins)
- Claude Code – marketplace install, zero‑config capture.
- Codex – clone repo, run
plugins/codex/scripts/install.sh. - DeepSeek Harness (DSH) –
uv tool install "memsearch[onnx]"anddsh plugin …. - OpenClaw – install from ClawHub (
openclaw plugins install --force clawhub:memsearch). - OpenCode – add
@zilliz/memsearch-opencodetoopencode.json.
Advanced features
- PROJECT.md / USER.md maintenance – background jobs that synthesize high‑level notes from the daily journals.
- Skill distillation – turn a repeated workflow into an installable skill (stored under
.memsearch/skill‑candidates/). Skills follow the open‑standard Agent Skills format and are portable across agents. - Custom summarizers – override the default per‑plugin summarization model (e.g.,
memsearch config set plugins.codex.summarize.model gpt‑5.1‑codex-mini).
Why it matters Developers who hop between multiple AI coding assistants often lose context when switching tools. memsearch gives them a single, persistent, searchable memory that lives in plain Markdown, costs nothing to store locally, and can be backed by a managed vector store for scale. It also provides a reusable library for anyone building memory‑augmented agents or RAG pipelines.
Project health
- Published on PyPI (
memsearch≥ 0.x). CI badge shows tests run on every push. - Open‑source under an MIT‑style license.
- Active community: Discord chat, GitHub stars, and regular releases (see “What’s New” section for recent DeepSeek Harness support and skill‑distillation features).
TL;DR – memsearch is a real, open‑source Python package that captures, indexes, and semantically retrieves conversation history for AI coding agents. It works across several major coding‑assistant platforms via tiny plugins, stores everything as editable Markdown, and offers a CLI/Python API for custom integration.
Related
- Project
- Project
- Project
- Project
- Project