AI agent memory tools compared: choose the right layer
First decide whether you need a memory service, a persistent agent or memory-management code inside your existing runtime. Mem0 adds and retrieves scoped memories; Zep organizes user context in temporal graphs; Letta persists an agent's memory and configuration; LangMem supplies memory-management primitives and tools. Test write visibility, updates, restart recovery, migration and access boundaries on your own workload.
Documentation checked . Compare workflows
Choose by workflow
Documented workflow links lead to primary sources. Fit and pilot questions are editorial recommendations. On small screens, scroll the table horizontally to read every column.
| Tool and source | Documented workflow | Consider when | Verify in your pilot |
|---|---|---|---|
| Mem0 Checked against docs on . | A managed API or local SDK extracts memories from messages and scopes them with identifiers such as user_id. | You want a memory layer alongside an agent runtime you already operate. | When a pending write completes, how changed facts are handled (add is additive), and how expiry differs from deletion. |
| Zep Checked against docs on . | A user Context Graph collects messages and business data; a thread retrieves a Context Block for the next request. | You need to assemble relevant user context across conversations and changing business records. | Map application identities to user, graph and thread UUIDs; pin the API version and test changed facts. |
| Letta Checked against docs on . | A persistent agent carries memory, model configuration, tools and conversations; its conversations share agent memory. | You are choosing a persistent agent's execution model as well as its memory. | Whether your identities and conversation boundaries match that sharing model, and how local or cloud state is backed up. |
| LangMem Checked against docs on . | Memory extraction and management primitives work with storage systems; tools integrate with LangGraph's long-term store. | You want memory behavior in application code and can operate the backing store. | Which store persists across restarts; the example's InMemoryStore loses memories when its process restarts. |
Name the information that needs to survive
A remembered fact is useful only if your agent can apply it in the right context. Start with three examples from your application: a user preference, a changing policy and an unfinished task. They may need different owners, retention rules and retrieval behavior. Storing all three as similar text makes the integration look simple while leaving those decisions unresolved.
The four types of agent memory explain the conceptual roles. This guide compares implementation choices and the checks to run before adopting one. The linked primary documentation was checked November 7, 2026. Product fit is our editorial interpretation; the checklist and the two downloadable fixtures are proposed acceptance tests, with no measured performance ranking.
In episode 53 at 8:20, Richmond Alake argues for treating memory as a first-class part of system design, where every piece of information is something to be remembered or forgotten. That is the case for testing the whole lifecycle. It does not tell you which of these four tools fits your workload. Episode 53 was sponsored by Galileo, as Conor says when he thanks the show’s presenting sponsors. Galileo does not sell a memory layer and is not compared here.
Compare layers before comparing scores
These four options make different architectural commitments. Mem0 supplies a memory layer; Zep supplies user context from a graph; Letta supplies a persistent agent; LangMem supplies primitives and tools for memory management. We selected them to illustrate those four implementation approaches; this is not a complete inventory. Shortlist the layer your application needs first. A published memory benchmark does not tell you how much of your existing runtime you will have to replace.
Mem0: the add-memory documentation describes managed and local-SDK paths, identifier scoping, inferred memories and raw-message storage. It also describes additions as additive. Test a changed preference through your intended update mechanism rather than assuming a second add replaces the first. The Platform example returns a pending status with an event ID; confirm the write completed before assuming it is ready. Its expiration option hides expired memories from normal search and listing; fetching by ID can still return them. Treat expiry and deletion as separate acceptance cases.
Zep: the v4 agent-memory guide maps users to Context Graphs and conversations to threads, then calls thread.get_context to retrieve a Context Block before a model request. It identifies them by user, graph and thread UUIDs; the older v3 guide uses user_id, thread_id and thread.get_user_context, so keep documentation and SDK versions together. Test the mapping between your application’s user, tenant and workflow identities. The same documentation makes clear that retrieved memory does not authorize external actions: the application still controls tool permissions.
Letta: its stateful-agent documentation describes persistent identity, memory, model configuration, tools and conversations. Memory is shared across an agent’s conversations. That is useful for one continuing identity, and it is a boundary you must deliberately design when different users or tasks need separate knowledge. Test that your chosen agent structure creates the separation you expect.
LangMem: the library documentation provides extraction and management primitives plus LangGraph store integration. Its introductory in-memory store does not survive a restart. Select and operate a persistent store for the workload that needs recovery. This route makes sense when your team wants to control memory behavior in code and accepts responsibility for storage and execution.
Use a changing-fact pilot
Illustrative pilot: a support agent helps two customers with similar requests. A policy changes during the test, one customer withdraws a preference and an unfinished task resumes after a restart. Keep the authoritative policy separate from remembered conversation text. Give each record an owner, source and effective date.
| Acceptance case | Expected behavior |
|---|---|
| A new policy conflicts with an older remembered policy | Retrieve and apply the applicable authoritative source; identify the conflict |
| A relevant record belongs to the other customer | Exclude that customer’s information from retrieval and the answer |
| A preference changes | Apply the new preference consistently across the intended sessions |
| A preference expires | Stop using it in normal retrieval; separately verify what remains stored |
| A record is removed | Check the deletion operation and whether derived summaries, indexes or caches still expose it |
| The service or agent restarts | Recover required task state without recovering revoked authority |
| Retrieved text requests a new external action | Treat it as context; require the application’s current action authorization |
Run each case with a deliberately wrong setup as well as the intended one. If a test still passes after you point retrieval at the wrong customer, the test is too weak. Inspect both the retrieved context and the final answer: an apparently safe answer can conceal an incorrect retrieval boundary.
Freeze a small fixture before connecting a tool
Download the synthetic memory pilot (JSON). It defines two fictional users, three source records and four ordered cases. It is test data to adapt, not a runnable integration or a benchmark result.
- Seed a brief-answer preference for both users. Ask user A for their preferred answer style in a fresh conversation.
- Change only A’s preference to detailed answers. Ask the same question in another fresh conversation, without supplying either preference in the prompt.
- Ask user B in a fresh conversation. B’s remembered preference must stay brief; A’s change must not cross the user boundary.
- Restart the application while keeping its intended persistent store. Ask A again without restoring prior chat history. The changed preference should survive through the memory path being tested.
Adapt the operations to each tool and record that adapter’s version. Map the fixture’s source IDs to stored records or other provenance your application keeps. Identify the current source in the retrieved context; an older record may be present if it is clearly marked as superseded. Another user’s record must stay excluded even if the final answer happens to be right. If you cannot inspect that boundary, record the visibility gap rather than counting an answer-only pass.
Choose a write-readiness deadline before running, and record pending, failed and timed-out operations instead of retrying until the answer looks right. A write acknowledgement, a retrievable update and a correct answer are different observations: a correct retrieval followed by a stale answer is a different problem from a write that never becomes visible, so report them separately. This fixture covers initial recall, an update, user separation and restart recovery; add the policy, expiry, removal and action-authorization cases above before deciding.
Test migration separately from a restart
A restart tests recovery in the same environment. A migration also tests whether the destination can interpret what you moved. How to make agent memory portable covers the transfer contract; this test checks one cutover. Exports have a scope: Letta’s Agent File documentation, in its legacy V1 SDK section, packages prompts, editable memory, tool definitions and model settings, lists archival memory passages as planned, and says other frameworks would need to convert the state into their own representations. Check the export contract for the exact product and version you will run.
Download the synthetic migration pilot (JSON). It extends the same example: export after A’s first update, then change A once more in the source before cutover. A destination restored from the snapshot alone will miss that final change, so restore the snapshot and the later update, then query both users in fresh conversations. Compare a restored copy on the same runtime and model first, then change the model, then the runtime, one layer at a time. Import completion and record counts do not establish correct retrieval.
Make the operating responsibility explicit
Record who owns extraction, writes, retrieval, conflict handling and removal. Ask which operations incur model calls, what happens when those calls fail and how asynchronous writes become visible. Measure the delay from a changed fact to a corrected answer, alongside retrieval latency and task success. Keep the workload and model configuration with those results.
Before adoption, export representative records and restore them into the environment your team intends to operate. Confirm what the SDK exports and what requires a separate application backup. Test recovery explicitly; a successful chat does not demonstrate it. The right choice is the one whose memory lifecycle your team can explain, inspect and maintain.
To turn these acceptance cases into a repeatable regression suite, use the AI evaluation tools comparison.
The conversations behind the decision
These guest perspectives explain the engineering problem. The linked documentation above supports the current product descriptions.
Memory should be a first class primitive in your systems that you're building.