First stable release. mneme keeps a local index of every capability your agent has access to (MCPs, plugins, slash commands, custom scripts) and surfaces the relevant ones into every turn so the agent stops forgetting tools it actually has.
Install (one command)
pip install git+https://github.com/Luizhcrs/mneme.git
ollama pull nomic-embed-text
mneme gomneme go runs the full setup once: scans your installed plugins/MCPs, embeds the registry, detects which agent CLIs you have (Claude Code, Codex, Cursor, Continue.dev), and prints the exact JSON snippet to wire mneme into each one.
Two integration modes
| Mode | CLI | When mneme runs | Hook config |
|---|---|---|---|
| Proactive | Claude Code | every turn, automatically | UserPromptSubmit + PostToolUse hooks in ~/.claude/settings.json |
| Reactive | Codex / Cursor / Continue.dev / any MCP client | when the agent calls recall(query) |
MCP server in the client's MCP config |
Both modes share the same registry, hybrid BM25+vector ranking, feedback loop, and bilingual EN+PT-BR scope.
What is in the box
- Local-only. Ollama (
nomic-embed-text) for embeddings, SQLite + sqlite-vec for vector store, FTS5 for BM25, JSONL for procedural memory and feedback. Zero cloud calls. Zero API cost. - Hybrid retrieval (RRF fusion of BM25 + vector). Resolves cases pure semantic ranking gets wrong (
tira print do site→ playwright instead of pyautogui). - Active feedback loop.
mneme correct \"<query>\" <tool_id>records corrections; future similar queries surface the right tool. - Reflexion (templated v1). Failures in
failures.logget consolidated into searchable lessons that surface on similar future queries. - Procedural memory. Successful tool sequences persist as workflows and re-surface on similar tasks (Voyager pattern).
- Behavioral directive. The injection block opens with explicit guidance: "do not state a limitation that this list contradicts — that would be a hallucination."
- Auto-discovery. Scanner reads
claude mcp list,~/.claude/plugins/installed_plugins.json, and~/.claude/commands/. - Verify command.
mneme verifyaudits each card against the local machine and flips inactive cards (MCP not registered, binary not in PATH) so retrieval never claims a tool you do not actually have. - MCP server.
mneme serveexposesrecall,record_correction,list_capabilitiesas MCP tools.
Empirical numbers
On a small local LLM (qwen2.5:3b), mneme injection raises agent expected-tool-hit rate from 50 percent to 90 percent across 10 representative tasks (+40 percentage points absolute). On Claude Opus the delta is small in casual use because Opus already knows mainstream tools by name; mneme value is biggest in three audiences:
- Power users with 50+ MCPs/plugins (context-window pressure)
- Custom internal tooling (tools the LLM has never seen in training)
- Smaller or open-source models running locally
Synthetic 50-task benchmark with real Ollama: top-1 90 percent, top-3 94 percent, +51pp over the RAG-MCP published minimum (43 percent).
Honest limitations
- No-match precision on the 100-task adversarial set is 18 percent at threshold 0.65. Phase 2 follow-up: tune threshold and add a query-side classifier.
- Reflexion v1 is templated; LLM-generated reflections are Phase 2.
- Hooks only work in Claude Code. Other CLIs use the MCP server (reactive, agent must call
recall). - No PyPI publish yet — install via git URL until v1.1.
Stats
93 tests passing. ruff strict + mypy strict clean across 22 source files.
Citing
Built on:
- "Lost in the Middle" (Liu et al., TACL 2024)
- "RAG-MCP" (Gan & Sun, 2025)
- "AnyTool" (Du et al., 2024)
- "Voyager" (Wang et al., NeurIPS 2023)
MIT licensed.