LangMem Alternatives: Mem0, Graphiti, Cognee and Hindsight (November 2026)

6 min read

LangMem alternatives compared (Nov 2026): Mem0, Graphiti, Cognee and Hindsight. Licenses, storage, install, benchmark sources with who ran them, and limits for each.

LangMem alternatives are other memory tools that give an AI agent facts to remember across chats. Four strong picks are Mem0, Graphiti, Cognee and Hindsight. LangMem is a Python library that runs inside a LangGraph app and saves to a LangGraph store. Most of the alternatives run as their own service or library, so they do not depend on LangGraph’s store.

Pick an alternative when LangMem does not fit one of three needs: memory that several apps share, a knowledge graph of facts that change over time, or memory you do not want to tie to one agent framework. If your agent is already on LangGraph and you want memory tools inside the graph, LangMem is still a good fit. See LangMem vs Hindsight for the head-to-head.

Facts below come from each project’s README, read on 28 November 2026, and from the GitHub API for license, stars and last push. Hindsight facts come from its README and benchmarks site, as summarised on this site.

Alternatives at a glance

ToolWhat it isLicenseStorage and setupInstallPublished benchmark (who ran it)
LangMem (for reference)Python library for LangGraph agentsMITLangGraph store; example uses InMemoryStorepip install -U langmemNone in its README
Mem0Memory layer for user and agent factsApache 2.0Library, or self-hosted server with docker compose, or managed Platformpip install mem0aiLoCoMo 92.5, LongMemEval 94.4 on its managed Platform (Mem0)
GraphitiTemporal knowledge graph frameworkApache 2.0Needs Neo4j 5.26, FalkorDB 1.1.2 or Amazon Neptune; OpenAI key by defaultpip install graphiti-coreNone in its README
CogneeKnowledge graph memory: remember, recall, improve, forgetApache 2.0pip or Docker; can run text memory with local models and no LLM keypip install cogneeBEAM 100K 0.79 on a 0-1 scale (Cognee)
HindsightMemory server: retain, recall, reflectMIT, full server includedPostgreSQL with pgvector, or embedded pg0; Docker or pipdocker run (see its README)LongMemEval 94.6, BEAM 1M 73.9 (Vectorize)

Each benchmark is the project’s own run. None of them is an independent audit, and the settings differ, so the numbers are not a fair race. Read the agent memory leaderboard for how each number was measured.

Mem0

Mem0 adds a memory layer to your code. You call it to add messages and to search, and it extracts facts with an LLM and stores them per user, session or agent. Its README lists three ways to run it: the mem0ai library, a self-hosted server started with docker compose in its server/ folder, or the managed Mem0 Platform. The library is Apache 2.0.

The README also links a LangGraph guide that wires Mem0 into a LangGraph agent. Read that guide to see which parts of LangMem’s store it replaces.

Its benchmark table shows LoCoMo 92.5 and LongMemEval 94.4 for Mem0. The README says those scores “reflect Mem0’s managed platform, which includes proprietary optimizations not available in the open-source SDK,” and that open-source users should expect “directionally similar gains but not identical numbers.”

  • Pick Mem0 if you want a widely used memory API you can call from any framework, and you can run its server or pay for its platform.
  • Look elsewhere if you want memory kept inside LangGraph’s own store, or you need the benchmark numbers to hold on the open-source version.

Graphiti

Graphiti builds a temporal knowledge graph. Each fact is an edge with a validity window. When information changes, the old fact is marked invalid, not deleted, so you can ask what was true at a past date. It is Apache 2.0 and installs with pip install graphiti-core.

You need a graph database. The README lists Neo4j 5.26, FalkorDB 1.1.2 and Amazon Neptune, plus an OpenAI key by default, since “Graphiti defaults to using OpenAI for LLM inference and embedding.” It works best with models that support structured output.

  • Pick Graphiti if facts change over time and you can run a graph database.
  • Look elsewhere if you want a memory service with no graph database to run, or if you do not need a graph.

For Graphiti next to Zep, see Zep alternatives.

Cognee

Cognee builds a knowledge graph and a vector index from documents, code and conversations. Its four main calls are remember, recall, improve and forget. It is Apache 2.0, runs with pip or Docker, and its README says text ingestion and retrieval work with no LLM key. Its v1.6.0 release (September 18, 2026) added that keyless path.

Cognee’s README reports BEAM 100K at 0.79 on a 0 to 1 scale, from its own runs: four evaluation rounds over 20 questions from one conversation. That is a different scale from Hindsight’s 0 to 100 BEAM figures, so do not compare them as one number. Its README also says using Postgres as a graph store is a demo feature.

  • Pick Cognee if your memory is mostly documents, code and company knowledge.
  • Look elsewhere if you need a stable production graph store today, since the README marks the Postgres graph path as a demo.

More on Cognee in Cognee alternatives.

Hindsight

Hindsight is an MIT-licensed memory server. retain extracts facts, entities and time with an LLM. recall searches in four ways at once (semantic, keyword, graph and time range) and reranks the results. reflect reasons over stored memories to answer a question. Storage is PostgreSQL with pgvector, or an embedded pg0 for a single machine.

For LangGraph, Hindsight ships a PyPI package, hindsight-langgraph, and it also works with CrewAI, LlamaIndex, Pydantic AI and the OpenAI Agents SDK. Because it is a server, several agents can share one memory, and any framework can call its API.

Its published scores are LongMemEval S 94.6, LoCoMo 92 and BEAM 1M 73.9, all run by Vectorize, which makes Hindsight. Its README says collaborators at Virginia Tech and The Washington Post reproduced its results. That is a reproduction by collaborators, not an independent audit.

  • Pick Hindsight if you want memory as its own service, shared by agents in several frameworks, with reflect and open-source self-hosting.
  • Look elsewhere if your app is small, already on LangGraph’s store, and you want no second service to run.

Limits to check first:

  • You run a server, or pay for Hindsight Cloud. Its pricing page lists usage fees for retain, recall and reflect.
  • Every retain calls an LLM, so writes cost model calls.
  • Recall returns more context by default. Set max_tokens lower if the prompt must stay small.

Which one to pick

LangMem against Mem0 in detail, with each one’s published numbers: Mem0 vs LangMem.

If you needPick
Memory tools inside a LangGraph graph, saved to a store you runLangMem
One memory API you call from any frameworkMem0
Facts that change over time, with a graph database you can runGraphiti
Memory from documents, code and knowledge bases, as a graphCognee
A memory server shared by several agents, with reflect and open-source self-hostingHindsight

Checked on 28 November 2026

  • LangMem: README (MIT; GitHub API: about 1,800 stars, last push 2026-11-16, not archived).
  • Mem0: README (Apache 2.0; about 69,600 stars, last push 2026-11-27).
  • Graphiti: README (Apache 2.0; about 33,200 stars, last push 2026-11-27).
  • Cognee: README (Apache 2.0; about 33,700 stars, last push 2026-11-28).
  • Hindsight: README and benchmarks site, as summarised in our Hindsight notes from October 2026.