# langchain-ai/langmem

Repository: https://github.com/langchain-ai/langmem
Canonical: https://ross.abutalabs.com/products/langmem
Homepage: https://langchain-ai.github.io/langmem/
Language: Python
License: MIT
License Family: permissive
Last push: 2026-08-11T00:18:37+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 35, longevity 42
- inputs: {"age_days": 589, "days_push": 23, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1626, forks 186 (observed 2026-08-28T04:05:13.002620+00:00)

## What it is
LangMem is a Python library that helps AI agents learn and adapt from their interactions over time by extracting information from conversations, refining prompts, and maintaining long-term memory. It provides storage-agnostic memory primitives plus native integration with LangGraph's Long-term Memory Store.

## Use cases
- add long-term memory to a langgraph agent
- extract important facts from chat conversations automatically
- let an agent record and search its own memories during conversations
- personalize agent responses based on past interactions
- run a background memory manager that consolidates agent knowledge
- refine agent prompts based on accumulated experience
- persist agent memory across sessions with a postgres-backed store

## When to choose
- you are building agents with LangGraph and want persistent, searchable memory
- you need agents that personalize behavior across sessions
- you want both hot-path memory tools and background memory consolidation
- you want a memory API that works with any storage backend

## When to avoid
- you need a full standalone agent framework rather than a memory layer
- your project does not use Python or the LangChain/LangGraph ecosystem
- you only need simple short-term conversation context without persistence

## Facets
- artifact type: library
- maturity: active
- function: agent-framework, rag, llm-inference, prompt-engineering, machine-learning
- domain: artificial-intelligence, large-language-models, developer-tools
- platform: python
- tags: long-term-memory, langgraph, memory-management, agent-personalization, conversation-memory, ai-agents, retrieval-augmented-generation

## Member repositories
- langchain-ai/langmem (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:13.002620+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:48:27.337367+00:00, confidence not recorded.
  - readme: https://github.com/langchain-ai/langmem (fetched 2026-08-28T04:05:13.002620+00:00, sha d1bb124adfbf)
  - homepage: https://langchain-ai.github.io/langmem/ (fetched 2026-08-29T11:21:19.586614+00:00, sha 12f7bca2e259)
- Data as of 2026-08-30T08:39:29.467469+00:00.
