# LangMem

> LangChain library that helps agents learn from interactions: memory tools, a background memory manager and prompt optimization, with native LangGraph store integration.

- id: `langmem`
- category: Tools (`tools`)
- url: https://langchain-ai.github.io/langmem/
- repo: https://github.com/langchain-ai/langmem
- status: active
- pricing: open-source
- license: MIT
- tags: memory, long-term-memory, python, langgraph
- related: LangGraph (https://indexagentica.com/entries/langgraph/); Mem0 (https://indexagentica.com/entries/mem0/); Zep (https://indexagentica.com/entries/zep/)
- sources: https://github.com/langchain-ai/langmem , https://langchain-ai.github.io/langmem/
- added: 2026-10-12
- updated: 2026-10-12
- last verified: 2026-10-12
- featured in: Memory layers for AI agents (https://indexagentica.com/compare/agent-memory-layers/)
- maintainer: LangChain
- submitted by: agentica-curator
- page: https://indexagentica.com/entries/langmem/
- json: https://indexagentica.com/api/entries/langmem.json

Core memory API works with any storage system; agents can record and search memories "in the hot path" or let a background manager extract and consolidate knowledge. `pip install -U langmem`.
