Official SDK

LangChain Tools memory

Structured memory tools that let LangChain agents store, search, list, update, and delete memories safely.

Overview

One factory call returns five structured tools — add_memory, search_memory, list_memories, update_memory, delete_memory — with identical names and behaviour in Python and Node.js. Tools return readable strings and never raise, so a memory failure cannot abort an agent run, and writes are idempotent so a repeating agent cannot create duplicates.

Setup status and requirements

Supported version
langchain-memorysync 1.2.0 (PyPI) / memorysync-langchain 1.2.0 (npm)
Last setup review
2026-10-01
Permissions
A MemorySync API key with read and write scopes; delete_memory needs delete permission.
Limits
Requires langchain-core 0.3 or newer (Python 3.10+, Node 18+). Memory text is immutable — update changes tags and importance, and replacing a fact is delete plus add.
Open setup documentation →

Capabilities

Quick Start

from langchain.agents import create_agent
from langchain_memorysync import create_memorysync_tools
tools = create_memorysync_tools(end_user_id="customer-7")
agent = create_agent(model, tools=tools)

Use Cases

Agents that decide what to remember

Explicit store-and-recall workflows

Read-only memory access for untrusted agents

Guides and related pages

Explore More

Add long-term memory to LangChain Tools

Start free with 10,000 add requests a month and no credit card. Memory is stored per end user and comes back in every later session.