langgraph-minnsdb
LangGraph long-term memory on MinnsDB, the temporal memory database for agents.
LangGraph's built-in stores keep the latest value of each item. When a user moves from London to Berlin, London is gone, and the agent can't answer "where did they live in March?". MinnsDB keeps every version with the time it held, so you can.
Two pieces:
MinnsDBStore: a drop-in LangGraphBaseStore. Sameput/get/search/list_namespacesas any store, plushistory()andget_as_of().MinnsDBMemory: conversation memory in MinnsDB's temporal graph. Send it chat turns and MinnsDB extracts facts, superseding old ones rather than piling them up. Ask what's true about someone now or on any date. Comes as agent tools.
Install
pip install langgraph-minnsdb
You need a MinnsDB server. To run one locally:
git clone https://github.com/Minns-ai/MinnsDB
cd MinnsDB && docker compose up --build
It listens on http://localhost:3000. Point the package at it with MINNSDB_URL, and MINNSDB_API_KEY if the server has auth turned on.
The store
from langgraph_minnsdb import MinnsDBStore
store = MinnsDBStore() # MINNSDB_URL, or http://localhost:3000
graph = builder.compile(store=store) # use it like any LangGraph store
Inside a node it behaves like InMemoryStore or PostgresStore:
store.put(("users", "priya"), "home", {"city": "London"})
store.put(("users", "priya"), "home", {"city": "Berlin"})
store.get(("users", "priya"), "home").value # {'city': 'Berlin'}
store.search(("users",), filter={"city": "Berlin"})
store.list_namespaces(prefix=("users",))
What only this store can do:
store.get_as_of(("users", "priya"), "home", some_time_before_the_move).value
# {'city': 'London'}
for v in store.history(("users", "priya"), "home"):
print(v.value, v.valid_from, v.valid_until)
# {'city': 'London'} <when it was written> <when Berlin replaced it>
# {'city': 'Berlin'} <when it was written> None
get_as_of takes a timezone-aware datetime. Deleting an item closes its last version, and history() still shows it. The async methods (aput, aget, asearch, ...) work too. examples/time_travel.py runs the whole thing inside a LangGraph graph.
Items live in one MinnsDB table (langgraph_store by default, created on first use; pass table= to change it).
Graph memory for agents
from langgraph_minnsdb import MinnsDBMemory
memory = MinnsDBMemory(case_id="user-priya")
memory.remember([{"role": "user", "content": "I'm Priya. I live in London and work at Monzo."}])
# months later
memory.remember([{"role": "user", "content": "I've moved to Berlin and started at Stripe."}])
memory.facts_about("Priya") # what holds now
memory.facts_about("Priya", at="2026-03-01") # what held on that date
memory.facts_about("Priya", history=True) # every version, with valid_from and valid_until
memory.recall("Where does Priya work?")["answer"]
remember also takes LangChain messages, so you can pass state["messages"] after each turn. System prompts and tool messages are skipped, and the agent's own replies are ignored unless you set include_assistant_facts=True. It waits for extraction to finish; pass wait=False to get a background job instead and check it with memory.job(job_id).
Give an agent the tools, for example with LangChain's create_agent:
from langchain.agents import create_agent
agent = create_agent("anthropic:claude-sonnet-5-5", tools=memory.as_tools())
| Tool | What it does | Needs an LLM on the MinnsDB server |
|---|---|---|
save_memory |
Extracts facts from what the user said and writes them to the graph | Yes |
search_memory |
Answers a plain-English question from the graph | Yes |
facts_about |
Lists what's true about a person or thing, now or on a date | No |
The server-side LLM is MinnsDB's own (LLM_API_KEY in its environment), not your agent's model.
For anything else, run MinnsQL directly:
memory.query('MATCH (a)-[r]->(b) WHEN "2026-03-01" WHERE a.name = "Priya" RETURN type(r), b.name')
Limits
search(query=...)ranks by the share of query words found in each item. It does not use embeddings. For meaning-based recall, useMinnsDBMemory.searchandlist_namespacesread the whole table. Fine for thousands of items; past 100,000 rows MinnsDB stops paging and the store raises an error rather than return part of the table.- TTL is not supported.
MinnsDBMemorywrites and reads under itscase_id, so one user's facts never answer for another. Rawquery()is not scoped.
Run the tests
pip install -e ".[test]"
pytest # unit tests
MINNSDB_URL=http://localhost:3000 pytest # plus integration tests against your server
MINNSDB_URL=... MINNSDB_LLM=1 pytest # plus fact extraction, if the server has an LLM key
Licence
MIT. MinnsDB itself is AGPL-3.0; this package only talks to it over HTTP.
Metadata
Release files for langgraph-minnsdb 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langgraph_minnsdb-0.1.0.tar.gz | 16.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langgraph_minnsdb-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.7 kB
Release files / langgraph_minnsdb-0.1.0.tar.gz
| Download URL | langgraph_minnsdb-0.1.0.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a06bf2925717bcf185c6fa59e9b753896e10371fd8e9191799395f037bb5235b
|
|
BLAKE2b-256 checksum How to use checksums |
71471ea843fabdb4914669f877d1090dbc44a1298825f57f55ed5f18d9fca823
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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 Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logRelease files / langgraph_minnsdb-0.1.0-py3-none-any.whl
| Download URL | langgraph_minnsdb-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30952994870fc3f794d4c793817228e48a8b84391e14f4b1f116433a32e5cd72
|
|
BLAKE2b-256 checksum How to use checksums |
1a8558f2e434134076b0fa57910440ea72ebe9738665122d8c0672541603d1a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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 Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency log