Elamur Research⌕
☰
home / papers / 2025 / Zep: A Temporal Knowledge Graph Architecture for Agent Memory

Zep: A Temporal Knowledge Graph Architecture for Agent Memory

Paper · 2025 · Preston Rasmussen, Pavlo Paliychuk, Travis Beauvais et al.

Summary

LLM-based chat agents need memory that keeps pace with changing information, such as ongoing dialogues and business records. Typical RAG pipelines assume a mostly fixed document collection, so they handle this poorly. The authors, from Zep AI, present Zep, a production memory service built around Graphiti, a knowledge graph engine that tracks time. Incoming data (messages, plain text or JSON) is kept as raw episodes. An LLM then extracts entities and relationship facts, merges duplicates with existing graph content and groups related entities into summarized communities. Every fact carries validity information on two timelines: when it was true in the world and when the system recorded it. A newer contradicting fact therefore closes an older edge instead of erasing it. On MemGPT's Deep Memory Retrieval (DMR) benchmark, Zep slightly outperforms MemGPT. On the harder LongMemEval, it improves accuracy by up to 18.5% and cuts latency by roughly 90% versus baselines. The work shows that time-aware graph memory can be both more accurate and faster for long-running, multi-session agents.

Key points

  • DMR: Zep reaches 94.8% accuracy against MemGPT's 93.4%.
  • LongMemEval: Zep gains up to 18.5% in accuracy with about 90% lower response latency. The largest gains are in synthesizing information across sessions and keeping long-term context.
  • Graph structure: The graph is organized in three tiers, holding episodes, semantic entities and communities as separate subgraphs. The episodic/semantic split draws on AriGraph, and the community layer draws on GraphRAG.
  • Bi-temporal model with four timestamps:
    • t′created and t′expired record when the system ingested or retired a fact (timeline T′).
    • t_valid and t_invalid record when the fact actually held (timeline T).
    • An LLM detects contradictions, and the system always gives priority to newer information.
  • Implementation details:
    • Entity extraction looks at the current message plus the 4 previous ones and adds a reflexion-inspired self-check.
    • Entity names are embedded as 1024-dimensional vectors and combined with full-text search for resolution.
    • Writes to the graph use predefined Cypher queries.
    • Communities are built with label propagation rather than Leiden, because it supports incremental updates.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

Cite

Cite as Preston Rasmussen, Pavlo Paliychuk, Travis Beauvais, Jack Ryan and Daniel Chalef. 2025. Zep: A Temporal Knowledge Graph Architecture for Agent Memory. arXiv:2501.13956.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2501.13956 · arXiv 2501.13956

@misc{rasmussen2025zep,
  title = {{Zep: A Temporal Knowledge Graph Architecture for Agent Memory}},
  author = {Preston Rasmussen, Pavlo Paliychuk, Travis Beauvais, Jack Ryan and Daniel Chalef},
  year = {2025},
  doi = {10.48550/arxiv.2501.13956},
  eprint = {2501.13956},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2501.13956}
}

References

28 references, 5 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need, 2023. find
  2. K. Sparck Jones. A statistical interpretation of term specificity and its application in retrieval. Journal of Documentation, 28(1):11–21, 1972. find
  3. Charles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G. Patil, Ion Stoica, and Joseph E. Gonzalez. Memgpt: Towards llms as operating systems, 2024. find
  4. Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, and Jonathan Larson. From local to global: A graph rag approach to query-focused summarization, 2024. find
  5. Zep. Zep: Long-term memory for ai agents. https://www.getzep.com, 2024. Commercial memory layer for AI applications. ↗
  6. Zep. Graphiti: Temporal knowledge graphs for agentic applications. https://github.com/getzep/graphiti, 2024. Graphiti builds dynamic, temporally aware Knowledge Graphs that represent complex, evolving relationships between entities over time. ↗
  7. Di Wu, Hongwei Wang, Wenhao Yu, Yuwei Zhang, Kai-Wei Chang, and Dong Yu. Longmemeval: Benchmarking chat assistants on long-term interactive memory, 2024.
  8. Wong Gonzalez and Daniela. The relationship between semantic and episodic memory: Exploring the effect of semantic neighbourhood density on episodic memory. PhD thesis, University of Winsor, 2018. find
  9. Petr Anokhin, Nikita Semenov, Artyom Sorokin, Dmitry Evseev, Mikhail Burtsev, and Evgeny Burnaev. Arigraph: Learning knowledge graph world models with episodic memory for llm agents, 2024. find
  10. Xinyue Chen, Pengyu Gao, Jiangjiang Song, and Xiaoyang Tan. Hiqa: A hierarchical contextual augmentation rag for multi-documents qa, 2024. find
  11. Krish Goel and Mahek Chandak. Hiro: Hierarchical information retrieval optimization, 2024. find
  12. Noah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: Language agents with verbal reinforcement learning, 2023.
  13. Xiaojin Zhu and Zoubin Ghahramani. Learning from labeled and unlabeled data with label propagation. 2002. find
  14. V. A. Traag, L. Waltman, and N. J. van Eck. From louvain to leiden: guaranteeing well-connected communities. Sci Rep 9, 5233, 2019. find
  15. Neo4j. Neo4j - the world’s leading graph database, 2012. find
  16. Apache Software Foundation. Apache lucene - scoring, 2011. letzter Zugriff: 20. Oktober 2011. find
  17. Zirui Guo, Lianghao Xia, Yanhua Yu, Tu Ao, and Chao Huang. Lightrag: Simple and fast retrieval-augmented generation, 2024.
  18. Jimmy Lin, Ronak Pradeep, Tommaso Teofili, and Jasper Xian. Vector search with openai embeddings: Lucene is all you need, 2023. find
  19. Prafulla Kumar Choubey, Xin Su, Man Luo, Xiangyu Peng, Caiming Xiong, Tiep Le, Shachar Rosenman, Vasudev Lal, Phil Mui, Ricky Ho, Phillip Howard, and Chien-Sheng Wu. Distill-synthkg: Distilling knowledge graph synthesis workflow for improved coverage and efficiency, 2024. find
  20. Gordon V. Cormack, Charles L. A. Clarke, and Stefan Buettcher. Reciprocal rank fusion outperforms condorcet and individual rank learning methods. In Proceedings of the 32nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’09, pages 758–759. ACM, 2009.
  21. Jaime Carbonell and Jade Goldstein. The use of mmr, diversity-based reranking for reordering documents and producing summaries. In Proceedings of the 21st Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’98, page 335–336, New York, NY, USA, 1998.… find
  22. Jing Xu, Arthur Szlam, and Jason Weston. Beyond goldfish memory: Long-term open-domain conversation, 2021. find
  23. Chaofan Li, Zheng Liu, Shitao Xiao, and Yingxia Shao. Making large language models a better foundation for dense retrieval, 2023. find
  24. Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. Bge m3-embedding: Multilingual, multi-functionality, multi-granularity text embeddings through self-knowledge distillation, 2024. find
  25. Shreyas Pimpalgaonkar, Nolan Tremelling, and Owen Colegrove. Triplex: a sota llm for knowledge graph construction, 2024. find
  26. Shilong Li, Yancheng He, Hangyu Guo, Xingyuan Bu, Ge Bai, Jie Liu, Jiaheng Liu, Xingwei Qu, Yangguang Li, Wanli Ouyang, Wenbo Su, and Bo Zheng. Graphreader: Building graph-based agent to enhance long-context abilities of large language models, 2024. find
  27. Pranab Islam, Anand Kannappan, Douwe Kiela, Rebecca Qian, Nino Scherrer, and Bertie Vidgen. Financebench: A new benchmark for financial question answering, 2023. find
  28. Nandan Thakur, Nils Reimers, Andreas Rücklé, Abhishek Srivastava, and Iryna Gurevych. Beir: A heterogenous benchmark for zero-shot evaluation of information retrieval models, 2021.

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/rasmussen-2025-zep-temporal-knowledge-graph-architecture/