Markdown-first memory infrastructure for AI agents with hybrid search
Project description
memtomem
🚧 Alpha — APIs, defaults, and on-disk config surfaces may still change between
0.xreleases. Feedback and issue reports are especially welcome at github.com/memtomem/memtomem/issues.
Markdown-first long-term memory infrastructure for AI agents. Core usage is hook-free by default: your files remain the source of truth, and memory changes happen only when you or your agent explicitly call memtomem. Optional client hooks are separate, visible integrations.
Core philosophy: .md files are the source of truth and the vector database is a derived cache. Manage memories as plain text files — memtomem makes them instantly searchable.
Built for:
- AI agents (Claude Code, Cursor, Windsurf, Claude Desktop, Kimi CLI) that need to remember between sessions
- Developers who want a searchable knowledge base built from their existing markdown notes — no proprietary database, no vendor lock-in
- Multilingual content (English, Korean, Japanese, Chinese) via
bge-m3embeddings
Quick Start
# 1. Install memtomem with all features (Python 3.12+)
uv tool install 'memtomem[all]' # or: pipx install 'memtomem[all]'
mm --version
# 2. Configure storage, search, and optional MCP registration
mm init
# 3. Verify a complete memory round trip
mm status
mm add "Deployment checklist uses blue-green rollout" --tags ops
mm search "blue-green"
The search should return the sentence you just added. mm add writes to your configured user memory directory and indexes the entry immediately, so this path works without an existing notes directory or a connected editor.
Choose Minimal in the setup picker for a no-model-download first proof;
rerun mm init later to add semantic search.
To index existing files next:
mm index /path/to/your/notes
If mm init registered an MCP client, ask it to Call the mem_status tool. See Getting Started for install alternatives and MCP Client Setup for manual registration.
[all] includes local ONNX embeddings, the Korean tokenizer, provider SDKs, code chunking, and the Web UI. Install bare memtomem for BM25-only usage. If mm is not on PATH, run uv tool update-shell and open a new shell. If an install appears stale, re-run it with --refresh.
memtomem is the long-term-memory store. memtomem-stm is a separate, optional MCP proxy for automatic surfacing, compression, and caching.
Key Features
- 🔍 Hybrid search — BM25 (FTS5) + dense vectors (sqlite-vec) merged via Reciprocal Rank Fusion. Exact terms via keyword, meaning via semantic, both at once.
- 📦 Semantic chunking — heading-aware Markdown, AST-based Python, tree-sitter JS/TS, structure-aware JSON/YAML/TOML
- ♻️ Incremental indexing — chunk-level SHA-256 diff means only changed chunks get re-embedded
- 🏷️ Namespaces — scope memories into groups (work / personal / project) with optional auto-derivation from folder names; label them (colour, description) from Settings → Namespaces in the Web UI
- 🧹 Maintenance — near-duplicate detection with merge, time-based score decay, TTL expiration, auto-tagging
- 🔄 Export / import — JSON bundle backup and restore with re-embedding
- 🌐 Web UI — polished SPA dashboard for search, sources, indexing, tags, and timeline (
mm web --devunlocks the full maintainer surface including Sessions, Working Memory, and Health Report) - 🧭 Context Gateway — keep canonical Skills, Commands, and Subagents in a project or user Store, optionally install reusable Wiki assets, then sync them to supported runtimes
- ⚙️ Scriptable CLI —
--jsonoutput onmm statusand write commands (mm add/mm reset/mm purge);mm warmuppre-loads local models so the first query skips cold-start - 🛠️ 96 MCP tools — full feature surface as MCP tools, with
mem_dometa-tool routing all registered actions incoremode (default) for minimal context usage - 📌 Pinned Context — small file-backed user/project/agent blocks are composed before retrieved memory
- 🕸️ LangGraph Store — optional
MemtomemBaseStoresupplies tuple-namespace JSON persistence and search
The 96-tool surface includes the new Pinned Context actions
(mem_pinned_list/get/set/delete, mem_context_compose) and review-first
formation actions (mem_formation_scan, mem_candidate_list/review/recover). See the
complete MCP table
for every category.
Documentation
Full documentation lives in the memtomem GitHub repo:
| Guide | Topic |
|---|---|
| Getting Started | Start here — install, configure, save and find your first memory |
| MCP Client Setup | Connect Claude Code, Cursor, Codex, and other clients |
| Core memory tools | Index existing notes, search, and manage memories |
| Configuration | Supported config files, precedence, and environment variables |
| Embeddings | ONNX, Ollama, and OpenAI providers, model dimensions, switching models |
| Context Gateway | Author and sync canonical Skills, Commands, and Subagents to each type's supported AI tools |
| Operations & troubleshooting | Web UI, privacy audits, diagnostics, and recovery |
| Reference | Complete feature reference — all tools and patterns |
| memtomem-stm | Optional STM proxy for proactive memory surfacing (separate package) |
License
Apache License 2.0 — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memtomem-0.3.10.tar.gz.
File metadata
- Download URL: memtomem-0.3.10.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b703b56495a82caab0716194aaf5bb6efd63e9fe9fa2b488121d088c49f1f0e
|
|
| MD5 |
dc8530344176ee66f35bf60083c0e109
|
|
| BLAKE2b-256 |
752fa629e229e5f28ae8e948d7f0e7c7e9f94f9673c21d0b9fe5d11702d54676
|
Provenance
The following attestation bundles were made for memtomem-0.3.10.tar.gz:
Publisher:
release.yml on memtomem/memtomem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memtomem-0.3.10.tar.gz -
Subject digest:
5b703b56495a82caab0716194aaf5bb6efd63e9fe9fa2b488121d088c49f1f0e - Sigstore transparency entry: 2163700552
- Sigstore integration time:
-
Permalink:
memtomem/memtomem@325f907fcc4f74ed2af94584b1841cc05c71dd90 -
Branch / Tag:
refs/tags/v0.3.10 - Owner: https://github.com/memtomem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@325f907fcc4f74ed2af94584b1841cc05c71dd90 -
Trigger Event:
push
-
Statement type:
File details
Details for the file memtomem-0.3.10-py3-none-any.whl.
File metadata
- Download URL: memtomem-0.3.10-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aee4f8aa6679d8644eaa88f77deffd777e46ae6a35d682fc805b2bef4d3bbc0
|
|
| MD5 |
40e81f96c2936f124e0e8291d381c3c2
|
|
| BLAKE2b-256 |
1145e8d7c73b64603c54ccbea89cb3fd683e526c30493edfe429fd66f7cacb00
|
Provenance
The following attestation bundles were made for memtomem-0.3.10-py3-none-any.whl:
Publisher:
release.yml on memtomem/memtomem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memtomem-0.3.10-py3-none-any.whl -
Subject digest:
3aee4f8aa6679d8644eaa88f77deffd777e46ae6a35d682fc805b2bef4d3bbc0 - Sigstore transparency entry: 2163700556
- Sigstore integration time:
-
Permalink:
memtomem/memtomem@325f907fcc4f74ed2af94584b1841cc05c71dd90 -
Branch / Tag:
refs/tags/v0.3.10 - Owner: https://github.com/memtomem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@325f907fcc4f74ed2af94584b1841cc05c71dd90 -
Trigger Event:
push
-
Statement type: