graphiti

getzep/graphiti

Build Real-Time Knowledge Graphs for AI Agents

28k
Stars
2.9k
Forks
413
Open issues
161
Watchers
Python Apache-2.0Last pushed Jul 6, 2026

Overview

Graphiti is a framework for building and querying temporal context graphs for AI agents. These dynamic knowledge graphs track how facts change over time, maintain provenance to source data, and support both prescribed and learned ontology, making them purpose-built for agents operating on evolving real-world data.

Categories

Tags

Similar tools

Install

pip install graphiti

README

Zep Logo

Graphiti

Build Temporal Context Graphs for AI Agents

getzep%2Fgraphiti | Trendshift

[!NOTE] We're Hiring! Build context graphs that power reliable, personalized, fast production AI agents. Come build with us — we're hiring Engineers and Developer Relations folks. View open roles.

Help us reach more developers and grow the Graphiti community. Star this repo!

 

[!TIP] Check out the new MCP server for Graphiti! Give Claude, Cursor, and other MCP clients powerful context graph-based memory with temporal awareness.

Graphiti is a framework for building and querying temporal context graphs for AI agents. Unlike static knowledge graphs, Graphiti's context graphs track how facts change over time, maintain provenance to source data, and support both prescribed and learned ontology — making them purpose-built for agents operating on evolving, real-world data.

Unlike traditional retrieval-augmented generation (RAG) methods, Graphiti continuously integrates user interactions, structured and unstructured enterprise data, and external information into a coherent, queryable graph. The framework supports incremental data updates, efficient retrieval, and precise historical queries without requiring complete graph recomputation, making it suitable for developing interactive, context-aware AI applications.

Use Graphiti to:

  • Build context graphs that evolve with every interaction — tracking what's true now and what was true before.
  • Give agents rich, structured context instead of flat document chunks or raw chat history.
  • Query across time, meaning, and relationships with hybrid retrieval (semantic + keyword + graph traversal).

 

 

What is a Context Graph?

A context graph is a temporal graph of entities, relationships, and facts — like "Kendra loves Adidas shoes (as of March 2026)." Unlike traditional knowledge graphs, each fact in a context graph has a validity window: when it became true, and when (if ever) it was superseded. Entities evolve over time with updated summaries. Everything traces back to episodes — the raw data that produced it.

What makes Graphiti unique is its ability to autonomously build context graphs from unstructured and structured data, handling changing relationships while preserving full temporal history.

A context graph contains:

ComponentWhat it stores
Entities (nodes)People, products, policies, concepts — with summaries that evolve over time
Facts / Relationships (edges)Triplets (Entity → Relationship → Entity) with temporal validity windows
Episodes (provenance)Raw data as ingested — the ground truth stream. Every derived fact traces back here
Custom Types (ontology)Developer-defined entity and edge types via Pydantic models

Graphiti and Zep

Graphiti is the open-source temporal context graph engine at the core of Zep's context infrastructure for AI agents. Zep manages context graphs at scale, providing governed, low-latency context retrieval and assembly for production agent deployments.

Using Graphiti, we've demonstrated Zep is the State of the Art in Agent Memory.

Read our paper: [Zep: A Temporal Knowl