4 memory
Long-term memory layers and knowledge graphs that let agents remember across sessions.
- Rank 19
Adds long-term user, session and agent memory to AI apps through a Python or TypeScript SDK
- score 66
- 67.2k stars
- pushed
- ts-v3.3.1 on
- Apache-2.0
Install with pip
pip install mem0aiUse it when, skip it if, stats for Mem0
Why you'd want it
Mem0 extracts facts from conversations with an LLM call and stores them so later turns can search them by user, session or agent. Retrieval combines semantic search, BM25 keyword matching and entity linking, with time-aware ranking for questions about current state versus past events. You can run it as a library from pip or npm, as a self-hosted server with a dashboard and API keys through Docker Compose, or on the managed Mem0 Platform.
Best for
- Personalized assistants and support bots
- Remembering user preferences across sessions
- Starting with a library and moving to a managed service later
Use it when
Your agent should remember facts about users or its own past actions between conversations without you designing the storage and retrieval.
Skip it if
You want memory with no LLM or embedding calls: Mem0 requires an LLM and defaults to OpenAI models. The README notes its benchmark scores come from the managed platform, which includes optimizations not in the open-source SDK.
Stats
- Stars
- 67,205
- Last push
- Release
- ts-v3.3.1,
- License
- Apache-2.0
- Pricing
- Open source
- Drop score
- 66 of 100
- Rank 38
Builds temporal knowledge graphs from agent conversations and data, tracking how facts change over time
- score 58
- 31.8k stars
- pushed
- v0.31.0 on
- Apache-2.0
Install with pip
pip install graphiti-coreUse it when, skip it if, stats for Graphiti
Why you'd want it
Graphiti turns episodes (raw text or JSON) into entities and relationships and gives each fact a validity window, so when information changes the old fact is invalidated rather than deleted and you can query what was true at any point. New data is added incrementally without recomputing the graph, and retrieval combines semantic embeddings, BM25 keyword search and graph traversal. Every fact traces back to the episode that produced it, custom entity and edge types are defined with Pydantic models, and a bundled MCP server lets assistants add and search memory.
Best for
- Agents working on data that changes over time
- Memory that needs provenance back to sources
- Teams comfortable running a graph database
Use it when
You need agent memory that answers questions about relationships and history, not just similar text chunks.
Skip it if
You do not want to run a graph database: Graphiti needs Neo4j, FalkorDB or Amazon Neptune plus an LLM with structured output, OpenAI by default. Zep is the managed option from the same team, and anonymous telemetry is on by default (opt out with GRAPHITI_TELEMETRY_ENABLED=false).
Stats
- Stars
- 31,752
- Last push
- Release
- v0.31.0,
- License
- Apache-2.0
- Pricing
- Open source
- Works with
- Claude Desktop, Cursor, Any MCP client
- Drop score
- 58 of 100
- Rank 45
Turns documents, code and conversations into a knowledge graph that agents store to and recall from
- score 57
- 32.3k stars
- pushed
- v1.6.4 on
- Apache-2.0
Install with uv
uv pip install "cognee[gliner]"Use it when, skip it if, stats for Cognee
Why you'd want it
Cognee ingests text, code and session data and builds connected memory: entities, relationships and searchable chunks for text, and a graph of symbols and dependencies for code. Its API centers on four operations (remember, recall, improve and forget), and with the gliner extra it builds and queries memory with small local CPU models and no API key, while adding an LLM key enables generated answers. It ships plugins for Claude Code and Codex, an MCP server for other clients, a REST API and Docker images for self-hosting.
Best for
- Agent memory across runs on your own infrastructure
- Shared memory over docs, tickets and code
- Local experiments without an LLM API key
Use it when
You want agents to keep and query project knowledge, past decisions and fixes across sessions, on infrastructure you control.
Skip it if
You are not on Python 3.10 to 3.14 for the library. Running the whole memory layer on a single Postgres instance is a demo feature; the production version is a licensed product.
Stats
- Stars
- 32,298
- Last push
- Release
- v1.6.4,
- License
- Apache-2.0
- Pricing
- Open source
- Works with
- Claude Code, Codex, Cursor, Any MCP client, Docker
- Drop score
- 57 of 100
- Rank 54
Runs stateful agents that keep memory and identity across sessions and rewrite their own memory over time
- score 44
- 3.6k stars
- pushed
- v0.34.14 on
- Apache-2.0
Install with npm
npm install -g @letta-ai/letta-codeUse it when, skip it if, stats for Letta
Why you'd want it
Letta (formerly MemGPT) is now built as Letta Code, an agent harness whose agents keep memory, identity and conversation history and improve by rewriting their own memory blocks, skills and prompts. All context, including memory blocks, is tracked in git (MemFS), and agents can search past messages, call subagents and run on schedules. You reach the same agent from a terminal UI, a desktop app for macOS, Windows and Linux, chat.letta.com, or Slack, Telegram and Discord, with agent state stored in Letta Cloud or kept local.
Best for
- Long-running personal or team agents
- Agents that should learn from past sessions
- Using one agent across terminal, desktop and chat apps
Use it when
You want a ready-made agent that remembers and adapts over long periods, rather than a memory library to wire into your own agent.
Skip it if
You need the older Letta V1 API server, which is retired to the repo's archive branch. Letta Cloud is the default backend, and remote computers and secrets require signing in with Letta.
Stats
- Stars
- 3,613
- Last push
- Release
- v0.34.14,
- License
- Apache-2.0
- Pricing
- Open source
- Works with
- macOS, Windows, Linux, Web
- Drop score
- 44 of 100