LangMem is an open-source library from the LangChain team that gives AI agents long-term memory, so they can learn and adapt from their interactions over time. With about 1,700 stars on GitHub and active development in 2026, it provides the tooling to extract what matters from conversations, refine agent behavior, and remember it across sessions.
LangMem offers both functional primitives that work with any storage system and native integration with LangGraph’s long-term memory store. Agents can record and search information during live conversations “in the hot path”, while a background memory manager automatically extracts, consolidates and updates knowledge between interactions. It can also optimize agent behavior through prompt refinement, learning from feedback over time. Because it is storage-agnostic at its core, you can plug it into your own database or use LangGraph’s built-in store, which is available by default in LangGraph Platform deployments. The project is under active development by LangChain, with releases continuing through 2026.
LangMem is free and open source under the MIT license. You can use it with your own storage at no cost; teams that deploy through LangGraph Platform may pay for that separate hosting service, but the LangMem library itself carries no fees or usage limits.
Agent developers who need their assistants to remember users, facts and preferences across sessions, and LangChain or LangGraph users building personalized, continuously improving agents. It is a building block rather than a finished product, aimed at engineers comfortable writing Python.