---
title: "Best AI Agent Memory 2026: Mem0 vs Zep vs Cognee vs Supermemory"
description: "Your agent forgets everything when the chat ends. Two open-source memory layers (Mem0, Cognee) and two managed services (Zep, Supermemory) compared on how they store memory, what they cost for 1,000 users, and why every vendor claims the top benchmark score."
source: https://appstackbuilder.com/blog/best-ai-agent-memory-2026
retrieved: 2026-10-17
---

[Back to Blog](https://appstackbuilder.com/blog)

AI Infrastructure2026 Guide

# Best AI Agent Memory in 2026: Mem0 vs Zep vs Cognee vs Supermemory

A model remembers nothing once the conversation ends. A memory layer decides what is worth keeping and gives it back to the agent next time. We compare two open-source options, **Mem0** and **Cognee**, with two managed services, **Zep** and **Supermemory**: how each stores memory, what each costs for 1,000 users, and how to read benchmark scores that every vendor says it tops.

12 min read2 open source, 2 managedPublished October 2026

## First: why not just keep the chat history?

The simplest memory is pasting earlier messages back into the prompt. It works for one session and breaks after that: the history outgrows the context window, every call pays for thousands of tokens the model mostly ignores, and old facts ("I live in Berlin") sit next to new ones ("we moved to Lisbon") with nothing to say which is true.

A **memory layer** replaces the transcript with a small set of facts. After each exchange it extracts what matters; before the next one it retrieves only the facts relevant to the new message.

### Personalization across sessions

Preferences, names, decisions and past problems carry over, so users stop repeating themselves.

### Smaller prompts

A few hundred tokens of relevant facts replace a long transcript, which cuts cost and latency on every call.

### Facts that change

A good memory layer updates or retires a fact when it changes, instead of returning both versions.

### Memory for the agent, too

Agents can store what worked ("this API needs a date in ISO format") and reuse it on the next task.

**What it does not do:** it does not make the model reason better, and it can remember wrong things. If a user says something sarcastic or the extraction model misreads a message, that becomes a "fact". Give users a way to see and delete what is stored about them, which privacy law in many places requires anyway.

**Do you need this yet?** If each conversation stands alone (a support bot answering from docs, a one-shot generator), no; you need document search, not memory. You need it when the same user comes back and the product should know them.

## Quick Verdict

![](https://www.google.com/s2/favicons?domain=mem0.ai&sz=128)Mem0

Apache-2.0 memory layer you add to an existing agent as a library, a self-hosted server or a managed platform. Facts are retrieved with semantic, keyword and entity search combined.

Open source\~67K GitHub stars

![](https://www.google.com/s2/favicons?domain=cognee.ai&sz=128)Cognee

Apache-2.0 knowledge-graph memory built from documents, code and conversations, with the evidence behind each answer. Runs locally with no LLM key.

Open sourceKnowledge graph

![](https://www.google.com/s2/favicons?domain=getzep.com&sz=128)Zep

Managed temporal knowledge graph: records when a fact became true and when it stopped. Built on the open-source Graphiti engine. Retrieval does not use credits.

Facts over timeManaged

![](https://www.google.com/s2/favicons?domain=supermemory.ai&sz=128)Supermemory

One hosted API for user memory, user profiles and document search, with connectors for Gmail, Drive, Notion and GitHub. Plans from $19 a month.

Memory + RAGManaged

TL;DR

No single winner. Pick on your constraint. Add memory to an agent you already have, self-hosted or cheap managed → **Mem0**. Memory that has to explain itself, built from documents and code → **Cognee**. Facts that change and you need to know when → **Zep**. One API for memory plus document search with ready connectors → **Supermemory**.

## The question that decides it: facts, or a graph?

All four extract information with a model and retrieve it later. They differ in what they store, which changes what they are good at.

### 1\. A list of facts: Mem0, Supermemory

Each memory is a short statement linked to a user, session or agent. Retrieval finds the statements closest to the new message. Simple, fast and easy to inspect. Mem0 adds entity linking across memories; Supermemory merges memory with document search in one call.

### 2\. A knowledge graph: Cognee

Entities and the relationships between them, extracted from documents, code and chats. Good when answers depend on connections ("which customers use the feature this bug affects?"), and each answer can show the graph evidence it came from.

### 3\. A graph with time: Zep

The same graph idea, but every fact carries when it became true and when it was replaced. Ask what is true now, or what was true in March, and get the right answer for each.

A quick test: if a stale fact returned by mistake would cause real harm (a wrong address, an expired entitlement), lean toward Zep. If the main job is "remember what this user likes", a fact list is enough and cheaper to run.

## The four, in detail

Plans, prices and limits as published on each vendor's site or repository in October 2026.

Open source

![](https://www.google.com/s2/favicons?domain=mem0.ai&sz=128)

### Mem0

Open-source memory layer

$0 self-hosted · Platform from $19/mo

Hobby free: 10K adds, 1K retrievals a month

* Apache-2.0; about 67K GitHub stars, the largest community in the category
* Remembers user, session and agent state
* Python or npm library, self-hosted Docker server, or managed platform
* Hybrid retrieval: semantic, BM25 keyword and entity matching
* Platform: Starter $19/mo (50K adds, 5K retrievals), Pro $249/mo (500K / 50K, graph memory)
* Enterprise adds on-prem deployment, SSO and audit logs
* CaveatGraph memory is Pro-only on the platform. The April 2026 benchmark gains were measured on the managed platform, which Mem0 says includes proprietary optimizations; it expects similar, not identical, results from the open-source build. Self-hosted, you pay for the extraction model on every message.

Best for: Teams adding memory to an agent they already have, who may want to self-host later.

Graph + evidence

![](https://www.google.com/s2/favicons?domain=cognee.ai&sz=128)

### Cognee

Open-source knowledge-graph memory

$0 self-hosted · Cloud $1 per 1M tokens

Cloud free for the first 1M tokens; $5 per extra workspace

* Apache-2.0; about 32K GitHub stars
* Builds a knowledge graph plus vector index from documents, code and conversations
* Four operations: remember, recall, improve and forget
* Runs fully locally with a bundled extraction model and no LLM key
* Python, TypeScript and Rust SDKs, CLI, REST and MCP; plugins for Claude Code and Codex
* Enterprise is a bring-your-own-cloud engagement
* CaveatMore moving parts than a fact list, and building the graph adds time at ingest. Its published BEAM scores use different settings at each scale, which Cognee itself says should not be compared directly.

Best for: Agents that reason over company knowledge (docs, code, tickets) and need to show their sources.

Facts over time

![](https://www.google.com/s2/favicons?domain=getzep.com&sz=128)

### Zep

Managed temporal knowledge graph

Free · Flex $125/mo

Credits per 350-byte episode; retrieval uses no credits

* Records when each fact became true and when it stopped being true
* Built on Graphiti, Zep’s Apache-2.0 graph engine (about 32K stars)
* Free: 10K credits a month; Flex $125 (50K); Flex Plus $375 (200K, webhooks, analytics)
* Managed users, threads, dashboard and Python, TypeScript and Go SDKs
* Memory MCP server for Claude, Cursor and other clients
* Enterprise: SOC 2 Type II, HIPAA, BYOK or your VPC
* CaveatZep Community Edition is deprecated, so self-hosting means building on Graphiti and running your own graph database, without Zep’s managed users, models or dashboard. SOC 2 and HIPAA are Enterprise-only.

Best for: Products where facts change often and a stale answer costs money or trust.

Memory + document search

![](https://www.google.com/s2/favicons?domain=supermemory.ai&sz=128)

### Supermemory

Hosted memory and context API

Free · Pro $19/mo

Plans are dollar credits used at one rate card

* One API for memory, user profiles and document search
* Handles contradictions and forgets expired facts
* Ingests PDFs, images (OCR), video and code
* Connectors for Google Drive, Gmail, Notion, OneDrive and GitHub
* MCP server and plugins for Claude Code, Cursor and Codex
* Scale ($399/mo): SOC 2, HIPAA and a self-hosted option
* CaveatCredit-based billing is harder to forecast than a request count. The repository is MIT-licensed and a local server exists, but managed self-hosting starts at the $399 Scale plan, and its benchmark claims are its own.

Best for: Apps that want user memory and document search from one vendor, with connectors already built.

## Why every vendor tops the benchmark

Memory vendors publish scores on LoCoMo and LongMemEval, two public sets of long conversations with questions about them. Here is what each says, in its own words, and why the numbers do not line up.

| Vendor      | What it reports                                                        | Measured on                                 |
| ----------- | ---------------------------------------------------------------------- | ------------------------------------------- |
| Mem0        | 92.5 LoCoMo, 94.4 LongMemEval (April 2026)                             | Its managed platform                        |
| Supermemory | "#1" on LongMemEval, LoCoMo and ConvoMem; 95% recall@15 on LongMemEval | Its own MemoryBench framework               |
| Cognee      | 0.79 on BEAM at 100K tokens, LLM-judged                                | 20 questions from one held-out conversation |
| Zep         | No figures on its current comparison page                              | n/a                                         |

**How to read these:** accuracy, recall@15 and an LLM judge's score are different measures, so a 94 and a 95 here are not comparable. Each vendor also chooses the answer model, the judge and how many memories to retrieve. Use the scores to shortlist, then test on your own data: take a few hundred real conversations, write the questions a user would later ask, and count how often the right fact comes back and how many tokens it took.

## What 1,000 users cost

Our assumptions: 1,000 active users, each adding about 30 messages a month (30,000 adds), with one memory lookup per message (30,000 retrievals), and messages under 350 bytes. Prices from each vendor's October 2026 pricing page.

| Option                      | Plan that fits                                       | Monthly cost            |
| --------------------------- | ---------------------------------------------------- | ----------------------- |
| Mem0 platform               | Pro (Starter caps retrievals at 5K)                  | $249                    |
| Zep Cloud                   | Flex (50K credits; retrieval free)                   | $125                    |
| Cognee Cloud                | Standard, \~6M tokens ingested                       | \~$5–10                 |
| Supermemory                 | Pro or Max, depending on the rate card               | $19–100                 |
| Mem0 or Cognee, self-hosted | Your server + vector/graph store + extraction tokens | \~$30–80 + model tokens |

**The cost that hides:** memory extraction is an LLM call on every message. On a managed plan it is in the price; self-hosted, you pay your model provider for it. Mem0 defaults to a small model for this, and that choice matters more to the bill than the server. The Cognee figure assumes billing on ingested tokens; Supermemory publishes its rate card per 1K tokens and queries, so measure a week of real traffic before you pick a tier.

## Feature comparison

Capability

![](https://www.google.com/s2/favicons?domain=mem0.ai&sz=128)Mem0

![](https://www.google.com/s2/favicons?domain=cognee.ai&sz=128)Cognee

![](https://www.google.com/s2/favicons?domain=getzep.com&sz=128)Zep

![](https://www.google.com/s2/favicons?domain=supermemory.ai&sz=128)Supermemory

Licence

Apache-2.0

Apache-2.0

Hosted (Graphiti Apache-2.0)

Hosted (repo MIT)

Memory model

Facts + entities

Knowledge graph

Temporal graph

Facts + documents

Self-host the full product free

✓

✓

Graphiti only

Local server

Tracks when facts changed

Time-aware retrieval

Enterprise

✓

Forgets expired

Document ingestion

✗

✓

✗

✓

App connectors

✗

Slack, Notion, Linear, Drive

✗

Gmail, Drive, Notion, GitHub

MCP server

Agent skills / CLI

✓

✓

✓

Free managed tier

10K adds

1M tokens

10K credits

$5 credit

SOC 2 / HIPAA

Trust center

Enterprise

Enterprise

Scale plan

A cross means the feature is not described on the vendor's site or README, not that it cannot be built on top.

## Which one should you pick?

### You want an assistant that remembers its users

**Mem0** to start free and self-host later, or **Supermemory** if you would rather not run anything and also want document search. Run both on the same week of traffic and compare recall and tokens.

![](https://www.google.com/s2/favicons?domain=mem0.ai&sz=128)![](https://www.google.com/s2/favicons?domain=supermemory.ai&sz=128)Mem0 or Supermemory

### Facts change and the current one must win

**Zep.** Its temporal graph is built for "what is true now" versus "what was true then", and retrieval does not consume credits, so lookup-heavy agents stay predictable.

![](https://www.google.com/s2/favicons?domain=getzep.com&sz=128)Zep

### The agent works over company documents and code

**Cognee.** It builds the graph from documents and repositories, not just chats, and shows the evidence for each answer, which reviewers ask for.

![](https://www.google.com/s2/favicons?domain=cognee.ai&sz=128)Cognee

### Data may not leave your servers

**Mem0** or **Cognee**, self-hosted, with a local model for extraction. Cognee can run with no external LLM key at all. Zep's Graphiti is the third option if you want a temporal graph and can run Neo4j or FalkorDB.

![](https://www.google.com/s2/favicons?domain=mem0.ai&sz=128)![](https://www.google.com/s2/favicons?domain=cognee.ai&sz=128)Mem0 or Cognee

## Build the rest of the agent stack

Use our AI-powered generator to choose the model provider, vector database, agent framework and hosting around your memory layer, sized to your budget and team.

[Generate Your Tech Stack](https://appstackbuilder.com/build-stack?budget=100&appType=ai&teamSize=small)

## Frequently Asked Questions

### What is the best memory layer for AI agents?

There is no single best one; they store memory differently. Mem0 extracts facts and retrieves them with combined semantic, keyword and entity search, and drops into an existing agent as a library. Zep stores a temporal knowledge graph that records when each fact became true or stopped being true. Cognee builds a knowledge graph from documents, code and conversations and shows the evidence behind each answer. Supermemory is one hosted API that combines user memory with document search and connectors. Pick on what you need to remember and whether you want to run it yourself.

### Is Mem0 free?

The Mem0 library and self-hosted server are Apache-2.0 and free; you pay for the LLM that extracts memories and the store that holds them. The managed platform has a free Hobby tier (10,000 add and 1,000 retrieval requests a month), Starter at $19 a month, Pro at $249 a month with graph memory, and custom Enterprise with on-prem deployment.

### Is Zep open source?

Zep’s graph engine, Graphiti, is open source under Apache-2.0 and can be self-hosted on Neo4j, FalkorDB or Amazon Neptune. Zep Community Edition, the earlier self-hosted version of the full service, is deprecated. Zep Cloud, which adds managed users and threads, proprietary extraction and reranking models, a dashboard and compliance, is a paid service with a free tier.

### Which memory benchmark should I trust: LoCoMo or LongMemEval?

Treat both as rough signals. Vendors report different metrics (accuracy, recall at 15 results, LLM-judged scores), under different settings, often for their managed platform rather than the open-source build, and several each claim the top score. The only result that decides is a test on your own conversations: replay a few hundred real sessions and check whether the right fact comes back.

### Do I need a memory layer or is a vector database enough?

A vector database stores and searches embeddings; it does not decide what is worth remembering, merge a fact that changed, or forget one that expired. If you only need to search documents, a vector database is enough. If the agent should remember things users said across sessions, a memory layer saves you building that logic. Several of these tools run on top of a vector database you already have.

### How much does agent memory cost?

For 1,000 active users each adding about 30 messages a month, managed plans run from roughly $125 a month (Zep Flex) to $249 (Mem0 Pro, needed for the retrieval volume), with Cognee’s usage pricing lower still. Self-hosting Mem0 or Cognee is free in licences but you pay for the extraction model’s tokens on every message, plus hosting. See the cost table in this guide for the assumptions.

### Related Articles

[Best Vector Database for RAG 2026The store underneath most memory layers](https://appstackbuilder.com/blog/best-vector-database-rag-2026)[Composio vs Arcade: Agent AuthLetting the agent act in your users' apps](https://appstackbuilder.com/blog/composio-vs-arcade-agent-auth-2026)[LangGraph vs CrewAI vs AutoGenThe framework the memory plugs into](https://appstackbuilder.com/blog/langgraph-vs-crewai-vs-autogen-2026)

### Explore More

[All Blog Posts](https://appstackbuilder.com/blog)[Agent Memory Tools](https://appstackbuilder.com/categories/agent-memory)[LLM Observability](https://appstackbuilder.com/blog/llm-observability-evals-2026)[Stack Generator](https://appstackbuilder.com/build-stack)
