Skip to main content Switch to mobile version krouter-memory 3.1.0 Your AI remembers what you decided, and what you changed your mind about: plain-Markdown memory for any MCP app.
pip install krouter-memory Copy PIP instructions
Your coding agent's subconscious: mention something you settled before, and it comes to mind.
Local, plain-Markdown memory for Claude Code, Codex, Cursor and any MCP app. Every answer names the page it came from; when the memory has nothing, it says so. No API key, no server, and it calls no model to write or to look things up.
You: Going to move the clippings originals into the archive folder this afternoon.
Agent: That note says not to move the Clippings originals (from your "User preferences" page under 02 Methods/Agent), so I'd hold off. If you meant a copy, tell me and we can sort out a safe way.
You: The coffee machine on our floor is broken again.
Agent: Sorry to hear that. I can help you draft a quick message to facilities if you'd like.
You mentioned it in passing; KRouter recognised a rule you had settled and handed the agent that page. The second remark touches nothing in the memory, so nothing was added. (Real replies, Claude Sonnet 5.5, 2026-11-10; what the agent was handed.)
Measured against the field's leader
Every number below was registered before it was run, on questions never used to tune anything (HELDOUT.md), one run each.
Read with: the host for the first rows is deepseek-flash, and so is the model that judged their replies; set 59's reader is deepseek-flash, and its answers were judged twice, by Sonnet and by deepseek-flash, which agree on 198 of 200 verdicts (88 vs 89 by the second judge); its accuracy is not comparable with any published chart; set 45's messages were written by Claude, not by a person; Hindsight ran with its default English embedding model on messages half in Chinese; on LongMemEval the reader read more tokens from KRouter's pages (15,716 a question) than from Hindsight's memories (6,744). Whether 3.0's semantic recall beats plain keyword search at the same page count is still running (set 57 A). Until it says so: answer accuracy from the ranker's pages is level with BM25 at the same page count (set 55); following the vault's connections is where KRouter brings more (set 18, below). Help us check all of this on your own machine: issue #115.
curl -fsSL https://github.com/398894496-arch/KRouter/releases/latest/download/bootstrap.sh -o /tmp/krouter-install.sh && sh /tmp/krouter-install.sh ~/.dsh-krouter/current/scripts/krouter doctor # OK, or what is missing and how to fix it ~/.dsh-krouter/current/scripts/krouter search "what did we decide about X?" # your first question It asks nothing and connects the AI apps it finds. An existing folder keeps every file, and uninstalling never touches your memory. Windows, the Claude Code plugin, --minimal, every file it changes: docs/INSTALL.md.
New in 3.0, optional: semantic recall. One command adds a local embedding model and a reranker (about 600 MB), fetched from whichever of HuggingFace and ModelScope is faster here and checked by sha256:
python3 ~/.agents/skills/krouter/scripts/semantic.py setup /path/to/your/vault From then on the hooks, lookups and MCP server use them by themselves; a page asked about in other words is found. semantic.py setup runs for real in CI on Linux, macOS and Windows: both models downloaded and checked, then a lookup with them. The refusal still weighs your words only, so a near match never turns "not in the memory" into an answer.
See it in a few seconds, nothing installed, no key:
uvx --from git+https://github.com/398894496-arch/KRouter krouter demo # or, in a clone: PYTHONPATH=sdk python3 -m krouter.cli demo How it works
Each message, the prompt hook looks the message up on your machine. It hands the agent a page when the message names it or clearly matches it, or, with semantic recall installed, when the reranker is confident it is about that page even in other words (new in 3.1, set 60: twice as many spoken mentions brought by the hook itself on held-out messages, no wrong page); otherwise a few page names, and the agent decides whether to look; for an unrelated message, nothing. That is why it costs a quarter of the tokens of injecting memories into every message.
Each session, an index of what has been settled goes in front of the agent.
Writing down happens without you: every turn is recorded locally when it ends, with no model. Distilling those records into pages runs at night with a model you agree to once, with a source for every line, as provisional pages you can review and revert. The agent is not left to write into your memory mid-conversation, so a guess never becomes a rule.
A changed mind replaces the old answer instead of competing with it; the replaced page stays, marked.
You can see all of it: the memory is a folder of Markdown you open in Obsidian or any editor; krouter why and krouter view show what it holds and why it answered.
With what is connected to it
A lookup brings five pages: three that match, then up to two that your vault itself connects to them: a link, a replacement, the same session, rare words they share, being cited together. It is a walk over the vault's own graph, with no model and no graph database to keep. On LongMemEval's held-out half, five pages each, it brings every session the answer needs for 210 of 235 questions; plain BM25 at the same five pages, 198; on questions that span several sessions, 40 against 31 (set 18).
Any other app that runs a local MCP server:
{ "mcpServers": { "krouter": { "command": "python3", "args": ["/Users/you/.agents/skills/krouter/scripts/mcp_server.py"] } } } In the official MCP Registry as io.github.398894496-arch/krouter. What each app was tested on: docs/OVERVIEW.md.
It is also your knowledge base
Folders you declare in krouter-kb.txt (and the clippings it recognises) are reference material: listed apart in the answer and never counted as what you decided. krouter kb import brings in PDF, Word and HTML with tools already on your machine. Details.
An experimental self-hosted server holds several separate memories, each with its own token (docs/TEAM.md). Tested on one machine only.
pip install krouter-memory gives the krouter command and a Python package; a dependency-free JavaScript client is in sdk/js. docs/FRAMEWORKS.md.
krouter view opens a local, read-only page of what the memory holds and how pages connect; krouter why " " explains one answer. Details.
Lookups, hooks, semantic recall and the MCP server send nothing anywhere. Only the optional nightly distilling and the optional team server talk to anything else, and only after you turn them on. SECURITY.md.
One maintainer, about 80 stars, three months old: the main risk in adopting it. The team server and the Kubernetes and systemd files have not run on a real cluster.
The ranker alone is level with BM25: on LongMemEval, answer accuracy at the same page count is no different (set 55); the gain is in following the vault's connections (set 18). 3.0's semantic recall against BM25 is being measured (set 57 A).
Semantic recall makes a lookup slower: about 3.8 s in the resident MCP server on an 8 GB M2 (0.2 s without it), and each message's hook 4.6–5.4 s instead of 1.2–1.9 s (KROUTER_HOOK_RERANKED=0 for the old speed); the first embedding of a large vault takes an hour or more on a CPU.
On Cursor there is no per-message layer.
The benchmarks are ours: registered before each run and reproducible, but no third party has rerun them yet (issue #115).
Every benchmark, its registration and its log: bench/memory_honesty/HELDOUT.md; the numbers in one place: docs/NUMBERS.md; what is and is not tested now: docs/STATUS.md.
Each set's script and command are in its registration; docs/VERIFY.md walks through rerunning them, and issue #115 collects outside results.
docs/README-FULL.md (the full 2.3 front page: every earlier number and caveat) · docs/DETAILS.md · docs/COMPARE-ALL.md · docs/INSTALL.md · CHANGELOG.md · SECURITY.md · 中文 · MIT
Author: KRouter contributors
Both files in this release have provenance metadata.
llamaindex langgraph semantic rerank
memory mcp agent-memory obsidian second-brain claude-code codex cursor
License OSI Approved :: MIT License
Operating System OS Independent
Programming Language Python :: 3
Release files for krouter-memory 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 1.3 MB
Release files / krouter_memory-3.1.0.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Release files / krouter_memory-3.1.0-py3-none-any.whl
Security for krouter-memory 3.1.0
Both files in this release have been uploaded with provenance metadata.
With provenance krouter_memory-3.1.0.tar.gz Nov 30, 2026
Attestation for krouter_memory-3.1.0.tar.gz
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 30, 2026 2 release files Full provenance
Nov 29, 2026 2 release files Full provenance
Nov 28, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




