Skip to main content

LangGraph + Memanto

LangGraph Give your LangGraph applications persistent, cross-session memory powered by Memanto. LangGraph natively manages short-term execution state using Checkpointers, but requires a BaseStore to persist semantic memory across different threads or sessions. Memanto integrates seamlessly as a native BaseStore or via @tool functions to give your agents long-term recall.

How It Works

You can integrate Memanto into LangGraph using three primary patterns:
  1. BaseStore: A drop-in BaseStore implementation that provides cross-thread semantic memory while respecting LangGraph’s namespace architecture.
  2. Nodes: Pre-built graph nodes for automatic memory injection before LLM calls and storage after responses.
  3. Tools: Pre-built agent tools (remember, recall, answer) injected directly into your LangGraph ToolNode.

Prerequisites

Install

Pattern 1: BaseStore Integration

LangGraph uses a split memory architecture: Checkpointers for short-term thread state, and Stores for long-term semantic memory. MemantoStore maps LangGraph’s key-value namespace API directly to Memanto’s isolated agent buckets (e.g., langgraph_user123_preferences), providing instant, zero-latency semantic recall.

Setup the Store

Access Memory in Nodes

In any node, simply require the store: BaseStore parameter. LangGraph will automatically inject MemantoStore.

Pattern 2: Node-Based Integration

If you prefer a structured, deterministic approach without relying on the LLM to autonomously call tools, you can add pre-built recall and remember nodes directly to your graph’s edges. This guarantees memory is injected before every generation and saved after every response.

Pattern 3: Tool-Based Integration

If you prefer to let the LLM autonomously decide when to search or save memories (rather than hardcoding store operations in nodes), you can inject Memanto as tools.

Persistent Memory Across Runs

Because memories live in Memanto (not in-process), they persist between separate runs, processes, or entire servers. The checkpointer handles short-term context, while Memanto handles lifelong user profiles.

Next Steps