zilliztech/memsearch
Persistent agent memory with editable Markdown and a rebuildable Milvus index
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
memsearch is a retrieval layer for agent memory, not the authoritative database for it. Markdown files hold the durable record. The Python core chunks those files, embeds the chunks and writes a derived Milvus index. PyMilvus connects to the backend, Milvus Lite provides the default local database, Click supports the CLI, and watchdog monitors file changes. The CLI and Python API expose indexing, search, expansion, watching and compaction.
Host-specific plugins sit above that core and handle tasks such as capturing completed turns and exposing recall inside an agent. Retrieval is progressive: find relevant chunks, expand the note for context, then consult the original transcript when supported and needed. This separation lets a custom agent reuse retrieval without adopting another host's capture hooks, but the capture policy and transcript integration remain the responsibility of the plugin or application.
Key Capabilities & Differentiators
Hybrid search combines dense-vector retrieval and sparse BM25 through reciprocal rank fusion. This gives both paraphrased questions and exact terms such as configuration keys a route into the result set. The Python API supports top_k and a source_prefix filter. SHA-256 content hashes let indexing skip unchanged content, while the file watcher handles ongoing edits. Jev is available as an additional remote reranking stage through the TypeSafe API.
Embeddings can run on CPU through ONNX bge-m3, use a local model through Ollama, or call OpenAI, the Python API default. Beyond daily journals, optional background tasks maintain PROJECT.md and USER.md when journal content has changed and the minimum interval has elapsed. Workflow distillation can produce Agent Skills candidates in .memsearch/skill-candidates/; those files can be reviewed and diffed before explicit installation. Automatic background distillation is off by default.
Trade-offs & Limitations
Compared with building directly on Milvus, memsearch supplies the Markdown ingestion pipeline and agent integrations, but its data model centers on journals and note chunks. Compared with plain Markdown and keyword search, it adds semantic recall and a path back to conversation context at the cost of embedding computation and index upkeep. Milvus is rebuildable, but recovery time still depends on corpus size and embedding throughput. A sensible backup plan prioritizes Markdown and separately preserves any original transcripts needed for deep recall.
A shared Milvus endpoint can centralize an index, but it does not by itself synchronize the authoritative Markdown or provide an agent-memory permissions model. source_prefix narrows retrieval; it is not an authorization boundary. Choose explicitly where journals, summaries and queries may go, especially if using hosted embeddings, a hosted index or remote reranking. If you enable skill distillation, review candidates before installation: those artifacts can become executable agent workflows rather than merely searchable notes.
Hardware & Deployment Guide
Run on Python 3.10 or newer; classifiers list Python 3.10–3.13, and the manifest specifies separate minimum PyMilvus and Milvus Lite versions for Windows. Install memsearch[onnx] for the CLI's CPU embedding path and plan for an approximately 558 MB bge-m3 download from Hugging Face Hub on first use. For a local trial, Milvus Lite defaults to ~/.memsearch/milvus.db. For a dedicated backend, set milvus_uri to a self-hosted Milvus Server, which can be deployed with Docker, or to Zilliz Cloud and supply milvus_token as needed.
Local embeddings and a local index do not by themselves make a plugin offline: initial model provisioning, session summaries and optional remote reranking have separate connectivity requirements. Validate the complete capture-to-recall loop with the chosen host, including what leaves the machine. The v0.4.25 release addressed interrupted maintenance locks and Windows launcher behavior; v0.4.26 fixed DSH summary timeout handling; v0.4.27 added an Antigravity plugin and replaced a retired native capture summary model. These releases illustrate why plugin compatibility and model availability should be tested on upgrades.
Developers and teams that switch between supported coding agents, or build their own, and want editable long-term journals with semantic and keyword recall.
You need a turnkey multi-tenant memory service with centralized authorization and auditing, require end-to-end offline operation without validating plugin dependencies, or only need exact keyword lookup.
Quick Start & Installation
uv tool install --upgrade "memsearch[onnx]" agy plugin install https://github.com/zilliztech/memsearch/tree/main/plugins/antigravity
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| memsearch ★ | 3k | +35 | Python | MIT | Persistent agent memory with editable Markdown and a rebuildable Milvus index |
| EverOS | 14k | +41 | Python | Apache-2.0 | Local Markdown and indexes give AI agents portable long-term memory |
| OpenViking | 43.2k | +255 | Python | AGPL-3.0 | A directory-scoped RAG database for inspectable agent knowledge and memory |
| Memori | 17.9k | +337 | Python | — | An SDK-based agent memory layer for persistent state across sessions. |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/zilliztech/memsearch.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about memsearch
How do I integrate memsearch into a custom agent without a plugin?
MemSearch API with paths pointing to your Markdown directories. Call index() to build the searchable index and search(..., top_k=..., source_prefix=...) to retrieve relevant chunks within an optional source scope. Capture and transcript expansion are separate integration concerns; the API shown is a Python library interface, not an HTTP service.Does local indexing require a GPU, and how should I size the host?
Can I use memsearch commercially and keep the deployment self-hosted?
When is memsearch a better fit than direct Milvus integration or plain Markdown search?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy