memento-memory
v1.0.0
Published
Persistent semantic memory for Claude Code — auto-captures context, survives compaction, zero-config recall
Maintainers
Readme
Memento
Persistent semantic memory for AI coding agents. Save, recall, and search context across sessions — even after autocompact.
Works with Claude Code, OpenCode, Cursor, and Windsurf. Runs entirely on your machine — no cloud, no API keys, no data leaving your computer.
Quick Start
npx memento-memory setupThat's it. Your next session will automatically capture and recall context.
Requires Node.js >= 20. See Installation Guide for all methods and IDE-specific setup.
Features
- Auto-capture — hooks silently capture every meaningful tool call in the background
- Survives compaction — memories persist even when the context window is compressed
- Semantic recall — find relevant context by meaning, not exact keywords
- Hybrid search — vector (cosine similarity) + keyword (BM25), weighted scoring
- Smart memory — contradiction detection, importance scoring, entity extraction, relationship tracking
- 17 MCP tools — save, recall, search, forget, list, health, export, import, migrate, session management, project indexing, profiling, compaction, and more
- Cross-project search — find knowledge across all your projects
- Auto-tagging — heuristic classification (code, decision, error, architecture, config, dependency, todo)
- Sensitive data redaction — API keys, tokens, passwords stripped before storage
- Local-first — works offline with local embeddings (all-MiniLM-L6-v2), zero config
- Browser-compatible — runs in browsers and extensions via IndexedDB + fetch-based embeddings
- HTTP API + Graph UI — REST endpoints and D3 visualization of your memory graph
How It Works
Session active → PostToolUse hook captures context → queue
Session ends → Stop hook triggers pipeline:
redact → tag → chunk → dedup → embed → store
Next session → memory_recall restores context automaticallySee How It Works for the full architecture walkthrough.
Documentation
sanathshetty444.github.io/memento
- Installation — setup for all IDEs, troubleshooting
- Quickstart — your first memory in 5 minutes
- Search Modes — vector, keyword, and hybrid explained
- Smart Memory — contradiction detection, importance scoring, entities
- Configuration — full config reference
- MCP Tools Reference — all 17 tools with parameters and examples
- CLI Reference — setup, status, teardown, serve
- Architecture — system overview, memory pipeline, search internals
Development
npm install && npm run build # Build
npm test # Run tests
npm run lint # Lint
npx tsc --noEmit # Type-checkContributing
Contributions welcome! See the Contributing Guide.
