Overview
What is memtomem?
Section titled “What is memtomem?”memtomem gives your AI agent memory that persists across sessions and across agents. It runs as a local MCP server — your agent uses the same tool-calling it already does, and past information becomes searchable.
Use It When
Section titled “Use It When”- You keep re-explaining yesterday’s decisions in today’s session — memtomem solves the “every new session is a blank slate” problem. Walk through the flow in Memory Persistence Across Sessions.
- You want notes or docs to be searchable by your agent — point
mm index ~/notesat a folder of Markdown / structured files and every MCP-connected agent can query it. - Multiple agents need to share the same knowledge — Claude Code, Cursor, Codex CLI, and any other MCP client share one memory store.
Start with a Verified Round Trip
Section titled “Start with a Verified Round Trip”uv tool install 'memtomem[all]'mm init --preset minimal --non-interactive --mcp skipmm statusmm add "Release smoke tests run before cutover" --tags release,decisionmm search "release smoke tests"This proves storage and search before a client is involved. Continue with Quick Start and then Connect an AI Client.
Core Concepts
Section titled “Core Concepts”- Hybrid Search — BM25 keyword + dense vector search merged via RRF, so exact identifiers and meaning-based queries both land. See Hybrid Search.
- Namespaces — Per-agent routing scopes (
agent-runtime:{id}) plus asharedscope for cross-agent knowledge. They organize retrieval and are not access-control boundaries. See Multi-Agent Collaboration. - Lifecycle Policies —
auto_archive/auto_expire/auto_promote/auto_tagrun on a background scheduler, so memories are aged and promoted automatically.
Architecture
Section titled “Architecture”AI Agent (Claude Code, Cursor, Antigravity CLI, …) ↕ MCP protocolmemtomem server ↕SQLite (FTS5 + sqlite-vec)memtomem runs as a local-first MCP server. SQLite storage and ONNX embeddings stay on your machine and need no GPU or account. Optional remote embedding, rerank, LLM, and observability providers contact the endpoints you configure.
Relationship to STM
Section titled “Relationship to STM”| LTM (memtomem) | STM (memtomem-stm) | |
|---|---|---|
| Role | Persistent storage & search | Real-time proxy & compression |
| Required? | Yes (core) | Optional |
| How it works | Agent calls mem_search when needed | Relevant memories can be injected into calls routed through the STM proxy or supported hooks |
The default setup is LTM alone. If you want token-optimized responses with proactive memory injection, add memtomem-stm as a proxy in front.
Package Info
Section titled “Package Info”| PyPI | memtomem |
| Latest release | 0.3.12 |
| CLI | mm |
| License | Apache 2.0 |
| GitHub | memtomem/memtomem |
Next Steps
Section titled “Next Steps”- Quick Start — Install and verify your first memory in 10 minutes
- Memory Persistence Across Sessions — Save in session A, recall in session B
- Hybrid Search — How the search engine works
- Multi-Agent Collaboration — Namespace design and sharing workflows
- Context Gateway — Define agents / skills / commands once, then sync, move, or copy them across projects and runtimes
- MCP Tools — Full tool reference
- CLI Reference —
mmcommand reference