LangMem

Updated Published

LangMem is LangChain's MIT-licensed Python library for extracting, storing and updating long-term agent memory, built to sit on LangGraph's store.

Best for: LangGraph developers adding long-term memory to their agents

LangMem official site

What is LangMem?

LangMem is an open-source Python library from LangChain that helps agents learn from their conversations. It extracts facts, examples and behaviour rules, stores them as long-term memory and updates them over time.

LangMem is a toolkit, not a hosted service. It ships functional pieces you can use with any store and native support for LangGraph's long-term memory store. Hosting, access control and compliance come from LangSmith, LangChain's paid platform, if you choose to use it.

How does LangMem work?

  1. Install it with pip install langmem and connect a store; for production that means a database-backed one such as AsyncPostgresStore.
  2. Give the agent memory tools so it can record and search information during the conversation.
  3. Or run the background memory manager, which extracts, consolidates and updates memories between interactions without adding latency.
  4. Memories are organised in namespaces by organisation, user or application, and retrieved by semantic search.
  5. Procedural memory can refine the agent's system prompt from feedback over time.

How much does LangMem cost?

LangMem is free under the MIT license, checked 18 October 2026; you pay for your own store and model calls. If you host on LangSmith, the Developer plan is $0 for 1 seat, and Plus is $39 per seat a month plus usage, with one small serverless deployment included. Prices are in dollars with no regional pricing stated.

Who is LangMem for, and who is it not for?

LangMem suits a team already building with LangGraph that wants long-term memory inside the same stack, with control over what gets extracted and how it is stored. It is a library to build with, so it rewards developers who want to shape the schema themselves.

It fits poorly if you need a supported, versioned product with approvals, citations or audit history, or connectors to company documents. The project is pre-1.0 and its last release dates from October 2025.

What does LangMem do well?

  • Free and MIT licensed, usable with any storage system or LangGraph's store
  • Covers semantic, episodic and procedural memory, including refining an agent's prompt from feedback
  • Two write paths: memory tools the agent calls mid-conversation, and a background manager that consolidates between turns
  • Namespaces let several agents in one deployment share a team store while keeping their own space
  • The long-term store is available by default in LangGraph Platform deployments

LangMem on our criteria

LangMem: what we found, by criterion
CriterionWhat we found
Pricing LangMem itself is free. Hosting on LangSmith starts at Plus, $39 per seat per month plus usage (USD, no regional pricing stated) Verified
Free plan The library is free; LangSmith's Developer plan is $0 for 1 seat and 5,000 base traces a month Verified
Open source Yes, MIT Verified
Human approval Not publicly documented
Cites sources Not publicly documented
Versioning and history Not publicly documented
Shared across agents Yes: agents in one deployment share the LangGraph store through namespaces Verified
Context graph Not publicly documented
Enterprise sources Not publicly documented
Deployment Self-run Python library with any LangGraph store, such as Postgres; managed through LangSmith Deployment; LangSmith Enterprise offers hybrid or self-hosted in your VPC Verified
Compliance None stated for LangMem; LangSmith says its platform is audited under SOC 2 Type II and certified to ISO 27001 Vendor-reported
Interface Python SDK (pip install langmem); REST and MCP come through LangSmith Agent Server, which exposes LangGraph agents as MCP tools Verified

What are LangMem's limits?

  • Pre-1.0 and slow-moving: the latest PyPI release was 0.0.30 from 27 October 2025, still current on 18 October 2026
  • The default InMemoryStore loses memories on restart, so production needs a separate database-backed store
  • We found no mention of source citations, human approval or memory version history on its pages
  • We found no mention of company source connectors, SSO, RBAC or compliance on LangMem's own pages; those come only with LangSmith
  • We found no graph store: relationships can be extracted as triples but are stored as documents, without graph traversal

Mentioned in

FAQ

Is LangMem free?

Yes. LangMem is an MIT-licensed library with no paid plan of its own. If you host agents on LangSmith, that platform has its own pricing, starting with a $0 Developer plan and Plus at $39 per seat a month.

Does LangMem work without LangGraph?

Yes. The README says it offers functional primitives you can use with any storage system, as well as native integration with LangGraph's storage layer. The LangGraph store is the most documented path.

Is LangMem still maintained?

The repository is not archived and had a push on 2 October 2026. The latest PyPI release is 0.0.30, uploaded on 27 October 2025, and it was still the latest when we checked on 18 October 2026.

Sources checked

Show 11 sources