Skip to main content
QUICK REVIEW

[Paper Review] Zep: A Temporal Knowledge Graph Architecture for Agent Memory

Preston Rasmussen, Pavlo Paliychuk|ArXiv.org|Jan 20, 2025
Graph Theory and AlgorithmsComputer Science4 citations
TL;DR

Zep introduces a memory layer for AI agents powered by a temporally-aware Graphiti knowledge graph, achieving state-of-the-art results on memory benchmarks and significantly reducing latency in LongMemEval. It fuses episodic and semantic memory with community summaries to handle dynamic, multi-source data.

ABSTRACT

We introduce Zep, a novel memory layer service for AI agents that outperforms the current state-of-the-art system, MemGPT, in the Deep Memory Retrieval (DMR) benchmark. Additionally, Zep excels in more comprehensive and challenging evaluations than DMR that better reflect real-world enterprise use cases. While existing retrieval-augmented generation (RAG) frameworks for large language model (LLM)-based agents are limited to static document retrieval, enterprise applications demand dynamic knowledge integration from diverse sources including ongoing conversations and business data. Zep addresses this fundamental limitation through its core component Graphiti -- a temporally-aware knowledge graph engine that dynamically synthesizes both unstructured conversational data and structured business data while maintaining historical relationships. In the DMR benchmark, which the MemGPT team established as their primary evaluation metric, Zep demonstrates superior performance (94.8% vs 93.4%). Beyond DMR, Zep's capabilities are further validated through the more challenging LongMemEval benchmark, which better reflects enterprise use cases through complex temporal reasoning tasks. In this evaluation, Zep achieves substantial results with accuracy improvements of up to 18.5% while simultaneously reducing response latency by 90% compared to baseline implementations. These results are particularly pronounced in enterprise-critical tasks such as cross-session information synthesis and long-term context maintenance, demonstrating Zep's effectiveness for deployment in real-world applications.

Motivation & Objective

  • Motivate the need for dynamic, memory-enabled agents that integrate conversations and business data beyond static corpora.
  • Propose a graph-based memory layer (Zep) built on Graphiti to support temporally-accurate, non-lossy memory representations.
  • Demonstrate improved retrieval accuracy and reduced latency on memory benchmarks relevant to enterprise use cases.

Proposed method

  • Introduce a three-tiered temporal knowledge graph: Episode subgraph (raw messages), Semantic entity subgraph (extracted entities/facts), and Community subgraph (high-level summaries).
  • Ingest episodes with bi-temporal timelines to enable both timeline T and transactional timeline T', maintaining non-lossy links for traceability.
  • Perform entity and fact extraction with embeddings, entity resolution, and temporal edge invalidation to manage evolving knowledge, including hyper-edges for multi-entity facts.
  • Construct communities via dynamic label propagation to enable scalable, up-to-date summaries and retrieval.
  • Implement a memory retrieval pipeline (search, rerank, constructor) that combines cosine, BM25, and BFS graph searches, with rerankers including RRF, MMR, and cross-encoder scoring.
  • Evaluate on DMR (MemGPT) and LongMemEval benchmarks, using gpt-4o-mini and gpt-4-turbo models to compare accuracy and latency.

Experimental results

Research questions

  • RQ1Can a temporally-aware knowledge graph memory layer improve retrieval accuracy for long-running conversations and enterprise data over static document RAG approaches?
  • RQ2How does Graphiti-based memory with episodic/semantic subgraphs and communities impact latency and scalability in real-world deployments?
  • RQ3What are the effects of temporal extraction and edge invalidation on maintaining accurate, up-to-date memory over time?

Key findings

  • Zep achieves 94.8% accuracy on DMR with gpt-4-turbo and 98.2% with gpt-4o-mini, surpassing MemGPT baselines.
  • On LongMemEval, Zep with gpt-4o-mini reaches 63.8% accuracy and 3.20 s latency (vs. 55.4% and 31.3 s for full-context); with gpt-4o, 71.2% accuracy and 2.58 s latency (vs. 60.2% and 28.9 s).
  • Zep reduces latency by about 90% compared to baseline approaches while achieving higher accuracy in complex question types.
  • Temporal reasoning and multi-session memory tasks see the largest gains, demonstrating Zep’s strength in enterprise-like scenarios.
  • The evaluation notes benchmark limitations and the need for more enterprise-relevant memory benchmarks that assess synthesis of conversation history with structured data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.