Your personal memory, across sessions, agents, and devices.

AI Agent Memory Frameworks: Types Compared (2026)

memU Team memU Team

A Tencent Cloud developer survey from October 22, 2026 compares five agent memory frameworks: Mem0, Letta, Zep, LangMem and TencentDB Agent Memory. The same names come up when you ask an assistant what exists. They store memory in very different ways, so the list alone does not tell you which to pick. This guide sorts AI agent memory into its main types. Then it compares seven frameworks and two built-in host memories, using each project's own README or docs as read on November 4, 2026.

What is AI agent memory, in one sentence?

AI agent memory is information an agent keeps and brings back later, so new work starts with what earlier work learned.

It works on two time scales. Short-term memory lives inside one conversation. Long-term memory outlives the session, so it needs storage and a rule for what is worth saving.

What are the main types of agent memory?

Short-term memory is about fitting the conversation into the model. LangGraph's memory docs put the problem plainly: a long message history "can exceed its context window." The two common fixes are a sliding window, which keeps only the last N messages, and summarization, which folds older turns into a running summary. Both drop detail. Most frameworks below leave this part to you. Letta is the exception, since its MemGPT design manages the context window itself.

Long-term memory comes in more shapes:

Type What it keeps How it comes back Examples in this guide
Vector retrieval Chunks or memories as embeddings Similarity search, often mixed with keyword search Mem0, claude-mem
Extracted facts Short facts an LLM pulls from conversations Search over the facts Mem0, LangMem
Knowledge graph Entities, relationships and when each fact was true Graph traversal plus semantic and keyword search Zep, Graphiti
Tiered, OS-style A small in-context tier plus larger outside storage The agent pages memory in and out Letta (MemGPT)
Layered hierarchy Raw records refined into summaries and profiles Summary layers first, raw records when needed TencentDB Agent Memory
File-based (Markdown) Readable notes and skills in files Loaded at session start, or retrieved by search Claude Code, Codex, Letta MemFS, memU

Most products mix types. Mem0 extracts facts, then finds them with vector and keyword search plus entity matching. Letta began as the MemGPT paper of October 12, 2023, which borrowed hierarchical memory from operating systems. Today its memory lives in Markdown files under git.

A second way to slice memory is by what it holds. LangMem's conceptual guide uses three kinds: semantic (facts such as preferences), episodic (past experiences) and procedural (how the agent should behave). Reusable skills are procedural memory.

How do the main agent memory frameworks compare?

Storage decides how you inspect and fix memory.

Storage Who decides what to keep Can a person read and fix it?
Mem0 Vector store plus a history database. The library defaults to local Qdrant and SQLite, the server to Postgres with pgvector An LLM extraction call on each add Through the SDK, the CLI or a dashboard
Letta (formerly MemGPT) MemFS: a git repository of Markdown files per agent, plus searchable messages The agent rewrites its own memory. Background "dreaming" reviews recent conversations Yes. Markdown with frontmatter, and every edit is a git commit
Zep / Graphiti A temporal graph of entities, facts and source episodes. Graphiti needs Neo4j, FalkorDB or Neptune An LLM builds the graph from ingested data Through graph queries. Zep adds a dashboard with graph views
LangMem Any store. Native to LangGraph's long-term store The agent, through memory tools, or a background manager Depends on the store you pick
TencentDB Agent Memory Chat Memory, Skill, Wiki and CodeGraph assets. Chat memory in layers L0 to L3. SQLite by default An async pipeline refines raw conversations layer by layer In the Memory Hub panel, with owners and versions
claude-mem SQLite for sessions and summaries, Chroma for search Lifecycle hooks capture tool use, then an observer model compresses it In a local web viewer
memU Markdown memory and skill files, embedded for retrieval The host agent, working from its own session logs Yes. Readable Markdown
Claude Code auto memory A MEMORY.md index plus topic files per repository Claude, during the session Yes. Plain Markdown you can edit
Codex memories Generated Markdown summaries in the Codex home folder. Off by default Codex, in a background job Readable, but OpenAI says hand edits should not be your main control

Hosting decides which agents can reach it.

Works with License Hosted option
Mem0 Python and JavaScript SDKs in any app. Plugins for Claude Code and Codex Apache-2.0 Mem0 Platform
Letta Letta Code agents in the CLI, the browser and chat apps. Letta Agent SDK for TypeScript Apache-2.0 Letta Cloud
Zep / Graphiti Zep: MCP or SDKs for Python, TypeScript and Go. Graphiti: Python Graphiti is Apache-2.0. Zep is a cloud service Zep, fully managed or in your cloud. Graphiti is self-hosted only
LangMem LangGraph apps. The core API works with any storage MIT None of its own. LangGraph Platform includes the store it uses
TencentDB Agent Memory Agents pointed at its proxy: Claude Code, Codex, CodeBuddy, WorkBuddy, Hermes, OpenClaw, DeepSeek Harness MIT Tencent Cloud service, by trial application
claude-mem Claude Code, plus installers for OpenCode, T3 Code, Antigravity, Pi, DeepSeek Harness and OpenClaw Apache-2.0 CMEM Pro hosted memory. The observer has a 30-day free trial
memU Codex, Claude Code, Cursor, OpenClaw, Hermes Agent, WorkBuddy, Cola, pi, plus a generic adapter Apache-2.0 memu.so, free and cross-device
Claude Code auto memory Claude Code only Built into Claude Code None. Machine-local
Codex memories Codex only Built into Codex None. Local to one machine

Each row comes from that project's README: Mem0, Letta Code, Graphiti, Zep, LangMem, TencentDB Agent Memory, claude-mem and memU. Extra details come from Mem0's storage defaults and Claude Code plugin page, Letta's MemFS and memory docs, and Tencent's install guide and product page. The host rows use Anthropic's memory docs and OpenAI's Memories page. Codex's Markdown file names are in its memory notes. Our Codex memory v2 guide walks through them.

The Graphiti README describes its own scope carefully: "Neither is an agent memory product." In its words, Graphiti is a framework for building graphs. Zep serves an enterprise's context to agents. Teams use both to give agents memory. Letta's main repository now points to Letta Code, a full agent harness, so its memory belongs to agents that run there.

How do you choose an agent memory framework?

Start with two questions. Is the memory for your product's end users? Or is it for you and your own agents? Then decide who should choose what gets saved: a separate LLM pipeline, or the agent doing the work.

Pick When it fits What to check first
Mem0 An app with many end users, with memory scoped per user and per session Extraction only adds, so plan how outdated memories get removed
Zep Facts change and you want point-in-time answers without running a graph database It is a cloud service. Graphiti is the open-source part
Graphiti The same need, and you will run Neo4j, FalkorDB or Neptune yourself You build ingestion, tenancy and access control around it
Letta The long-running agent is the product, reachable from the CLI, browser or Slack Its memory belongs to Letta's own agents
LangMem Your agent already runs on LangGraph Reading and fixing memory depends on the store you pick
TencentDB Agent Memory A team wants shared memory with owners, access levels and indexes of docs and code Team Memory is marked beta, and CodeGraph favors public HTTPS repositories
claude-mem You live mostly in Claude Code and want every tool call captured and searchable The observer model runs on a trial, then your plan or a subscription
memU You switch between coding agents and want them to read one Markdown memory No ChatGPT Chat mode, and no Claude Chat or Cowork
Built-in host memory One host on one machine Memory stays with that one host and machine

memU is the wrong pick for per-user memory in a multi-user product. Its README also describes neither point-in-time queries nor team permissions. The rows above cover those needs. More detail on two of the options is in our Mem0 explainer and our Zep and Graphiti post.

For research beyond these products, our post on Microsoft's long-term agent memory paper shows how episodic records and structured facts can be combined.

What can go wrong with agent memory?

Stale facts are the first problem to plan for. Mem0's extraction only adds, and its README says "nothing is overwritten," so check how your app removes outdated memories. Graphiti marks a changed fact invalid and keeps it with its dates.

Inspection is the second risk. A vector store or a graph needs the vendor's dashboard or queries to read. Markdown files open in any editor, but they grow and need pruning too. Claude Code, for example, loads only the first 200 lines or 25KB of MEMORY.md at session start.

Then check who pays for the model calls. Mem0 needs an LLM for extraction. claude-mem's observer uses a hosted trial, then your Anthropic plan or a subscription. TencentDB's install asks for two sets of LLM settings. memU's service makes no LLM calls. The host agent writes memory on your existing plan, and self-hosting needs an embedding key.

Mem0 and Tencent both publish scores on benchmarks they ran themselves. We left the numbers out. They use different tests and setups, so they do not compare across products.

The bottom line

Pick by whose memory it is. For your app's end users, start with Mem0. Use Zep or Graphiti when facts change over time. For a standalone agent that improves itself, use Letta. For your own coding agents, start with your main host's built-in memory and add a cross-host layer once you switch hosts.

Which of these memories can all your coding agents read?

Say Claude Code learns on Monday that your API tests need a local Redis and writes it to MEMORY.md. On Tuesday you open Codex in the same repository. Codex keeps its own memory in its home folder and has never seen that note. A shared AGENTS.md carries the rules you write, as our shared memory guide shows, but not what an agent learns. Four options in this guide connect several hosts to one memory. They differ in who writes it and what you can read.

Mem0 plugins claude-mem TencentDB Agent Memory memU
How it connects Plugins for Claude Code and Codex Lifecycle hooks The agent's base URL points at a proxy Reads session logs. A line in CLAUDE.md or AGENTS.md triggers retrieval
Who writes the memory An LLM extraction call on each add An observer model An async LLM pipeline you configure The host agent itself
What you can open Memories via SDK, CLI or dashboard A local web viewer The Memory Hub panel Markdown files
Hosting Mem0 Platform API key, with no self-hosted option documented CMEM Pro, or local Self-hosted, or Tencent Cloud by application memu.so free, or self-hosted with an embedding key

The short version: the other three run a separate model and show memory in their own tool. memU has the agent you already use write plain Markdown files you can open and edit.

If you use one host on one machine, its built-in memory is enough. Claude Code's auto memory is already plain Markdown you can edit. For a team that needs access rules on shared memory, TencentDB Agent Memory is the closer fit, since memU's README does not describe team permissions.

To try memU hosted, get an API key from memu.so and send your agent one message:

Read https://memu.pro/SKILL.md, follow its instructions to install and configure memU, API Key is YOUR_MEMU_API_KEY.

The self-hosted setup and the per-host support matrix are in the memU GitHub repository. More on the design is at memu.pro, including why memU keeps memory as readable files.

FAQ

What is the difference between Mem0 and Letta?

Mem0 is a memory layer you call from your own app: an LLM extracts facts, and you search them through an API. Letta is a full agent harness whose agents rewrite their own memory, stored as Markdown files in a git repository.

Is Zep open source?

Graphiti, the temporal knowledge graph framework inside Zep, is open source under Apache-2.0. Zep itself is a cloud service. You can use it fully managed or run it in your own cloud.

Is LangMem only for LangGraph?

No. LangMem's core memory API works with any storage system. It integrates natively with LangGraph's long-term store, and its README examples use LangGraph.

Does Claude Code have built-in memory?

Yes. Auto memory is on by default in local sessions. Claude writes notes to a MEMORY.md index and topic files per repository, and they stay on that machine.

What is the best AI agent memory framework in 2026?

None wins every case. For apps with many end users, start with Mem0. Use Zep or Graphiti when facts change over time. Agents you use yourself are better served by Letta or by file-based memory such as Claude Code's auto memory.