Skip to main content

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
export MEMANTO_API_KEY=mk_xxxxxxxxxxxxxxxxxx  # from https://console.memanto.ai (or run `memanto login`)

Using Memanto local instead of Memanto Cloud? Set MOORCHEH_API_KEY (console.moorcheh.ai/api-keys) or configure on-prem with memanto use on-prem.

Features

  • Native LangChain Tools: Easy-to-use @tool wrappers 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 MemantoStore as a drop-in replacement for LangGraph's BaseStore to 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 MemantoStore (reads MEMANTO_API_KEY, ~/.memanto `memanto login`, or MOORCHEH_API_KEY, or pass api_key=...)
store = MemantoStore()

# 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

# Get native LangChain tools (resolves MEMANTO_API_KEY, ~/.memanto `memanto login`, or MOORCHEH_API_KEY)
# The tools will automatically ensure the agent is created and activated 
# the first time the LLM tries to call them!
tools = create_memanto_tools(agent_id="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 langgraph.graph import StateGraph, MessagesState, START, END

# Nodes resolve MEMANTO_API_KEY, ~/.memanto `memanto login`, or MOORCHEH_API_KEY automatically
# and can dynamically use an agent_id from the graph's config
recall = create_recall_node(agent_id_from_config="agent_id")
remember = create_remember_node(
    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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langgraph-memanto 0.1.2
File Size Uploaded Provenance Actions
langgraph_memanto-0.1.2.tar.gz 21.6 kB Without provenance Details for langgraph_memanto-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langgraph-memanto 0.1.2
File Interpreter ABI Platform Actions
langgraph_memanto-0.1.2-py3-none-any.whl Python 3 none any Details for langgraph_memanto-0.1.2-py3-none-any.whl

Total release size: 38.0 kB

Release files / langgraph_memanto-0.1.2.tar.gz

Download URL langgraph_memanto-0.1.2.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a4dfd823bba91a44d396431e6448f04e7d9ba0689e08e4696ec199eae1188a95
BLAKE2b-256 checksum
How to use checksums
90a41ac5793d4486166d335192b7eb434d8e324616b9cabccab9104b3b7c8650
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / langgraph_memanto-0.1.2-py3-none-any.whl

Download URL langgraph_memanto-0.1.2-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1173b0d60899972e9a5aa31242f66b3160e7c6daa195c856ada283b2d149ae5
BLAKE2b-256 checksum
How to use checksums
f8f2620fc9383657e2d6d81cf04e9f3055977aa7cae704df8dc24a0ed80cd135
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for langgraph-memanto 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page