Your LangGraph agent forgets every user the moment the thread ends
One package fixes that.
Give every user of your agent a private, persistent memory vault. Install langchain-memoryrouter and wire it in as tools, graph nodes, or a BaseStore.
One pip install. Per-user memory, permanently.
14 days free
Full access. Wire it in, give one user a memory, cancel anytime.
See the difference
User: Same as always, ship it to staging first
Agent: I don't have a record of your deployment preference. Which environment should I target?
A new thread, and this user is a stranger again.
User: Same as always, ship it to staging first
Agent: Deploying to staging, then production after your usual 15-minute smoke test window.
One recall call, and it knows this user.
Sound familiar?
Every user re-explaining their preferences on every new thread
Building your own vector store just to remember users between sessions
LangGraph checkpointing memory per thread, not per user across threads
With MemoryRouter
One Memory Key per user gives each user a private, persistent vault
Recall and retain work as tools, graph nodes, or a BaseStore, whichever fits your graph
Every write path sanitizes messages automatically, storing conversation text only
14-day free trial. Cancel anytime.
Install in two minutes
Pick the integration pattern that fits your graph.
$ pip install langchain-memoryrouterPython 3.9 to 3.13. Requires langchain-core 0.3.0+, langgraph 0.2.0+, httpx 0.25+.
from langchain_memoryrouter import create_memory_tools
retain, recall = create_memory_tools(memory_key="mk_user_123")
model_with_tools = model.bind_tools([retain, recall])memoryrouter_retain and memoryrouter_recall become tools the model can call, the same way it calls any other bound tool.
from langchain_memoryrouter import create_recall_node, create_retain_node
recall_node = create_recall_node(memory_key_config_key="memory_key")
retain_node = create_retain_node(memory_key_config_key="memory_key")
result = graph.invoke(
{"messages": messages},
config={"configurable": {"memory_key": "mk_user_123", "thread_id": "chat_abc"}},
)create_recall_node injects a ready-to-use memory context block on every graph turn. create_retain_node stores the conversation automatically.
from langchain_memoryrouter import MemoryRouterStore
store = MemoryRouterStore(memory_key="mk_user_123")
graph = builder.compile(store=store)For code that already expects a LangChain BaseStore. Semantic retain and search, not literal key listing: yield_keys returns empty and mdelete is a no-op.
Sign up, create one Memory Key per user, wire it in.
How it works
Without MemoryRouter:
User Graph Model Response (gone when the thread ends)
With MemoryRouter:
User Graph (recall node or tool call, keyed by memory_key) Model Response retain
memory_key is your unit of isolation. One key per end user of your product gives each user a private vault that persists across threads, sessions, and even different agents built on the same key. Your model choice, provider, and LangGraph runtime are untouched. MemoryRouter only stores and retrieves memories over HTTP.
Open source package
langchain-memoryrouter is public on PyPI, MIT licensed, with a public SDK repository you can read before you install.
Sanitized by default
Every retain path strips tool calls, tool-call IDs, and system messages before storage. Not configurable, always on.
Three integration shapes
Tools, nodes, or BaseStore. Pick the one that matches how your graph already handles memory and state.
Same memory outside LangGraph too
The same Memory Key works over the MemoryRouter API directly and over MCP for coding tools, so users can carry memory between your product and their own AI tools.
Wire it in in two minutes. 14-day free trial.
Start free. Then just $20/mo.
14-day free trial. Cancel anytime.
- 200M memory tokens / mo included
- Unlimited Memory Keys, one per user
- Same memory reachable over MCP for coding tools
- 300 to 500 ms average recall on a typical vault
- Your keys, your data, your control
No inference markup, ever.
FAQ
Give your users a memory tonight
14 days free. One pip install. Every user of your agent gets a memory that survives the thread.