Index Agentica

How agent memory layers store, retrieve and forget

How MemMachine, Mem0, Memobase, Redis Agent Memory, Zep, Graphiti, Cognee, Letta and SurrealDB Agent Memory store, retrieve and forget: memory types, retrieval, deletion, and multi-user scoping.

Type
Comparison
Author
Agentica Author
Published
Last verified

Comparison

How agent memory layers store, retrieve and forget
EntryMemory typesHow retrieval worksDeletion and forgettingMulti-user scoping
MemMachineOfficial docs split semantic/profile memory (SQL, e.g. PostgreSQL with pgvector; tag/feature/value plus citations) from episodic memory: short-term raw episodes (one message each, plus summaries) and long-term reranked, deduplicated episode batches. Working/short-term sits on the episodic path.Profile retrieval is vector search that returns matching entries with conversation citations. Search Memories queries a project. Optional agent_mode adds orchestration on episodic long-term retrieval for multi-hop queries (a tool-select agent and specialized lookup agents), not a single vector hit.REST: Delete Episodic Memory and Delete Semantic Memory. Official MCP delete_memory removes IDs from episodic or semantic stores (separate ID spaces; IDs come from search_memory). A search-time decay or TTL forget policy is not documented on these pages.ProjectContext isolates organization and project workspaces. MemoryContext optionally adds user_id, session_id, agent_id, and group_id for finer segmentation inside a project. How a missing identifier is defaulted is not further specified on the MemoryContext page.
Mem0How-it-works: an LLM extracts facts from messages into vector, entity and history stores (messages are not stored as the memories). Platform also offers optional structured Profiles (a schema-defined, always-current user summary you read instead of searching) and Platform graph memory.search() ranks memories for a query. Platform supports filters and an optional managed reranker; advanced-retrieval docs cover keyword, reranking and hybrid. Official search docs say to always pass at least a user_id filter to avoid mixing users. OSS uses field filters in the same filters object.delete(memory_id), batch_delete (docs: up to 1000 IDs), and delete_all by user_id, agent_id, run_id or metadata, on Platform and OSS. Platform Memory Expiration can stop a memory surfacing after a date without deleting it. Memory Decay is opt-in search-time scoring; it does not delete memories.Platform entity IDs: user_id, agent_id, app_id, run_id. Writes accept combinations, but default extraction attributes a fact to the speaker, so a record typically has user_id or agent_id, not both (unless Direct Import). Unmentioned IDs are not required to be null on read.
MemobaseOfficial positioning: a user-profile-based long-term memory backend. It maintains structured profile slots (real-time user profile) plus an event timeline (recent events, event gists, optional tags). It is not documented as a general working-memory session store.Get User Profile for the structured profile. Get User Personalized Context builds a memory prompt (size and filters documented). Events can be listed or searched semantically, by gists, or by tags. MCP tools: save_memory, search_memories, get_user_profiles.REST APIs: Delete User, Delete User Event, Delete User Profile, and Delete Blob. A decay or TTL forget policy is not documented on these pages. The official MCP page does not document a delete tool.First-class per-user APIs (create, get, update, delete user; all profile and event calls are for a user). A project can list its users. A separate agent_id or org-wide shared graph is not documented on these pages.
Redis Agent MemoryTwo official tiers: session memory (ordered conversation events, with optional summarization) and long-term memory. The overview maps session memory to working memory, long-term type episodic to a session snapshot, and type semantic to durable cross-session facts. Custom types are documented.Retrieve a session’s events by session ID. Search long-term memory semantically and narrow with filters (owner, session, namespace, topic, or memory type). Multi-session recall is documented. Interfaces: redis-iris SDK (memory.recall), REST POST /memories/search, iris CLI, and an MCP server.Delete long-term memories by ID (SDK delete; REST .../memories/bulk-delete). The official quickstart also shows cleaning up every session and memory a user owns. Session events expire after a configurable short-term TTL and then leave session retrieval. Long-term memory has a separate TTL.ownerId on long-term memories (who the memory belongs to, independent of the event’s actorId). Sessions use session IDs plus actors. Optional namespaces group conversations and memories, including a shared namespace for several users. Filters can constrain search by owner, session, or namespace.
ZepA temporal Context Graph plus a Context Block. Official context types: facts, entities, episodes, thread summaries, observations, and the user summary. Facts are relationships with bi-temporal valid_at/invalid_at timestamps. Episodes are raw ingested artifacts; threads group conversation messages.Retrieve a prompt-ready Context Block from a user’s graph, query the graph for records, use context templates, or assemble context yourself (graph search). Official retrieve docs cover preloaded context versus tool-retrieved context.Explicit delete APIs for an edge, node, episode, thread, user, or Context Graph (UUID; async task). Deleting an edge does not delete its nodes. Facts can also be invalidated in time via invalid_at. Retention docs cover default retention, what deletion removes, and policies that delete idle context.Users, threads, user graphs, and shared/account Context Graphs are first-class. Official guidance is to ingest into the correct graph (user vs account) and retrieve from authorized scopes. Governance (RBAC/ABAC) is documented separately.
GraphitiZep’s open-source temporal knowledge graph (Context Graph): episodic nodes plus entities, facts/edges, communities and sagas. Official overview: incremental episode updates, a bi-temporal model, and temporal edge invalidation. It is the framework Zep uses, not the hosted Context Lake.Hybrid search fuses semantic similarity, BM25 full-text, and graph methods. graphiti.search combines semantic and BM25 and reranks with Reciprocal Rank Fusion; an optional focal_node_uuid reranks by graph distance to a node. Overview: no LLM-in-the-loop reranking in that hybrid path.Contradiction handling is temporal edge invalidation (facts expire in time rather than only being overwritten). CRUD also documents hard deletes: delete, delete_by_uuids, or delete_by_group_id on nodes and edges. A hosted retention-policy product is not documented on the Graphiti pages cited here.Nodes and edges carry a group_id (examples use identifiers such as customer-123). get_by_group_ids and delete_by_group_id operate on that field. A separate user/thread/account model like Zep’s hosted product is not documented on these Graphiti pages.
CogneeOfficial session guide: short-term session memory per session_id, plus a long-term knowledge graph that persists across sessions (session content can be promoted into the graph). MCP overview: remember, recall and forget. A named profile-memory product is not documented on these pages.recall() with documented SearchType options (including GRAPH_COMPLETION and other completion/retriever modes in the guides). MCP recall tool. Guides also cover RAG and hybrid retrieval, a temporal knowledge graph (SearchType.TEMPORAL), and an importance_weight on remember() that affects ranking.Official MCP tools include forget. The sessions guide shows cognee.forget(everything=True) as a clean start. Further forget filters or a decay/TTL policy are not spelled out on the pages cited here — treat extra behavior as not documented.session_id isolates conversational short-term memory; the knowledge graph is shared across sessions. recall() can use a default user when none is passed. MCP: standalone for one user; API mode shares one graph, and each instance’s writes belong to one Cognee user per token.
LettaAgent-owned memory, not a user-profile store. Creation can set persona/human or labeled Markdown files (system/ files are in the prompt every turn; others are on-demand). MemFS is a git-versioned memory filesystem the agent edits. Dreaming is a background subagent that updates memory.system/ memory is in context every turn; the agent reads other MemFS files from the file tree. Official MemFS docs: a search mod for keyword search; semantic and hybrid modes need QMD over $MEMORY_DIR. Conversation-history search is separate (Cloud: full-text, vector, hybrid; local: full-text only).The agent edits and commits memory files; every edit is a git commit (history and conflict resolution are documented). A dedicated forget or delete-memory API, and a decay/TTL policy, are not documented on the memory, MemFS, or dreaming pages cited here.Memory is per agent and persists across that agent’s conversations. Cloud shared-memory repositories attach the same Git-backed files to multiple agents. A first-class end-user tenant id (user_id) for memory rows is not documented on these pages.
SurrealDB Agent MemoryOfficial lifecycle and product docs: durable facts (entities, attributes, instructions) with provenance, plus a full episodic transcript that stays addressable via sessions. Facts have categories such as context, knowledge and identity. License and pricing stay in the earlier comparison.The product page documents hybrid retrieval that fuses seven signals: vector, lexical, graph, section links, PageRank, geographic and trace history. Point-in-time reads are part of the tri-temporal/supersession model (you can ask what was true last month). A built-in MCP server is documented.Three mechanisms: supersession (close the old belief in time, keep history); decay (official daily rates: context 0.95, knowledge 0.995, identity 1; never ends a fact); and forget (POST /forget or entity delete expires current retrieval; purge: true erases). Context facts expire in 7 days.Official product text: scope-bound multi-tenancy enforced by Agent Memory. Decay rates and the 7-day context expiry are the same for every Context, scope and principal, including Enterprise — not configurable per Context or scope. Grants such as memory:forget are documented on the lifecycle page.

Verdict: For documented forget that is separate from decay and supersession, start with SurrealDB Agent Memory. MemMachine is the layered episodic-plus-profile pack with separate delete APIs and optional agentic retrieval. Memobase is a per-user profile and event timeline. Redis Agent Memory maps working, episodic and semantic tiers, with TTLs and ID deletes. Zep and Graphiti share temporal graphs with invalidation and explicit deletes; Zep also has user/thread/account graphs and retention policy. Treat missing delete, decay or tenant language as not documented.

Who this is for

Use this when you already know you want a memory layer and need to compare how official docs say each one stores, retrieves and forgets. License, hosted pricing, SDK languages, framework ties, and a first-pass “memory model / how it is written / is there an MCP server” table live in Memory layers for AI agents. This page does not repeat that table. It adds MemMachine (added to the directory on 17 November 2026) and two other catalog entries that comparison does not cover — Memobase and Redis Agent Memory — and it re-reads the overlapping products only on types, retrieval, deletion and scoping.

Coding-agent memory servers and research libraries are compared separately in Memory servers for coding agents and Research memory libraries. The introductory walkthrough remains Give an agent long-term memory. Use SurrealDB Agent Memory is the SurrealDB-specific guide.

Facts below were checked against official documentation and official repositories on 21 November 2026. Where a vendor page is silent, the cell says not documented. No unofficial skill totals or benchmark scores are used. Vendor benchmark pages exist (for example MemMachine’s evaluations page); they are not summarized here as scores.

What “store, retrieve and forget” means here

Interfaces (SDK, REST, MCP) are mentioned in the table only where they are how you call those operations. Wiring a remote MCP server is covered in Connect an agent to a remote MCP server. Identity and token scoping more generally are in Agent identity and MCP auth.

Notes that do not fit a cell

MemMachine documents MCP tools add_memory, search_memory and delete_memory at Tools Reference. An older /integrations/mcp docs path, noted in the directory entry, still returned 404 on 21 November 2026 and is not used here.

Graphiti is Zep’s open-source temporal graph framework; Zep is the hosted context layer that uses it. They share bi-temporal facts and hybrid retrieval, but Zep’s user/thread/account graphs, async delete tasks and retention policies are product docs, not Graphiti library docs.

Letta memory is agent-owned files in MemFS, not a user-row store in the Mem0/Memobase sense. If you need per-end-user profiles, that difference matters more than the word “memory” in the product name.

Several products document a default user or optional IDs (Cognee’s recall when no user is passed; MemMachine MemoryContext fields are all optional). Optional is not the same as “isolated by default.” Pass the scope your product docs require; Mem0’s search page tells you to always include at least a user_id filter.

Related reading

Directory entries in this comparison

Related

Sources

Machine-readable