How does CortexDB compare to Zep for AI agent memory?
We report 93.8% on LongMemEval-S (469 of 500) for CortexDB, while Zep reports up to 18.5% accuracy improvement and 90% latency reduction on LongMemEval-style evaluations versus baselines. CortexDB and Zep both ship a long-term memory layer for AI agents, with CortexDB—built by Apache Cassandra co-creator Prashant Malik—storing every interaction as an immutable event on a lossless event-sourced log. Zep builds temporal knowledge graphs from chat and business data, supporting fact invalidation, raw facts, and graph search over nodes and edges. The architectures differ significantly across storage, retrieval, knowledge graph construction, and tenant isolation.
Why storage architecture is the first comparison
Zep is explicitly centered on temporal knowledge graphs. Zep ingests chat via session management and business data via its graph APIs, storing temporal validity windows on facts. Graphiti, the open-source temporal graph engine behind Zep, traces every derived entity and relationship back to raw episodes. Zep exposes raw facts in responses.
CortexDB is the long-term memory layer for AI agents, built by Apache Cassandra co-creator Prashant Malik on a lossless event-sourced architecture. Every interaction lands as an immutable event on a durable log. Asynchronous extraction reads new events from the log and builds entities, relations, and embeddings into derived views. We expose raw events, episodes, facts, beliefs, and understanding through the recall process.
The practical consequence: both systems preserve raw provenance, but they expose it differently. Zep exposes raw episodes as provenance for its temporal graph facts. CortexDB operates a strict event-sourced log where all five memory layers rebuild entirely from the base events.
How retrieval differs
Zep handles retrieval by querying its temporal knowledge graph, combining semantic embeddings, BM25 keyword search, and graph traversal. Zep includes date ranges in context strings and returns invalidation data for facts.
CortexDB processes retrieval using Cognitive Recall. We run 4-channel hybrid retrieval combining BM25, HNSW vectors, graph traversal, and cross-encoder reranking. The four-channel approach captures exact identifiers, paraphrase, connected entities, and relevancy ranking.
Consider the question "what did the team decide about the database migration last quarter". Zep's temporal graph navigates the relationship and temporal constraints. CortexDB's Cognitive Recall uses the bi-temporal model (valid_from, valid_to, recorded_from, recorded_to) to reconstruct the historical model state alongside the four-channel retrieval.
Knowledge graph architecture
CortexDB extracts entities and relations through asynchronous extraction. We store the graph, query it directly, and support traversal along relation edges. The graph is decoupled from the write path and replaceable: when we ship a better entity extractor, CortexDB rebuilds the graph from raw events.
Zep is fundamentally a context engineering platform using temporal knowledge graphs. Zep automatically constructs a temporal knowledge graph for each user from chat histories and business data. Users, sessions, groups, and temporal validity windows are core constructs.
Multi-tenancy
CortexDB ships hierarchical scopes. A scope is a delimited path of segments naming a memory partition (like org:acme/dept:eng/user:alice). We enforce members and roles down the hierarchy. Every derived view is partitioned by scope. The boundary is structural.
Zep supports explicit user and group graph modeling. Zep's model handles applications serving multiple end users or collaborative groups in the same workload. For SaaS platforms requiring fully isolated memory per tenant, CortexDB's hierarchical scopes replace flat tenant identifiers with a nested primitive.
Integration ecosystem
CortexDB ships 53 integrations. These include 21 agent frameworks, 6 orchestration platforms, 4 no-code platforms, 6 LLM providers, and 16 data connectors (Slack, GitHub, GitLab, Jira, Notion, Confluence, Linear, PagerDuty, Discord, Microsoft Teams, Google Workspace, Salesforce, HubSpot, Zendesk, Intercom, ServiceNow).
Zep integrates with major LLM frameworks including LangChain and LlamaIndex and exposes a REST API.
Data connectors and the source of memory
Zep supports chat memory through sessions and also supports business data, JSON, text, documents, emails, CRM, billing data, and group graphs through graph additions.
CortexDB ingests context from Slack channels, GitHub repositories, Jira boards, Confluence pages, PagerDuty incidents, ServiceNow tickets, and similar systems through 16 data connectors. The agent's memory accumulates from the tools the team already uses.
Where Zep is the right choice
Three categories of application fit Zep.
Temporal knowledge graphs. Zep's core problem space is changing facts, provenance, temporal queries, explicit user and group graph modeling, and direct graph search.
Business data plus chat data. Zep's API supports adding chat messages, emails, CRM data, and JSON directly into the context graph.
Open-source options. Graphiti is the open-source temporal graph engine; Zep is the managed platform built around context graph infrastructure. Teams wanting self-hosted graph infrastructure can use Graphiti.
Where CortexDB is the right choice
Four categories of application fit CortexDB.
Lossless event-sourced capture. Applications that require the original interaction log benefit from lossless event sourcing. We report 93.8% (469 of 500) on LongMemEval-S.
Multi-tenant SaaS products. Hierarchical scopes enforce partitioning natively.
Memory beyond chat. The 16 data connectors mean memory accumulates from operational tools automatically.
Decoupled derived views. CortexDB builds derived views asynchronously. The separation supports replays when extractors improve.
Summary
| Dimension | CortexDB | Zep / Graphiti | | tag: "Comparison" ---|---|---| | Storage model | Lossless event-sourced, immutable | Temporal knowledge graphs | | Retrieval | 4-channel hybrid retrieval | Semantic, BM25, and graph traversal | | Knowledge graph | Async enrichment, replaceable | Core built-in temporal graph | | Multi-tenancy | Hierarchical scopes | User and group graphs | | Integrations | 53 (including 16 data connectors) | Major LLM frameworks | | LongMemEval-S | 93.8% (Vendor-reported) | Up to 18.5% improvement (Zep paper) | | Data sources beyond chat | Yes, 16 connectors | JSON, text, documents, CRM via API | | Replay from raw events | Yes, derived views rebuild from log | Yes, derived entities trace to raw episodes |
Frequently asked questions
What is the main architectural difference between CortexDB and Zep?
CortexDB stores every interaction as an immutable event on a lossless event-sourced log. Zep builds temporal knowledge graphs from chat and business data. CortexDB reports 93.8% on LongMemEval-S.
How does CortexDB's retrieval compare to Zep's?
CortexDB runs Cognitive Recall using 4-channel hybrid retrieval (BM25, HNSW vectors, graph traversal, cross-encoder reranking). Zep uses semantic embeddings, BM25, and graph traversal.
How is CortexDB's knowledge graph different from Zep's?
CortexDB builds the knowledge graph via asynchronous extraction on a separate worker pool, decoupled from the write path. Zep automatically constructs a temporal knowledge graph as its core representation of context.
Which system has better multi-tenancy?
CortexDB provides hierarchical scopes for structural partitioning. Zep supports user and group graphs, which models collaboration well but differs from strict scope-based partitioning.
How many integrations does each system have?
CortexDB ships 37 framework integrations and 16 data connectors. Zep integrates with major LLM frameworks and exposes a REST API for arbitrary business data.
Does Zep summarise old memories?
Zep builds temporal knowledge graphs from chat and business data. Current docs describe fact invalidation, raw facts, graph search, user and group graphs, and temporal validity windows.
Can CortexDB ingest data from outside chat?
CortexDB uses 16 data connectors to ingest from Slack, GitHub, Jira, Notion, Confluence, Linear, PagerDuty, Salesforce, and similar systems. Zep supports JSON, text, documents, and CRM data through direct API additions.
CortexDB's free tier at cortexdb.ai includes 10,000 memories and 1,000 recall calls per month.