Migration guide
Migrating from Zep to Cognee
Zep and Cognee both store memory as a graph, which makes this the most lossless migration Cognee supports. The ZepSource adapter reads Zep's graph export and, in hybrid mode, keeps the entities and facts Zep already extracted.
Based on public information as of September 2026. See each vendor's site for current details.
Zep's temporal knowledge graph tracks when each fact became true and when it stopped being true, and its managed service handles that for you. If your agents' memory is fundamentally a timeline of conversations and you are happy with a hosted service, Zep does that job well and Cognee's temporal support is less specialised. Migrate when you need memory built from sources other than conversation, want the full stack open source and self-hosted, or need many agents sharing one graph.
Disclosure: Cognee is our product. Claims about Zep are based on its public documentation as of September 2026.
Why teams migrate from Zep
Zep's graph is built from chat sessions and JSON you add to it. Cognee's ECL pipeline ingests files, databases, web pages, and code alongside conversations, so the same graph holds the knowledge your agents need as well as what users said.
Cognee's full feature set is in the Apache-2.0 core, runs embedded by default, and moves to PostgreSQL, Neo4j, or Amazon Neptune for production. Zep's graph engine (Graphiti) is open source, but the managed platform features are not.
Cognee's backend access control provisions separate storage per user or tenant and supports many agents reading and writing shared datasets with permissions, which matters once memory becomes organisational rather than per-session.
Migration steps
Use Zep's graph API to pull the nodes, edges, and episodes for each user or group graph you want to keep and save them as JSON. The Cognee adapter expects the shape Zep's graph endpoints return (nodes, edges, episodes), and accepts a single dict or a file path.
Python import jsonfrom zep_cloud.client import Zepclient = Zep(api_key="...")graph_id = "alice"export = {"nodes": client.graph.node.get_by_user_id(graph_id),"edges": client.graph.edge.get_by_user_id(graph_id),"episodes": client.graph.episode.get_by_user_id(graph_id),}with open("zep_graph_export.json", "w") as f:json.dump(export, f, default=str)pip install cognee, set LLM_API_KEY, and optionally configure production storage through environment variables. The embedded defaults are enough to test the import.
Shell pip install cogneeexport LLM_API_KEY="..."hybrid is the default for Zep exports: Cognee maps Zep's entity and fact nodes straight into its graph (no LLM calls) and also runs its own extraction over the episodes, so nothing Zep knew is lost and the graph gains Cognee's structure on top.
Python import asyncioimport cogneefrom cognee.migration import ZepSourceasync def main():await cognee.remember(ZepSource("zep_graph_export.json", mode="hybrid"),dataset_name="alice_memory",)asyncio.run(main())TEMPORAL search answers time-scoped questions; GRAPH_COMPLETION answers relational ones. Compare a handful of answers against what Zep returned before you cut over.
Python from cognee import SearchTypeawait cognee.search("What was Alice's role before she moved teams?",query_type=SearchType.TEMPORAL,datasets=["alice_memory"],)Swap Zep's memory.add and graph.search calls for cognee.remember and cognee.recall in Python, or use the TypeScript client and the Cognee MCP server for Claude Code, Cursor, and other MCP clients. Run both systems side by side until the answers agree.
Because Zep already extracted entities and facts, preserve mode gives you a faithful copy with zero LLM cost, hybrid (the default for ZepSource) adds Cognee's own extraction on top, and re-derive discards Zep's graph and rebuilds from the episodes only. Use preserve to validate the export shape, then hybrid for the real import.
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 Cognee keep Zep's valid_at and invalid_at timestamps?
Facts are imported with their metadata and the TEMPORAL search type reasons over time. Cognee's temporal model is not identical to Zep's bi-temporal edges, so verify time-scoped queries during the parallel run.
I self-host Graphiti rather than using Zep Cloud. Does this apply?
Yes. Graphiti exports have the same shape, and Cognee ships a GraphitiSource alias for them. See the Graphiti migration guide.
Can I export from Cognee later?
Yes. cognee.export writes any dataset to the open COGX archive format or GraphML, so the move is reversible.
What does the import cost?
preserve is free of LLM calls. hybrid and re-derive run extraction over the episodes; use dry_run=True on cognee.remember for a token estimate before the full run.