Key takeaways
- Three memory types — semantic (facts/knowledge), episodic (past experiences), and procedural (learned behaviors/prompt rules) — modeled after human memory
- Two integration modes: hot-path tools agents call during conversations, and background memory managers that extract memories asynchronously
- Built as a functional core with pluggable storage — works with any backend but integrates natively with LangGraph BaseStore and Platform deployments
- Memory consolidation prevents unbounded growth by merging related memories and resolving contradictions, avoiding the "memory hoarding" problem
- Real adoption (~746K monthly PyPI downloads, 5M+ total as of June 2026) but still pre-1.0 — latest release is 0.0.30 from October 2025, with active repo commits continuing into June 2026
FAQ
What is LangMem?
LangMem is an open-source Python SDK from LangChain that adds long-term memory to LangGraph agents. It extracts facts, experiences, and behavioral patterns from conversations and stores them for future retrieval.
How does LangMem differ from simple RAG?
RAG ingests static documents offline. LangMem extracts memories from live agent interactions, consolidates and deduplicates them over time, and can also update agent behavior (procedural memory) — not just retrieve facts.
Does LangMem require LangGraph?
No. The core API is framework-agnostic and works with any storage system. However, it integrates most seamlessly with LangGraph BaseStore and the LangGraph Platform, which provides managed storage out of the box.
Is there a managed service?
Yes. LangChain offers a managed memory service that provides additional long-term memory results on top of the open-source SDK, available through the LangGraph Platform.
Is LangMem still maintained after LangChain 1.0?
Yes. As of June 2026 the repo is active (commits in June 2026, not archived) and LangChain's 1.0 docs still position LangMem as the long-term memory option alongside LangGraph checkpointers. However, the latest PyPI release is 0.0.30 from October 2025, so the package remains pre-1.0 with a slow release cadence.
What Is LangMem?
LangMem is an open-source Python SDK from LangChain that adds long-term memory capabilities to AI agents . Released in early 2025, it provides tooling to extract important information from conversations, optimize agent behavior through prompt refinement, and maintain persistent memory across sessions .
The library builds on LangChain's earlier experiments with hosted memory services and LangGraph's persistent storage layer . It ships as a lightweight pip install langmem package with ~1.5K GitHub stars as of June 2026 .
Status (June 2026): LangMem survived the LangChain 1.0 transition. LangChain's legacy in-process memory classes (ConversationBufferMemory and friends) were deprecated in 1.0, but LangMem was not absorbed or retired — the current docs still position it as the long-term memory option alongside LangGraph checkpointers for session state . The repo is active (commits as recent as June 7, 2026, not archived) , and adoption is real: roughly 746K monthly downloads and 5M+ total on PyPI . The catch is release cadence — the latest PyPI release is 0.0.30, published October 27, 2025, meaning no new package release in over seven months despite ongoing repo activity .
How It Works: Three Memory Types
LangMem organizes long-term memory into three types modeled after human cognition :
Semantic Memory stores facts and knowledge — user preferences, domain knowledge, relationship data. It supports both collections (unbounded searchable stores) and profiles (structured single-document state like a user card). The system handles memory consolidation automatically, merging related facts and resolving contradictions .
Episodic Memory captures past experiences as few-shot examples or conversation summaries. This lets agents learn from successful (or failed) interactions and apply those patterns to new situations .
Procedural Memory modifies the agent's own behavior by updating prompt rules and response patterns. Rather than just storing data, the agent can refine how it operates based on feedback — essentially self-improving its instructions .
Two Paths: Hot Path vs Background
LangMem supports two integration patterns :
- Hot path: The agent calls memory tools (
create_manage_memory_tool,create_search_memory_tool) during active conversations to store and retrieve memories in real-time - Background: A separate memory manager processes conversations asynchronously after they complete, extracting and consolidating memories without slowing the main interaction
Both paths use the same underlying create_memory_manager API and can be combined .
Strengths
- Framework-agnostic core — functional API works with any storage backend, not just LangGraph
- Memory consolidation — automatically deduplicates, merges, and resolves contradictory memories rather than infinitely accumulating
- Structured extraction — supports Pydantic schemas for typed memory profiles, not just raw text blobs
- Native LangGraph integration — works with BaseStore, InMemoryStore, and AsyncPostgresStore out of the box
- Namespace scoping — memories can be isolated per user, shared across teams, or global to the agent
- Open source — MIT licensed, fully inspectable, no vendor lock-in on the core SDK
Cautions
- LangGraph gravity — while technically framework-agnostic, the best experience requires LangGraph and its ecosystem
- Perpetually pre-1.0 — sixteen months after launch the package is still at 0.0.30, and the last PyPI release was October 2025; third-party reviewers call it "newer, less battle-tested" than alternatives like Zep or plain PostgresSaver
- LLM-dependent extraction — memory quality depends entirely on the extraction LLM's ability to identify what matters
- No built-in evaluation — no native tools to measure memory precision/recall or detect memory drift over time
- Managed service adds complexity — the free managed tier is still in signup/waitlist phase, blurring open-source vs. commercial boundaries
What Developers Say
Public developer commentary on LangMem is surprisingly thin given its download numbers — no substantial Hacker News or Reddit threads surfaced as of June 2026. The download-to-discussion gap suggests most usage comes bundled inside LangGraph stacks rather than from teams who evaluated it head-to-head.
The clearest third-party assessment comes from a March 2026 db0.ai survey of post-deprecation LangChain memory options, which lists LangMem as a current Python option but flags its maturity:
"LangMem, LangGraph-native with LLM-driven memory extraction (newer, less battle-tested than the other two [LangGraph PostgresSaver and Zep])" — db0.ai, "LangChain memory is deprecated — what to use in 2026"
Competitive Positioning
| Dimension | LangMem | Mem0 | Zep |
|---|---|---|---|
| Approach | SDK + memory tools | Managed memory API | Memory server + SDK |
| Memory types | Semantic, episodic, procedural | Semantic (user/agent memories) | Semantic + temporal knowledge graphs |
| Framework tie-in | LangGraph-native | Framework-agnostic | Framework-agnostic |
| Storage | BYO (Postgres, in-memory, etc.) | Managed cloud or self-hosted | Managed cloud or self-hosted |
| Consolidation | Built-in merge/dedup | Built-in dedup | Graph-based entity resolution |
| Procedural memory | Yes (prompt self-modification) | No | No |
| License | MIT | Apache 2.0 | MIT (CE) / Proprietary (Cloud) |
| Best for | LangGraph agent builders | Multi-framework memory layer | Apps needing temporal reasoning |
Bottom Line
Recommended for: Teams already building on LangGraph who want long-term memory without standing up new infrastructure. It's tightly integrated, well-designed, and the three-memory-type framework (semantic, episodic, procedural) is more thoughtful than most competitors . The procedural memory angle — agents that modify their own prompts based on experience — is genuinely differentiated .
Not recommended for: Teams outside the LangChain/LangGraph ecosystem (Mem0 or Zep offer smoother integration paths), or production systems that need a stable, battle-tested API — the package is still 0.0.x with its last release in October 2025 .
Outlook: LangMem cleared the biggest existential question — it survived LangChain 1.0 as the sanctioned long-term memory layer rather than being absorbed or deprecated , and ~746K monthly downloads show it rides LangGraph's distribution . But the seven-month release gap and missing 1.0 milestone leave its long-term independence ambiguous: it could either graduate to a stable release or quietly fold into LangGraph's core APIs. For LangGraph shops it remains the default answer for agent memory ; everyone else should watch the release cadence before committing.
Sources
- [1] langchain-ai/langmem on GitHub
- [2] LangMem Documentation
- [3] LangMem SDK for Agent Long-Term Memory (LangChain Blog)
- [4] LangMem Conceptual Guide
- [5] LangGraph Memory Overview
- [6] LangMem SDK Changelog Announcement
- [7] langmem on PyPI
- [8] langmem download stats (pepy.tech)
- [9] LangChain memory is deprecated — what to use in 2026 (db0.ai)
- [10] Memory Overview — Docs by LangChain