Comparisons

Cognee vs. Mem0

Mem0 is better for adding personalised memory to an assistant or agent quickly. Cognee is better when agents need a self-hosted knowledge graph built from documents and code.

Last updated December 2026

Mem0 is the better choice for adding personalised agent memory to an assistant or agent quickly, because its add-and-search API works in a few lines from Python or TypeScript and scopes memories to users, sessions and agents out of the box. Cognee is the better choice when an agent needs to reason over a knowledge graph built from documents, code and conversations, because it builds that graph on your own stack, adds ontology tools, and routes each query across graph, vector or code context.

We make Exabase, which appears as a short third option near the end. This is a neutral comparison of two open-source memory layers, based on each project’s GitHub README and each vendor’s pricing page, all checked on 4 December 2026.

Quick verdict

Choose Mem0 if you are building a chat assistant, support bot or copilot that should remember user preferences and past decisions, and you want the shortest path from zero to working memory.

Choose Cognee if your agent answers questions across a body of documents, tickets or code, the relationships between things matter, and you want to run the whole engine locally without an API key.

Consider Exabase if you want managed memory that resolves contradictions alongside isolated file storage, extraction and multi-modal search for each user or tenant.

Comparison table

Cognee

Mem0

What it is

Open-source AI memory platform that builds a knowledge graph from your data

Open-source memory layer that stores personalised memories for users and agents

Licence

Apache-2.0

Apache-2.0

GitHub stars (4 Dec 2026)

About 31.2k

About 68.1k

Core API

remember, recall, improve, forget

add and search memories, scoped to user, session or agent

Memory model

Knowledge graph plus vectors, with optional ontologies

Extracted memories in a vector store, with entity linking

Best input

Documents, code, tickets and conversations

Conversations and user interactions

SDKs

Python (3.10 to 3.14)

Python and TypeScript, plus a CLI

Runs locally

Yes, with no API key, using local extraction and embedding models

Yes, self-hosted server via Docker Compose

Managed service

Cognee Cloud: Standard $0, Premium $99 a month, Business $499 a month, plus tokens

Mem0 Platform: Free tier; Custom plan for higher volume

Enterprise

BYOC engagements with evals and architecture reviews

SSO, audit logs, SLA and on-prem on Custom

Published benchmarks

BEAM: 0.79 at 100K tokens, 0.67 at 10M

LoCoMo 92.5, LongMemEval 94.4, BEAM (1M) 64.1

What each project does

Mem0 calls itself drop-in memory infrastructure for AI agents and apps. You send it messages, it extracts the facts worth keeping, and later you search for the memories relevant to a query. Memories can belong to a user, a session or an agent, which maps neatly onto how most assistants are built. Mem0 has more than twice Cognee’s GitHub stars, and it has a managed platform at app.mem0.ai for teams that would rather not run it.

Cognee calls itself the open-source AI memory platform for agents. Its job is to turn documents, code and conversations into a self-hosted knowledge graph that agents can search and reuse. You remember content, recall it later, improve memory by enriching the graph, and forget what should go. At query time Cognee selects relevant graph, vector or code context, either automatically or through a search strategy you choose.

The difference is what each treats as memory. For Mem0, memory is what an agent has learned about a person. For Cognee, memory is a structured picture of a body of knowledge. Both ideas are valid, and they overlap less than the shared label suggests.

Winner: tie. They solve different problems.

Memory model

Mem0 stores memories as short, extracted statements in a vector store and retrieves them by similarity, with entity linking across memories to boost retrieval. Graph memory, listed as entity linking, appears in the feature list of its Custom plan. This model is simple to operate and works well for personalization: preferences, plans, past choices and constraints that an assistant should recall.

Cognee builds a graph of entities and relationships alongside vector embeddings, and its paid tiers add auto-ontology and an Ontology Editor so a team can define the types and relations that matter in its domain. That is closer to GraphRAG than to classic conversational memory, and it helps with questions that span several documents, such as which services depend on a deprecated API. For background, see vector database vs knowledge graph and knowledge graph vs ontology.

Winner: Mem0 for user memory. Cognee for structured knowledge.

Handling changing facts

Every memory system has to deal with facts that change. A user upgrades a plan, moves city or changes a preference, and the agent should use the new fact. Mem0’s extraction step compares new information with existing memories and updates them, which keeps a user’s memory current without manual work. Its benchmark results on LongMemEval, which tests knowledge updates among other things, rose to 94.4 with its April 2026 algorithm on the managed platform.

Cognee’s improve and forget operations give you explicit control over enrichment and removal, and because facts live in a graph, a changed relationship can be updated where it sits. How well either handles a particular conflict depends on your data, so test with real examples of memory drift before you choose. See contradiction resolution for the approaches in use.

Winner: Mem0 for automatic updates to user memory.

Data ingestion

Cognee is built for data ingestion at scale. It takes documents, code and conversations, and its hosted tiers add data source integrations for Slack, Notion, Linear, Microsoft and Google, with answer provenance so agents can show where a fact came from. Its Standard cloud tier includes 100 million tokens of processing at no charge.

Mem0 is built around messages. You can add text and documents, but its strengths are conversation turns and user interactions rather than large document sets. Teams that need both usually pair Mem0 with a separate RAG pipeline.

Winner: Cognee.

Developer experience

Mem0 has the easier start. Install with pip or npm, add messages for a user ID, then search. It ships Python and TypeScript SDKs, a CLI, and a self-hosted server you run with Docker Compose. Its community is large, so most agent frameworks already have examples for it.

Cognee is Python only, requiring Python 3.10 to 3.14. Its four operations are easy to learn, and it runs locally for free with no API key, using local GLiNER extraction and embedding models, which suits offline or air-gapped development. It also ships an MCP server for assistants such as Cursor and Cline, and integrations for Claude Code and Codex on its cloud tiers.

Winner: Mem0 for TypeScript teams and speed to first result. Cognee for local, keyless development.

Self-hosting and storage

Both are Apache-2.0 and both can run on your own infrastructure. Cognee’s README describes running relational metadata, PGVector and graph state on one Postgres service, with Postgres as a graph store released as a demo feature, and it keeps a folder for Kuzu as a graph backend. Mem0’s self-hosted server runs with Docker Compose, and the README notes a migration path from hosted Qdrant vectors to the Mem0 Platform.

If you self-host either, you own upgrades, backups and scaling of the underlying graph database or vector store. That is the usual trade for keeping data in your own environment.

Winner: Cognee for a single-Postgres deployment.

Benchmarks

Mem0 reports, for its managed platform with its April 2026 algorithm, 92.5 on LoCoMo, 94.4 on LongMemEval and 64.1 on BEAM at 1 million tokens, with median latency of 0.88 seconds on LoCoMo and about 7,000 tokens per retrieval. It notes that open-source users should expect similar but not identical numbers.

Cognee reports 0.79 on BEAM at 100,000 tokens and 0.67 at 10 million tokens, and cautions that the two settings use different conversations, ingestion models and retrieval procedures, so its scores should not be compared directly with other systems. That caution applies to every vendor’s numbers, including ours. Use published benchmarks to build a shortlist, then test on your own data.

Pricing

Both open-source projects are free to run yourself.

Cognee Cloud has a Standard plan at $0 a month with 100 million tokens included and $0.10 per million tokens after that, plus one workspace and $5 a month for each extra. Premium is $99 a month plus token usage and adds auto-ontology and the Ontology Editor. Business is $499 a month plus token usage and adds 20 workspaces, SSO, directory sync, a custom DPA and EU data residency. Enterprise is a bring-your-own-cloud engagement with no public price.

Mem0’s pricing page lists a Free plan with 10,000 adds and 1,000 retrievals a month for the first 30 days with model calls included, or 50,000 adds and 10,000 retrievals a month if you bring your own LLM key, and usage-based billing past those limits with a monthly cap you set. A Custom plan adds graph memory, SSO, audit logs, an SLA and on-prem deployment at contract pricing. The site footer lists SOC 2 Type I and HIPAA Ready; see Mem0 pricing for detail.

As an illustration, a team processing 300 million tokens of documents a month on Cognee Standard would pay $20 in token usage, or $119 on Premium if it needs the ontology tools. A small assistant within Mem0’s free limits pays nothing, and a larger one moves to custom pricing.

Winner: Cognee for transparent pricing at volume.

Who should choose Mem0

Mem0 suits teams building customer support agents, personal assistants and copilots that need to remember people. A real-world example: a fitness app adds Mem0 to its coaching chatbot so it remembers each user’s injuries, goals and preferred workout times, and stops suggesting exercises the user has already ruled out.

Who should choose Cognee

Cognee suits teams building research agents, coding assistants and internal knowledge tools, where answers depend on how documents, systems and people relate. A real-world example: a platform team loads its runbooks, incident tickets and service code into Cognee, then asks an agent which services were affected the last time a particular database failed and who owned the fix.

A third option: Exabase

Exabase is managed infrastructure for agents, with a memory engine and the storage and search around it. Exabase Memory runs on M-1, which extracts facts, preferences and events from conversations, builds a self-organising ontology, and resolves contradictions as facts change; Exabase reports 96.4% on LongMemEval and published BEAM results. For document knowledge, Resources stores and indexes files as they arrive, Extract turns PDFs, audio and video into structured content, and Deep Search finds the passage that answers a question. Bases keep each user or tenant isolated. Exabase is a managed service with a TypeScript SDK and a REST API, and it is not open source, so it fits teams that want these pieces run for them. The creating memories guide shows the API, and Exabase vs Cognee and Exabase vs Mem0 compare it directly. For document-heavy agents, see knowledge base.

How we compared

We read the Cognee and Mem0 GitHub READMEs and the Cognee and Mem0 pricing pages on 4 December 2026. We compared purpose, memory model, handling of changing facts, ingestion, developer experience, self-hosting, published benchmarks and pricing. Benchmark figures are each vendor’s own and are not directly comparable. The cost example uses list prices and assumed volumes and is illustrative, as are the real-world examples.

Frequently asked questions

Is Mem0 better than Cognee?

Mem0 is better for personalised memory in assistants and agents, with the quickest setup and SDKs for Python and TypeScript. Cognee is better for building a knowledge graph from documents, code and conversations that agents can reason over.

What is the difference between Cognee and Mem0?

Mem0 stores extracted memories about users, sessions and agents and retrieves them by similarity. Cognee builds a knowledge graph with vectors from your data and routes queries across graph, vector or code context.

Are Cognee and Mem0 open source?

Yes. Both are Apache-2.0. Each also has a managed service: Cognee Cloud and the Mem0 Platform. See the Cognee review and Mem0 review for more.

Does Mem0 support graph memory?

Mem0’s Custom plan lists graph memory as entity linking. The open-source README describes entity linking across memories for retrieval.

How much does Cognee cost?

Cognee is free to self-host. Cognee Cloud Standard is $0 a month with 100 million tokens included, Premium is $99 a month and Business is $499 a month, each plus $0.10 per million tokens over the allowance.

How much does Mem0 cost?

Mem0 has a free plan with monthly limits on adds and retrievals and usage-based billing beyond them. Higher volumes, graph memory, SSO and on-prem use a Custom plan.

Which is better for RAG over documents?

Cognee. It is built to ingest documents, code and tickets into a graph with provenance, while Mem0 focuses on conversational memory.

Can Cognee run without an API key?

Yes. Cognee runs locally for free using local extraction and embedding models, so you can develop without sending data to a model provider.

Does Cognee support TypeScript?

No. Cognee is a Python library. Mem0 offers both Python and TypeScript SDKs.

Can I use Cognee and Mem0 together?

Yes. Some teams use Mem0 for user memory and Cognee for document knowledge, querying both before each model call, at the cost of running two systems.

How do I move from Mem0 to Cognee?

Export your stored memories and source conversations, then remember them in Cognee with the documents you also want in the graph. Rebuild any user scoping with Cognee datasets and test recall on real questions.

What are the best alternatives to Cognee and Mem0?

Zep, Letta, Supermemory and LangMem are the common alternatives. See Cognee alternatives, Mem0 alternatives and the best open-source agent memory.

How does Mem0 compare with Zep?

Zep builds a temporal knowledge graph aimed at enterprise data, while Mem0 focuses on simple personalised memory. See Mem0 vs Zep for the full comparison.

Related pages: Mem0 vs Zep, LangMem vs Mem0, Zep vs Cognee, Letta vs Cognee, Cognee review, Mem0 review, Exabase vs Cognee, Best knowledge graph for AI agents, Knowledge graph, Agent memory, AWS AgentCore Memory vs Mem0

Compare similar apps and tools:

LangGraph vs. OpenAI Agents SDK

CrewAI vs. AutoGen

n8n vs. Zapier

Relevance AI vs. Lindy

Temporal vs. Inngest

Inngest vs. Trigger.dev

E2B vs. Modal

E2B vs. Modal

E2B vs. Daytona

People Data Labs vs. Apollo

ScreenshotOne vs. Urlbox

Microlink vs. Iframely

AWS Rekognition vs. Google Cloud Vision

Twelve Labs vs. Mixpeek

Twelve Labs vs. Google Video Intelligence

ElevenLabs vs. Deepgram

Deepgram vs. Speechmatics

AssemblyAI vs. Gladia

Zyte vs. ScrapingBee

Bright Data vs. Oxylabs

Google Document AI vs. Azure Document Intelligence

Rossum vs. Nanonets

Mindee vs. Veryfi

Reducto vs. Extend

LlamaParse vs. Mistral OCR

LlamaParse vs. Docling

Bedrock Knowledge Bases vs. Vertex AI Search

Vectara vs. Ragie

LanceDB vs. Chroma

MongoDB Atlas vs. Pinecone

Weaviate vs. Milvus

Vespa vs. Elasticsearch

Algolia vs. Typesense

Typesense vs. Meilisearch

Elasticsearch vs. OpenSearch

LangMem vs. Zep

Vertex AI Memory Bank vs. AWS AgentCore Memory

AWS AgentCore Memory vs. Mem0

Letta vs. Cognee

Zep vs. Cognee

Bedrock Knowledge Bases vs. Azure AI Search

OpenAI file search vs. Pinecone

Docling vs. Unstructured

Azure Document Intelligence vs. Textract

Mistral OCR vs. Textract

Reducto vs. Unstructured

Apify vs. ScraperAPI

Firecrawl vs. ScraperAPI

turbopuffer vs. Pinecone

pgvector vs. Qdrant

Chroma vs. Weaviate

Qdrant vs. Milvus

Letta vs. LangMem

Cognee vs. Mem0

Supermemory vs. Zep

CrewAI vs. LangGraph

LangChain vs. LlamaIndex

Whisper vs. Deepgram

Deepgram vs. AssemblyAI

Textract vs. Google Document AI

Docling vs. Marker

LlamaParse vs. Reducto

LlamaParse vs. Unstructured

Firecrawl vs. Apify

Firecrawl vs. Jina

LangMem vs. Mem0

Mem0 vs. Supermemory

Zep vs. Letta

Mem0 vs. Letta

pgvector vs. Pinecone

Mem0 vs. Zep

Milvus vs. Pinecone

Chroma vs. Qdrant

Weaviate vs. Qdrant

Pinecone vs. Qdrant

Pinecone vs. Chroma

Pinecone vs. Weaviate

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.