Migration guide

Migrating from Mem0 to Cognee

Cognee ships a Mem0 import adapter. This guide covers when a move makes sense, how to export from Mem0, and the one call that loads those memories into a Cognee knowledge graph.

Based on public information as of September 2026. See each vendor's site for current details.

Mem0 is a good fit for per-user personalization in a chat product: it extracts facts about a user from conversation, stores them per user_id, and returns them on the next turn with very little to operate. If that is your whole requirement, migrating buys you a graph you do not need and an ingestion pipeline that costs LLM tokens. Move when the shape of the problem changes, not because a list told you to.

Disclosure: Cognee is our product. Claims about Mem0 are based on its public documentation as of September 2026.

Why teams migrate from Mem0

Migration steps

Mode choice is the main decision. re-derive (default) throws away Mem0's extracted facts and rebuilds the graph from the raw memory text with Cognee's pipeline, which costs LLM tokens and produces the richest graph. preserve keeps Mem0's facts as-is with no LLM calls, which is fast and cheap but flat. hybrid does both. Start with preserve on a sample to check the shape, then re-derive the full set.

The import adapters live in cognee.migration and are documented at docs.cognee.ai. If your export does not match the shape the adapter expects, open an issue on GitHub with a redacted sample.

Frequently asked questions

Does the Mem0 import need the Mem0 platform to stay online?

No. The adapter reads a JSON file or an in-memory list you already exported. Once the import completes, Cognee has its own copy in your storage backends.

Will my Mem0 user_id scoping survive the move?

Memories keep their metadata as data items. For hard isolation between users or tenants, enable Cognee's backend access control and import each user into their own dataset, which gives each one separate storage.

Can I migrate back, or to another system, later?

Yes. cognee.export writes a dataset to the open COGX archive format or to GraphML, so memory is never locked into Cognee's storage.

How long does the import take?

preserve mode is limited by database writes and finishes in seconds to minutes. re-derive and hybrid run LLM extraction over every record; budget time and tokens roughly in proportion to the total text volume, and use dry_run=True on cognee.remember for an estimate.