Skill Detail

Add managed long-term memory to LangGraph agents with LangMem

Give LangGraph agents memory management and search tools so they can store, retrieve, and update durable facts across sessions.

Developer ToolsCustom Agents
Developer Tools Custom Agents Security Reviewed
⭐ 1.5k GitHub stars
COPY SKILL INSTRUCTIONS (OPTIONAL)
npx skills add agentskillexchange/skills --skill add-managed-long-term-memory-to-langgraph-agents-with-langmem Copy
Uses the third-party skills CLI, not an ASE-owned installer. Check your agent’s compatibility. This copies instructions; complete the upstream tool setup below separately.
At a glance
Tools required
Python, langmem, LangGraph or LangChain agent runtime, persistent store such as Postgres for production, LLM provider API key
Install & setup
Install with pip install -U langmem, configure the target LLM provider key, create or connect a LangGraph store, then add create_manage_memory_tool and create_search_memory_tool to the agent.
Author
LangChain
Publisher
Organization
Last updated
Jun 15, 2026
Quick brief

Use LangMem when a LangGraph or LangChain agent needs long-term memory as part of the agent loop instead of relying on larger prompts or one-off transcript replay. The operator installs `langmem`, connects a LangGraph store such as Postgres for persistence, adds `create_manage_memory_tool` and `create_search_memory_tool` to the agent, and decides whether memory is handled in the hot path or by a background manager. This stays skill-shaped because the boundary is the memory lifecycle for LangGraph agents: extract durable facts, search them when relevant, consolidate updates, and keep the storage layer explicit.

How it works

What this skill actually does

Inputs and prerequisites: Python, langmem, LangGraph or LangChain agent runtime, persistent store such as Postgres for production, LLM provider API key.

Setup notes: Install with `pip install -U langmem`, configure the target LLM provider key, create or connect a LangGraph store, then add `create_manage_memory_tool` and `create_search_memory_tool` to the agent.

Source and verification boundary: use https://langchain-ai.github.io/langmem/ as the canonical reference before running the workflow; keep commands, API calls, CLI usage, and generated outputs reviewable against that upstream source.

Framework fit: publish this as a Custom Agents workflow only when the operator can invoke the documented toolchain directly, rather than treating the upstream project as a generic product listing.