Graphiti is an open-source temporal knowledge graph engine designed specifically for building dynamic, persistent memory for AI agents, while Zep is a managed enterprise platform built on top of Graphiti. Graphiti addresses the limitation of traditional RAG and static knowledge graphs by continuously tracking entities, relationships, and facts as they change over time, automatically invalidating stale facts while preserving historical context.
graph LR
Message[New Interaction / Fact] --> Ingest[Graphiti Ingestion Pipeline]
Ingest --> EntityExtractor[Entity & Relation Extractor]
EntityExtractor --> TemporalGraph[(Temporal Knowledge Graph<br/>Entities + Directed Edges + Timestamps)]
TemporalGraph --> Invalidation[Edge Invalidation & Versioning]
TemporalGraph --> RetrievalEngine[Hybrid Retrieval Engine<br/>Vector + BM25 + Graph Traversal]
RetrievalEngine --> Agent[AI Agent]
valid_at, invalid_at, and timestamp metadata. When a user changes their preference (e.g. "I switched from Python to Rust"), Graphiti marks the prior edge invalid without deleting the historical fact.import asyncio
from graphiti_core import Graphiti
from graphiti_core.nodes import EntityNode
async def main():
# Initialize Graphiti connected to a graph database
graphiti = Graphiti("neo4j://localhost:7687", auth=("neo4j", "password"))
# Ingest conversational episode
await graphiti.add_episode(
name="Meeting with Bob",
episode_body="Bob announced that Project Titan is moving from AWS to GCP starting in September.",
source_description="Slack conversation"
)
# Search the temporal graph
results = await graphiti.search("Where is Project Titan hosted?")
for edge in results:
print(f"{edge.source.name} -> {edge.name} -> {edge.target.name} (Valid: {edge.valid_at})")
if __name__ == "__main__":
asyncio.run(main())
Graphiti and Zep natively integrate with popular agent orchestration frameworks: