# LangMem

LangMem is a memory option for building AI agents. Memory primitives that plug straight into LangGraph checkpoints.

## Facts

- Layer: Memory (What it knows)
- Vendor: LangChain (github.com/langchain-ai/langgraph)
- Licence: open source
- Pricing: open source
- Self-hostable: yes
- SDKs: py
- Install: `pip install langmem`
- Docs: https://langchain-ai.github.io/langmem/
- Last verified: 2026-08-21

## When to reach for it

- You are choosing a memory component — what it knows.
- You need to run it on your own infrastructure, or your procurement process requires source access.
- You want to start without a commercial conversation.

## Published benchmark scores

- LoCoMo: 78.05% — independent, Memori Labs evaluation, 2026-08. https://memorilabs.ai/docs/memori-cloud/benchmark/results/

## Alternatives in the memory layer

| Option | What it does | Licence | Self-host |
| --- | --- | --- | --- |
| Mem0 | Extracts durable facts from conversations and recalls them on the next turn. | open source | yes |
| Zep | Temporal knowledge graph memory — facts with validity windows, not just embeddings. | open source | yes |
| Honcho | Treats memory as a reasoning problem, not a retrieval one — you ask its Dialectic API a question about the user and get a synthesised answer. | open source | yes |
| Supermemory | Memory graph plus automatic user profiles, with connectors that sync from Drive, Gmail, Notion and GitHub. | proprietary | no |
| Cognee | Builds a graph + vector memory layer over your agent's history and documents. | open source | yes |
| Postgres (rolled by hand) | A messages table and a summaries table. Boring, auditable, yours. | open source | yes |

Head to head:

- https://newagent.build/compare/langmem-vs-mem0
- https://newagent.build/compare/langmem-vs-zep
- https://newagent.build/compare/langmem-vs-honcho
- https://newagent.build/compare/langmem-vs-supermemory
- https://newagent.build/compare/langmem-vs-cognee
- https://newagent.build/compare/langmem-vs-postgres-memory

## Add it to a stack

```bash
curl -fsSL "https://newagent.build/api/stack?memory=langmem&format=sh" | sh
```

## Machine interfaces

- `GET https://newagent.build/api/registry` — every component as JSON
- `GET https://newagent.build/api/vendors` — vendors, with the repo and releases feed to watch
- `GET https://newagent.build/api/advise?q=<plain english>` — recommended stack for a description
- `GET https://newagent.build/api/stack?<layer>=<id>&format=sh|json|md|yml|agents|env` — a stack as files
- `GET https://newagent.build/llms.txt` — the whole registry in one fetch

Any page here also returns markdown if you send `Accept: text/markdown`.