LangMem
Use case: Memory
LangChain library for long-term memory extraction and prompt optimization in agents.
Like LangMem? Find tools like it on X.
Follow @AgentstackDaily, plus the free Top 25 Agent Tools checklist.
At a glance
- Category
- Memory
- Best for
- Best memory and evaluation tools for AI agents · Memory use cases
- Official site
- github.com
- Link checked
- November 4, 2026
- Data
- JSON
When to use LangMem
Consider LangMem when your agent work falls under Memory. Our directory summarizes it this way: LangChain library for long-term memory extraction and prompt optimization in agents. If you are still choosing, compare it with Mem0, Letta (MemGPT) and Zep / Graphiti before committing, since they sit in the same category.
How LangMem fits an agent workflow
In an agent stack, LangMem belongs to the Memory category, which covers the context layer, where an agent stores and retrieves information across steps and sessions. You will also find it in our curated list: Best memory and evaluation tools for AI agents. Other Memory entries worth a look alongside it include Cognee, MCP Memory server and Anthropic memory tool.
Pricing & open source
The official link is a GitHub repository (github.com/langchain-ai/langmem), so you can read the source and its license there. Plans and terms can change, so check the official site for current pricing and licensing.
LangMem alternatives
- Mem0 — Memory layer that extracts and retrieves user/agent facts across sessions.
- Letta (MemGPT) — Stateful agents with self-editing tiered memory, from the MemGPT research.
- Zep / Graphiti — Temporal knowledge graph for agent memory that tracks how facts change over time.
- Cognee — Builds knowledge graphs plus vectors from your data as agent memory.
- MCP Memory server — Reference knowledge-graph memory server any MCP client can use.
- Anthropic memory tool — Claude API tool for storing and retrieving information in a file directory across conversa
All Memory tools → · Best memory and evaluation tools for AI agents
Related tools
- Anthropic: Effective context engineering
Guide to curating context: compaction, structured notes and sub-agent architectures.
- Chroma
Open-source embedding database commonly used for agent retrieval memory.
- Entire
Git forge built for agents: the open-source (MIT) Entire CLI captures Claude Code, Codex, Gemini and other agent session
- claude-mem
Open-source (Apache-2.0) persistent memory for coding agents: captures tool-use observations, compresses them into summa
- Cognee
Builds knowledge graphs plus vectors from your data as agent memory.
FAQ
What does LangMem do?
LangMem is a LangChain library that helps agents learn from their interactions over time. It extracts important information from conversations, refines agent prompts, and maintains long-term memory.
Does LangMem require LangGraph?
No. Its core memory API works with any storage system, and it also integrates natively with LangGraph's long-term memory store. Agents can use its memory tools during a conversation, or a background manager can extract and consolidate memories.
Is LangMem open source?
Yes. LangMem is licensed under the MIT License and installs with pip install -U langmem.
Get new agent tools and tips as they're added
Follow @AgentstackDaily on X for new tools and copy-paste tips. Free.