---
title: "Mem0 vs Cognee: Extracted Facts or a Knowledge Graph"
description: "Mem0 vs Cognee compared: extracted per-user facts against knowledge graph construction. Search modes, pricing, deployment, and Cognee vs Graphiti."
canonical: https://past.dev/blog/mem0-vs-cognee
date: 2026-09-03
category: Research
authors: The past.dev team
---
# Mem0 vs Cognee: Extracted Facts or a Knowledge Graph

Mem0 vs Cognee is a choice between two shapes of stored memory. Mem0 extracts discrete facts from conversations with an LLM and serves them back as ranked strings scoped to a user, agent, or session. Cognee ingests documents, code, and application data, builds a knowledge graph of entities and relationships with embeddings alongside, and answers queries over that graph. Choose mem0 to personalize an assistant per user. Choose cognee when the memory should be a queryable graph of everything you loaded.

## Mem0 vs Cognee at a glance

| Dimension | Mem0 | Cognee | past.dev |
| --- | --- | --- | --- |
| What is stored | Fact strings an LLM extracts from messages ([docs](https://docs.mem0.ai/core-concepts/memory-operations)) | A knowledge graph of entities and relationships built from ingested data, plus embeddings ([docs](https://docs.cognee.ai/getting-started/introduction)) | Raw text with its original timestamp; derived facts with validity windows and supersession links |
| Temporal handling | created_at and updated_at; custom timestamps on add ([docs](https://docs.mem0.ai/platform/features/timestamp)) | TEMPORAL search extracts time constraints ([docs](https://docs.cognee.ai/python-api/search-type)); bi-temporal memory listed on Enterprise ([pricing](https://www.cognee.ai/pricing)) | Event time from the source timestamp, validity windows, supersession links |
| Entity and identity | Scoped by the user_id, agent_id, or run_id you pass ([docs](https://docs.mem0.ai/core-concepts/memory-operations)) | Entities become graph nodes with relationships during cognify ([docs](https://docs.cognee.ai/getting-started/introduction)) | Entity resolution at ingestion links references across email, transcripts, tickets, chat |
| Retrieval | search() returns ranked memory strings with scores, timestamps, metadata ([docs](https://docs.mem0.ai/platform/quickstart)) | Mode-dependent: LLM completions, raw chunks, or direct Cypher ([docs](https://docs.cognee.ai/python-api/search-type)) | Recall returns ranked, dated evidence with sources and one of four status values; audience-scoped |
| Deployment | Apache-2.0 library, self-hosted server, or managed platform ([repo](https://github.com/mem0ai/mem0)) | Apache-2.0 core, or Cognee Cloud managed ([repo](https://github.com/topoteretes/cognee), [cloud](https://docs.cognee.ai/cognee-cloud/overview)) | Managed, or self-hosted in your own Postgres with the same API |
| Pricing | Free tier, then $19, $249, custom ([pricing](https://mem0.ai/pricing)) | Free cloud tier, $2.50 per 1M tokens on Standard, Enterprise BYOC ([pricing](https://www.cognee.ai/pricing)) | See the [quickstart](/docs/memory-api/quickstart) |

## How each one builds memory

Mem0's add call sends messages through an LLM that pulls out the facts worth keeping ([memory operations](https://docs.mem0.ai/core-concepts/memory-operations)). A second step retrieves existing memories in the same scope and has one LLM call decide per fact whether to add, update, or delete a record ([memory types](https://docs.mem0.ai/core-concepts/memory-types)). Everything is keyed to the identifiers you pass: user_id, agent_id, run_id. The output is a set of short fact records per scope.

Cognee runs a heavier pipeline before anything becomes recallable. In its lower-level API, add ingests text, files, or structured data; cognify transforms the raw data into a structured knowledge graph; search queries it; memify enriches an existing graph ([python api](https://docs.cognee.ai/python-api)). The current release wraps these in four operations named remember, recall, improve, and forget, and the docs describe the built graph as entities and the relationships between them ([introduction](https://docs.cognee.ai/getting-started/introduction)). The project is Apache-2.0 and positions itself as an open-source AI memory platform for agents ([repo](https://github.com/topoteretes/cognee)).

## What a response contains

A mem0 search always returns the same shape: ranked records carrying an id, the memory string, a relevance score, scope identifiers, timestamps, and metadata ([quickstart](https://docs.mem0.ai/platform/quickstart)). Your code assembles the answer.

A cognee response depends on the search type. GRAPH_COMPLETION expands semantic seeds into graph context and returns an LLM completion. RAG_COMPLETION answers over retrieved chunks. CHUNKS returns raw text segments. CYPHER runs a direct query against the graph database. TEMPORAL extracts time constraints from the question and combines graph events with semantic retrieval. FEELING_LUCKY selects a search type automatically ([search types](https://docs.cognee.ai/python-api/search-type)). One product hands you memory records to compose; the other will often hand you a finished answer grounded in its graph.

## Temporal handling

Mem0 timestamps each record with created_at and updated_at ([quickstart](https://docs.mem0.ai/platform/quickstart)), accepts a custom timestamp on add for backfilled history ([timestamps](https://docs.mem0.ai/platform/features/timestamp)), and supports expiration dates ([memory operations](https://docs.mem0.ai/core-concepts/memory-operations)). Updates rewrite or delete records; the documented model has no validity windows and no supersession trail.

Cognee documents the TEMPORAL search type described above, and its pricing page lists bi-temporal memory and provenance under the Enterprise engagement ([pricing](https://www.cognee.ai/pricing)). The core docs describe no validity windows on individual facts as of September 2026. If your queries include dates, test both against [facts that change over time](/guides/facts-that-change-over-time).

## Deployment and pricing

Mem0 is an Apache-2.0 repository usable as a library, a self-hosted server, or the managed platform ([repo](https://github.com/mem0ai/mem0)). Platform tiers as of September 2026: free Hobby with 10,000 add and 1,000 retrieval requests per month, Starter at $19 per month, Pro at $249 per month, custom Enterprise ([pricing](https://mem0.ai/pricing)).

Cognee's core is Apache-2.0 and runs locally for free ([repo](https://github.com/topoteretes/cognee)). Cognee Cloud hosts the pipelines and UI on managed Postgres, LanceDB, and Kuzu ([cloud overview](https://docs.cognee.ai/cognee-cloud/overview)). Cloud pricing as of September 2026: a free tier with 1M tokens included, Standard at $2.50 per 1M processed tokens plus $5 per additional workspace, and Enterprise delivered as a deployment in your own cloud ([pricing](https://www.cognee.ai/pricing)). The meters differ: mem0 counts API requests while cognee counts processed tokens, so convert your own volume before comparing bills.

## Cognee vs Graphiti

Both are Apache-2.0 open-source engines that build knowledge graphs from unstructured input. Graphiti, maintained by Zep, describes itself as a framework for building and querying temporal context graphs for agents, and as the open-source core of Zep's context infrastructure ([repo](https://github.com/getzep/graphiti)). Its docs lead with explicit bi-temporal tracking, temporal edge invalidation when new information contradicts old, ingestion as discrete episodes with provenance, and hybrid retrieval that fuses vector similarity, BM25, and graph traversal without an LLM in the reranking loop ([overview](https://help.getzep.com/graphiti/getting-started/overview)). Cognee is the platform around its graph: ontology generation ([repo](https://github.com/topoteretes/cognee)), the search modes listed above ([search types](https://docs.cognee.ai/python-api/search-type)), an improve step ([python api](https://docs.cognee.ai/python-api)), and a managed cloud ([cloud](https://docs.cognee.ai/cognee-cloud/overview)). Embed Graphiti when you want a [temporal knowledge graph](/glossary/temporal-knowledge-graph) engine inside a system you build. Run cognee when you want the pipeline, storage, and hosting handled as a product.

## Benchmarks the vendors publish

Mem0 self-publishes BEAM results of 64.1% at the 1M scale and 48.6% at 10M ([mem0 blog](https://mem0.ai/blog/ai-memory-benchmarks-in-2026)). We found no self-published BEAM or LoCoMo figures from cognee as of September 2026, so no cognee numbers appear here. On BEAM's complete splits, past.dev reports 91.50% at 100K events, 86.18% at 1M, and 82.61% at 10M ([benchmarks](/benchmarks)). These are the same benchmark, run and reported separately by each vendor.

## How to decide

Run the five tests from [choosing a memory system](/guides/choose-memory-system) before committing.

1. Change a fact, then request the old and the new value with dates. Mem0 rewrites or deletes the record ([memory types](https://docs.mem0.ai/core-concepts/memory-types)); on cognee, check which search mode surfaces the change and whether it carries a date.
2. Backfill a year of history with original timestamps. Mem0 accepts a custom timestamp on add ([timestamps](https://docs.mem0.ai/platform/features/timestamp)); on cognee, test TEMPORAL search against the backfilled events.
3. Send one person under three identifiers. Mem0 keeps scopes separate by identifier; cognee's entity nodes come from content; verify merging against [entity resolution](/guides/entity-resolution).
4. Ask for something the stored data cannot answer. Completion modes return fluent prose, so read closely for invented support.
5. Price your own volume: API requests on mem0 ([pricing](https://mem0.ai/pricing)), processed tokens on cognee ([pricing](https://www.cognee.ai/pricing)).

## Where past.dev sits in this comparison

past.dev stores raw text with its original timestamp and derives facts that carry event time, validity windows, and supersession links. POST /api/v1/recall returns ranked, dated evidence with sources and one of four status values: Supported, Conflicted, NoKnownSupport, or UnknownBecauseDegraded. Entity resolution at ingestion links references to one person across email, transcripts, tickets, and chat, and recall is audience-scoped. It runs managed or self-hosted in your own Postgres via docker compose with pinned images and the same API; data export is supported; certifications held are SOC 2 Type II, ISO 27001, and ISO 27701. On BEAM's complete splits past.dev reports 91.50% at 100K events, 86.18% at 1M, and 82.61% at 10M, plus 88.7% on LoCoMo with corrected keys ([benchmarks](/benchmarks)). The [quickstart](/docs/memory-api/quickstart) covers ingest and recall.

Each alternative keeps its lane. Cognee fits a self-hosted, open-source graph over documents and code with flexible query modes. Graphiti fits as an embeddable temporal graph engine. Mem0 fits per-user conversational personalization behind a small API. past.dev fits when answers must arrive dated, sourced, and labeled whenever support is missing.

For the deeper design comparisons, see [past.dev vs mem0](/vs/mem0), [past.dev and cognee](/compare/cognee), and [past.dev vs Zep](/vs/zep).
