getzep/graphiti

Build Real-Time Knowledge Graphs for AI Agents

What it solves

Graphiti addresses the limitations of static knowledge graphs and traditional RAG (Retrieval-Augmented Generation), which often struggle with frequently changing data. It allows AI agents to maintain a "context graph" that tracks how facts evolve over time, ensuring that agents can distinguish between what is currently true and what was true in the past without needing to recompute the entire graph when new data arrives.

How it works

Graphiti builds a temporal knowledge graph from structured and unstructured data. It uses "episodes" (raw source data) as the ground truth, from which it derives entities and relationships. Each fact is assigned a validity window (start and end time), meaning old facts are invalidated rather than deleted when new information contradicts them. The framework supports both prescribed ontologies (defined via Pydantic models) and learned ontologies (emerging from data). Retrieval is handled through a hybrid approach combining semantic embeddings, keyword search (BM25), and graph traversal.

Who it’s for

It is designed for developers building interactive, context-aware AI agents that operate on evolving, real-world enterprise data or user interactions where historical accuracy and provenance are critical.

Highlights

  • Temporal Fact Management: Tracks the validity of facts over time, preserving historical context.
  • Provenance: Every derived fact traces back to the specific "episode" of raw data that produced it.
  • Incremental Updates: Integrates new data in real-time without requiring batch re-processing.
  • Hybrid Retrieval: Combines semantic, keyword, and graph-based search for high-precision, low-latency queries.
  • Pluggable Backends: Supports multiple graph databases including Neo4j, FalkorDB, and Amazon Neptune.

Related

  • Project
  • Project
  • Project
  • Project
  • Project