Metadata-Version: 2.4
Name: getmnemo-langgraph
Version: 0.1.0
Summary: LangGraph BaseStore implementation backed by Mnemo for cross-thread agent memory.
Project-URL: Homepage, https://github.com/getmnemo/getmnemo-langgraph
Project-URL: Issues, https://github.com/getmnemo/getmnemo-langgraph/issues
Project-URL: Source, https://github.com/getmnemo/getmnemo-langgraph
Author-email: Mnemo <founders@getmnemo.xyz>
License: MIT
License-File: LICENSE
Keywords: agents,getmnemo,langgraph,llm,memory,store
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: getmnemo>=0.1
Requires-Dist: langgraph-checkpoint>=2.0
Requires-Dist: langgraph>=0.2
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=7; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# ledgermem-langgraph

LangGraph `BaseStore` backed by [LedgerMem](https://github.com/ledgermem/ledgermem-python) — give your agents persistent, searchable cross-thread memory in one line.

## Install

```bash
pip install ledgermem-langgraph
```

## Quickstart

```python
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

```python
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](./LICENSE).
