back to home

zilliztech / memsearch

A Markdown-first memory system, a standalone library for any AI agent. Inspired by OpenClaw.

View on GitHub
968 stars
86 forks
45 issues
PythonShell

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing zilliztech/memsearch in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/zilliztech/memsearch)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

  memsearch OpenClaw 's memory, everywhere. https://github.com/user-attachments/assets/31de76cc-81a8-4462-a47d-bd9c394d33e3 > šŸ’” Give your AI agents persistent memory in a few lines of code. Write memories as markdown, search them semantically. Inspired by OpenClaw's markdown-first memory architecture. Pluggable into any agent framework. ✨ Why memsearch? • šŸ“ **Markdown is the source of truth** — human-readable, -friendly, zero vendor lock-in. Your memories are just files • ⚔ **Smart dedup** — SHA-256 content hashing means unchanged content is never re-embedded • šŸ”„ **Live sync** — File watcher auto-indexes changes to the vector DB, deletes stale chunks when files are removed • 🧩 **Ready-made Claude Code plugin** — a drop-in example of agent memory built on memsearch šŸ“¦ Installation Optional embedding providers šŸ Python API — Give Your Agent Memory šŸš€ Full example — agent with memory (OpenAI) — click to expand šŸ’œ Anthropic Claude example — click to expand šŸ¦™ Ollama (fully local, no API key) — click to expand > šŸ“– Full Python API reference with all parameters → Python API docs šŸ–„ļø CLI Usage Set Up — Interactive wizard to configure embedding provider, Milvus backend, and chunking parameters: Index Markdown — Scan directories and embed all markdown into the vector store. Unchanged chunks are auto-skipped via content-hash dedup: Semantic Search — Hybrid search (dense vector + BM25 full-text) with RRF reranking: Live Sync — File watcher that auto-indexes on markdown changes (creates, edits, deletes): LLM Summarization — Compress indexed chunks into a condensed markdown summary using an LLM: Relative and paths are automatically resolved to the absolute form used at index time. Utilities — / > šŸ“– Full command reference with all flags and examples → CLI Reference šŸ” How It Works **Markdown is the source of truth** — the vector store is just a derived index, rebuildable anytime. šŸ”’ The entire pipeline runs locally by default — your data never leaves your machine unless you choose a remote backend or a cloud embedding provider. 🧩 Claude Code Plugin memsearch ships with a **Claude Code plugin** — a real-world example of agent memory in action. It gives Claude **automatic persistent memory** across sessions: every session is summarized to markdown, every prompt triggers a semantic search, and a background watcher keeps the index in sync. No commands to learn, no manual saving — just install and go. > **Note:** The plugin defaults to **ONNX bge-m3** embedding — no API key required, runs locally on CPU. On first launch, the model (~558 MB) is downloaded from HuggingFace Hub. If the first session appears to hang, the model is still downloading in the background. You can pre-download it manually: > > > > If the download is slow or stuck, set to use a mirror. > šŸ“– Architecture, hook details, and development mode → Claude Code Plugin docs āš™ļø Configuration Settings are resolved in priority order (lowest → highest): • **Built-in defaults** → 2. **Global** → 3. **Project** → 4. **CLI flags** API keys for embedding/LLM providers are read from standard environment variables ( , , , , etc.). > šŸ“– Config wizard, TOML examples, and all settings → Getting Started — Configuration šŸ”Œ Embedding Providers | Provider | Install | Default Model | |----------|---------|---------------| | OpenAI | (included) | | | ONNX | | (CPU, no API key) | | Google | | | | Voyage | | | | Ollama | | | | Local | | | > šŸ“– Provider setup and env vars → CLI Reference — Embedding Provider Reference šŸ—„ļø Milvus Backend memsearch supports three deployment modes — just change : | Mode | | Best for | |------|-------------|----------| | **Milvus Lite** (default) | | Personal use, dev — zero config āš ļø *not available on Windows* | | **Milvus Server** | | Multi-agent, team environments | | **Zilliz Cloud** | | Production, fully managed | > šŸ“– Code examples and setup details → Getting Started — Milvus Backends šŸ”— Integrations memsearch works with any Python agent framework. Ready-made examples for: • **LangChain** — use as a in any LCEL chain • **LangGraph** — wrap as a tool in a ReAct agent • **LlamaIndex** — plug in as a custom retriever • **CrewAI** — add as a tool for crew agents > šŸ“– Copy-paste code for each framework → Integrations docs šŸ“š Links • Documentation — full guides, API reference, and architecture details • Claude Code Plugin — hook details, progressive disclosure, comparison with claude-mem • OpenClaw — the memory architecture that inspired memsearch • Milvus — the vector database powering memsearch • FAQ — common questions and troubleshooting Contributing Bug reports, feature requests, and pull requests are welcome! See the Contributing Guide for development setup, testing, and plugin development instructions. For questions and discussions, join us on Discord. šŸ“„ License MIT