LangGraph + Memanto Integration
This package provides native LangGraph tools and a standalone memory layer for integrating Memanto's persistent, cross-session memory capabilities into LangGraph agents.
Installation
pip install langgraph-memanto
Features
- Native LangChain Tools: Easy-to-use
@toolwrappers that LangGraph agents can autonomously call (memanto_remember,memanto_recall,memanto_answer). - Graph Nodes: Pre-built nodes (
create_recall_node,create_remember_node) for automatic memory injection and storage within your graph. - Cross-Session Persistence: Memories stored by your agents survive across threads, sessions, and even different agents within the same namespace.
- BaseStore Implementation: Use
MemantoStoreas a drop-in replacement for LangGraph'sBaseStoreto persist memories using Memanto through the official LangGraph store API.
Usage
Using MemantoStore
You can use MemantoStore as the backend for the official LangGraph Store abstraction. This gives your graph persistent, cross-thread, and cross-session memory automatically.
from langgraph_memanto import MemantoStore
from langgraph.graph import StateGraph, MessagesState
from langgraph.checkpoint.memory import MemorySaver
# Initialize the MemantoStore (uses api_key instead of client object directly)
store = MemantoStore(api_key="your_moorcheh_api_key")
# Build your graph as normal
builder = StateGraph(MessagesState)
builder.add_node("agent", agent_node)
# ... add edges ...
# Compile with the store
graph = builder.compile(
store=store,
checkpointer=MemorySaver()
)
# Nodes can now access the store via langgraph.store.base.BaseStore API
# e.g., store.put(namespace, key, {"content": "...", "type": "fact"})
Using Tools
from langgraph_memanto import create_memanto_tools
from memanto.cli.client.sdk_client import SdkClient
# Initialize the Memanto SDK Client
client = SdkClient(api_key="your_moorcheh_api_key")
# Get native LangChain tools
# The tools will automatically ensure the agent is created and activated
# the first time the LLM tries to call them!
tools = create_memanto_tools(client, "my-langgraph-agent")
# Bind them to your LLM
llm_with_tools = llm.bind_tools(tools)
Using Nodes
Add recall and remember nodes to your graph for automatic memory retrieval before LLM calls and storage after responses.
from langgraph_memanto import create_recall_node, create_remember_node
from memanto.cli.client.sdk_client import SdkClient
from langgraph.graph import StateGraph, MessagesState, START, END
client = SdkClient(api_key="your_moorcheh_api_key")
# Nodes can dynamically use an agent_id from the graph's config
recall = create_recall_node(client=client, agent_id_from_config="agent_id")
remember = create_remember_node(
client=client,
agent_id_from_config="agent_id"
)
builder = StateGraph(MessagesState)
builder.add_node("recall", recall)
builder.add_node("agent", agent_node) # your LLM node
builder.add_node("remember", remember)
builder.add_edge(START, "recall")
builder.add_edge("recall", "agent")
builder.add_edge("agent", "remember")
builder.add_edge("remember", END)
graph = builder.compile()
Metadata
Release files for langgraph-memanto 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 |
|---|---|---|---|---|
| langgraph_memanto-0.1.1.tar.gz | 11.6 kB | Without provenance | Details for langgraph_memanto-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langgraph_memanto-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for langgraph_memanto-0.1.1-py3-none-any.whl |
Total release size: 23.8 kB
Release files / langgraph_memanto-0.1.1.tar.gz
| Download URL | langgraph_memanto-0.1.1.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b446ed6afde21eddc01bef0e2e36c44553753055e57a842075c8e2395821fbf
|
|
BLAKE2b-256 checksum How to use checksums |
598850fdb6c7090fd879b32c6a78b48e59253b58a4ceb4e467f4b299ae7809a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / langgraph_memanto-0.1.1-py3-none-any.whl
| Download URL | langgraph_memanto-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8286d8fc3dabe059b7a0e7a35d72833aab2e6e1b1489f712349167401a197563
|
|
BLAKE2b-256 checksum How to use checksums |
3b45f028c24d8f9c3353926e40df2a2642407e9ea39f49adf70b17b040467bcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for langgraph-memanto 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.