This project has been archived by its maintainers, and is no longer receiving any updates.
Mimir LangGraph Integration
Drop-in persistent long-term memory for LangGraph agents via Mimir.
Install
Install from source (not yet published to PyPI):
pip install langgraph
pip install -e integrations/langgraph/
Quick Start
from mimir_langgraph import MimirStore
# Create a Mimir-backed store
store = MimirStore(
binary="mimir", # or /usr/local/bin/mimir
db_path="~/.mimir/data/mimir.db",
)
# Use as a drop-in BaseStore replacement
store.put(("users", "123"), "preferences", {"theme": "dark", "language": "en"})
item = store.get(("users", "123"), "preferences")
print(item.value) # {"theme": "dark", "language": "en"}
# Search across namespaces
results = store.search(("users",), query="preferences theme")
for r in results:
print(r.key, r.value, r.score)
Integration with LangGraph Agents
from langgraph.graph import StateGraph
from langgraph.store.base import BaseStore
from mimir_langgraph import MimirStore
# Use MimirStore as your long-term memory
store = MimirStore()
# Build your graph with store
graph = (
StateGraph(AgentState)
.add_node("agent", agent_node)
.compile(store=store)
)
The store persists across sessions. Agents can retrieve context
from previous interactions using store.search().
Configuration
| Parameter | Default | Description |
|---|---|---|
binary |
"mimir" |
Path to the mimir binary |
db_path |
"~/.mimir/data/mimir.db" |
Path to the SQLite database |
timeout |
30.0 |
Tool call timeout in seconds |
encryption_key |
None |
Path to AES-256-GCM key file |
ollama_url |
None |
Ollama endpoint for hybrid search |
embedding_model |
None |
Embedding model name (requires ollama_url) |
How It Works
LangGraph's BaseStore interface maps cleanly onto Mimir's entity model:
| LangGraph | Mimir |
|---|---|
namespace: tuple[str, ...] |
category: str (joined with /) |
key: str |
key: str |
value: dict |
body_json: str (JSON) |
search() |
mimir_recall (FTS5) |
put() |
mimir_remember |
delete() |
mimir_forget |
Requirements
- Mimir v1.0.0+ installed (
curl -sSL https://raw.githubusercontent.com/Perseus-Computing-LLC/mimir/main/scripts/bootstrap.sh | bash) - LangGraph >= 0.2.0
- Python 3.10+
Metadata
Release files for mimir-langgraph 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mimir_langgraph-0.1.1.tar.gz | 8.3 kB | Without provenance | Details for mimir_langgraph-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mimir_langgraph-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mimir_langgraph-0.1.1-py3-none-any.whl |
Total release size: 15.2 kB
Release files / mimir_langgraph-0.1.1.tar.gz
| Download URL | mimir_langgraph-0.1.1.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7391204e0091dded9b3bccdc665a92297911b684c43ee8e1076b853565de3a5
|
|
BLAKE2b-256 checksum How to use checksums |
9475de961244af08cce561e789ec64989d6c758ac9eb09436973baac2f5c6832
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / mimir_langgraph-0.1.1-py3-none-any.whl
| Download URL | mimir_langgraph-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd003968315c83764780b9cfcb62011883b83bb2d5c7ef22c5e7eab7690e8e5c
|
|
BLAKE2b-256 checksum How to use checksums |
337cfe87a8053ae18086d724f0b276b8e2de85f65204c3a15e042b28ed2bdd91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for mimir-langgraph 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.