LangGraph BaseStore implementation backed by Mnemo for cross-thread agent memory.
Project description
ledgermem-langgraph
LangGraph BaseStore backed by LedgerMem — give your agents persistent, searchable cross-thread memory in one line.
Install
pip install ledgermem-langgraph
Quickstart
from langgraph.graph import StateGraph, MessagesState
from ledgermem import LedgerMem
from langgraph_ledgermem import LedgerMemStore
store = LedgerMemStore(LedgerMem(api_key="lm_...", workspace_id="ws_..."))
# Write
store.put(("users", "u1"), "profile", {"name": "Ada", "tz": "PKT"})
# Read by exact key
item = store.get(("users", "u1"), "profile")
print(item.value)
# Semantic search across the namespace
hits = store.search(("users",), query="who lives in Pakistan?", limit=5)
for hit in hits:
print(hit.score, hit.value)
Wire into a LangGraph workflow
graph = StateGraph(MessagesState)
# ... add nodes / edges ...
app = graph.compile(store=store)
The store is passed to every node via the standard config["configurable"]["store"] channel — your nodes can store.put(...) and store.search(...) to share long-term context across threads.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file getmnemo_langgraph-0.1.0.tar.gz.
File metadata
- Download URL: getmnemo_langgraph-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2de982b4f9ad4ec803bc1f24d67adf1f45bf6d85268d64c021f24006f1bc438
|
|
| MD5 |
d28a6f9757f5a07b7300d5e7381974a3
|
|
| BLAKE2b-256 |
9793a1fc658ba89ff8523dab5ef7e0f12891450388372bd1b4ee56c59c1341d8
|
File details
Details for the file getmnemo_langgraph-0.1.0-py3-none-any.whl.
File metadata
- Download URL: getmnemo_langgraph-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d8a4392331280390901a0123a754489086e93eb2b0229dd2724508564ccad5e
|
|
| MD5 |
df1fc6915316082c6baa911368d5e88e
|
|
| BLAKE2b-256 |
f1c757bb7a727b49b2859fc2bce44cb71336d943b6597f53721eb5b677e6e4dd
|