memsearch
Semantic memory search for markdown knowledge bases
What it is and what it does
Memsearch is a semantic memory layer for AI coding agents that indexes markdown files as a searchable knowledge base. It sits between agent platforms (Claude Code, OpenClaw, Codex CLI, OpenCode) and a vector database (Milvus Lite by default, or Zilliz Cloud), capturing conversation turns automatically and making them retrievable through natural language queries. Memories are stored as human-readable markdown files in `.memsearch/memory/`, with Milvus serving as a derived, rebuildable search index.
The package provides both plugin integrations (zero-config for end users) and a full Python API and CLI for developers building custom agents. It uses hybrid search combining dense vector embeddings (via ONNX, OpenAI, or Ollama), BM25 sparse retrieval, and reciprocal rank fusion reranking. A file watcher auto-indexes new or changed files in real time, and optional background tasks keep project and user notes current across sessions.
Use it for:
- Persistent context across multiple agent conversations: capture decisions and code patterns once, recall them automatically in future sessions.
- Team memory for multi-agent workflows: shared markdown knowledge base indexed and searchable by all agents in an OpenClaw or self-hosted setup.
- Distilling repeated workflows into reusable agent skills: extract procedural patterns from conversation history and package them as installable skills.
- Local-first semantic search without API costs: use the default ONNX embedding provider to index and search markdown without sending data to external services.
- Version-controlled knowledge management: store all memories as plain markdown, enabling git-based collaboration and audit trails.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Memsearch builds a searchable semantic memory index from markdown files, enabling AI coding agents to recall and reuse conversation context across sessions and platforms through vector search and hybrid retrieval.
Yes, if you use one of the supported agent platforms (Claude Code, OpenClaw, Codex CLI, OpenCode) and want persistent, searchable conversation memory with zero configuration. The plugin model is genuinely zero-setup for end users. If you're building a custom agent, the Python API and CLI are available but would benefit from clearer stability guarantees. No known security vulnerabilities and active maintenance make it safe to adopt.
Install
memsearch on PyPI
pip
pip install memsearchuv
uv add memsearchpoetry
poetry add memsearchInstalling memsearch
Before you install
Low friction: pure Python wheel with nine runtime dependencies including click, milvus-lite, and openai. Active maintenance with a release 14 days ago. Supports Python 3.10–3.13.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements.
Quickstart
pip install memsearch
from memsearch import MemSearch
mem = MemSearch()
mem.add_memory("project.md", "content here")
results = mem.search("what did we discuss about caching?")
Requires Python ≥3.10. First-time embedding setup downloads ~558 MB ONNX model from HuggingFace Hub unless configured otherwise.
Verify before relying
- Whether the Python API is fully documented and stable for direct programmatic use outside plugin contexts.
- Performance characteristics when memory grows to thousands of markdown files or millions of indexed tokens.
- Whether background sync and skill distillation features are production-ready or still experimental.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — click, milvus-lite, openai, pathspec, pymilvus, setuptools, tomli-w, tomli, watchdog |
| Maintenance | actively maintained — 14 days since the last release |
| First released | |
| Downloads | 83,002/month — #14,107 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: memsearch-0.4.17-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
mem0aiMem0 adds a persistent, searchable memory layer…
permissive · top 5,000 on PyPI
memoriMemori is a Python SDK that automatically…
permissive · top 15,000 on PyPI
openvikingOpenViking is a context database for AI agents…
agpl · top 15,000 on PyPI
reme-aiReMe is a local-first knowledge base that…
permissive · top 15,000 on PyPI
gptcacheGPTCache provides semantic caching for LLM API…
permissive · top 15,000 on PyPI
agent-framework-mem0Integrates Mem0 persistent memory into…
permissive · top 15,000 on PyPI
agent-framework-azure-aiIntegrates Azure AI Foundry memory capabilities…
permissive · top 15,000 on PyPI
langmemLangMem provides memory management tools for…
permissive · top 15,000 on PyPI
stashaiStash is a CLI and MCP server that creates a…
permissive · top 15,000 on PyPI
zep-cloudZep Cloud SDK provides a client library for…
unclear · top 15,000 on PyPI