Graph Overview
Zep’s temporal knowledge graph supports agent memory and Graph RAG. The Context Graph Engine uses Graphiti, Zep’s open-source temporal graph library.
You do not need to interact with Graphiti when you use Zep.
A knowledge graph is a network of interconnected facts, such as “Kendra loves Adidas shoes.” Each fact is a “triplet” represented by two entities, or nodes (“Kendra”, “Adidas shoes”), and their relationship, or edge (“loves”).
Knowledge Graphs have been explored extensively for information retrieval. Zep autonomously builds temporal knowledge graphs, handling changing relationships and maintaining historical context.
Zep automatically constructs a temporal knowledge graph for each of your users. The knowledge graph contains entities, relationships, and facts related to your user, while automatically handling changing relationships and facts over time.
Here’s an example of how Zep might extract graph data from a chat message, and then update the graph once new information is available:

Each node and edge contains attributes. Zep stores each fact on an edge.
Edge timestamps record when a fact becomes valid or invalid.
Graph Data Structure
Zep’s graph database stores data in three main types:
- Entity edges (edges): Represent relationships between nodes and include semantic facts representing the relationship between the edge’s nodes.
- Entity nodes (nodes): Represent entities extracted from episodes, containing summaries of relevant information.
- Episodic nodes (episodes): Represent raw data stored in Zep, either through chat history or the
graph.addendpoint.
Working with the Graph
To learn more about interacting with Zep’s graph, refer to the following sections:
- How Graph Creation Works: How Zep turns episodes into entities, relationships, and facts in the graph.
- Documents: Group episodes of the same source the way threads group messages.
- Adding Data to the Graph: Learn how to add new data to the graph.
- Searching the Graph: Explore techniques for efficiently searching the graph.
These guides will help you use Zep’s knowledge graph in your applications.