# memsearch

> Cross-platform semantic memory layer for AI coding agents, backed by Markdown files and a Milvus hybrid search index.

memsearch is an open-source memory layer from Zilliz for AI coding agents. It captures agent conversations as Markdown files, indexes them with hybrid search, and recalls relevant context across sessions. Plugins are available for Claude Code, Codex, DeepSeek Harness, OpenClaw, and OpenCode, and a CLI and Python API are provided for developers building their own agents.

## What It Is

memsearch gives coding agents persistent, searchable memory. After a plugin is installed, conversation turns are captured and summarized automatically into daily Markdown files under `.memsearch/memory/`. Those files are the source of truth, while Milvus acts as a derived, rebuildable index. Typical uses listed in the docs include resuming debugging threads, recovering decision rationale, tracing feature history, and carrying context between different agents.

## How Recall and Indexing Work

Content is scanned, chunked, embedded, and stored in a Milvus hybrid index that combines dense vectors, BM25 sparse search, and RRF reranking. SHA-256 hashing means unchanged content is not re-embedded, and a file watcher keeps the index in sync with edits. Recall is progressive across three layers: ranked search results, expansion to the full Markdown section, and drilling into the original transcript. An LLM-powered compact command summarizes older memories.

## Platforms and Shared Memory

All plugins share the same Markdown format and derive collection names from the project directory, so a conversation in one agent becomes searchable in the others. Claude Code uses shell hooks and a forked-subagent skill, Codex uses shell hooks and a skill, DeepSeek Harness uses a native plugin with a web memory browser, and OpenClaw and OpenCode use TypeScript plugins. Optional features include PROJECT.md and USER.md maintenance notes and distilling repeated workflows into installable agent skills; both are off by default.

## Setup Path

The CLI installs with uv, pipx, or pip, and the ONNX bge-m3 embedding option runs locally on CPU without an API key. Other embedding providers include OpenAI, Google, Voyage, Jina, Mistral, Ollama, and local sentence-transformers. The Milvus backend can run as Milvus Lite (default), a self-hosted Milvus Server, or Zilliz Cloud. The project is MIT licensed and requires Python 3.10 or newer.

## Features
- Persistent cross-session memory for AI coding agents
- Hybrid search combining dense vectors, BM25, and RRF reranking
- Markdown files as source of truth with rebuildable Milvus index
- SHA-256 content dedup to skip re-embedding unchanged content
- Live file watcher sync
- LLM-powered memory compaction
- Three-layer progressive recall (search, expand, transcript)
- Cross-platform memory sharing between agents
- Skills from memory (procedural memory distillation)
- Optional PROJECT.md and USER.md maintenance
- CLI and Python API
- Multiple embedding providers including local ONNX
- Optional Jev reranking

## Integrations
Claude Code, Codex, DeepSeek Harness, OpenClaw, OpenCode, Milvus, Zilliz Cloud, OpenAI, Google, Voyage, Jina, Mistral, Ollama, ClawHub

## Platforms
WINDOWS, MACOS, LINUX, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v0.4.21

## Links
- Website: https://zilliztech.github.io/memsearch/
- Documentation: https://zilliztech.github.io/memsearch/
- Repository: https://github.com/zilliztech/memsearch
- EveryDev.ai: https://www.everydev.ai/tools/memsearch
