> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/getzep/graphiti/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to Graphiti

> Build real-time, temporally-aware knowledge graphs for AI agents

<img className="block dark:hidden" src="https://mintcdn.com/getzep-graphiti/xMjzb6MI8lalS8HB/images/hero-light.png?fit=max&auto=format&n=xMjzb6MI8lalS8HB&q=85&s=a421cf17485400a10f552597b28d0da3" alt="Graphiti Hero Light" width="2064" height="1104" data-path="images/hero-light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/getzep-graphiti/xMjzb6MI8lalS8HB/images/hero-dark.png?fit=max&auto=format&n=xMjzb6MI8lalS8HB&q=85&s=2943435fdd27e3cd124e12702c660811" alt="Graphiti Hero Dark" width="2064" height="1104" data-path="images/hero-dark.png" />

## What is Graphiti?

Graphiti is a Python framework for building and querying temporally-aware knowledge graphs, specifically designed for AI agents operating in dynamic environments. 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 ideal for developing interactive, context-aware AI applications.

<CardGroup cols={2}>
  <Card title="Real-Time Updates" icon="bolt">
    Immediate integration of new data episodes without batch recomputation
  </Card>

  <Card title="Bi-Temporal Data Model" icon="clock">
    Explicit tracking of event occurrence and ingestion times for accurate point-in-time queries
  </Card>

  <Card title="Hybrid Retrieval" icon="magnifying-glass">
    Combines semantic embeddings, keyword (BM25), and graph traversal for low-latency queries
  </Card>

  <Card title="Custom Entity Definitions" icon="code">
    Flexible ontology creation with developer-defined entities through Pydantic models
  </Card>
</CardGroup>

## Key Use Cases

Graphiti enables powerful capabilities for AI applications:

* **Agent Memory**: Give AI agents persistent, queryable memory of past interactions and learned facts
* **Dynamic Data Integration**: Continuously maintain user interactions and business data
* **State-Based Reasoning**: Facilitate task automation and decision-making for agents
* **Complex Data Querying**: Query evolving data with semantic, keyword, and graph-based search methods

## How Knowledge Graphs Work

A knowledge graph is a network of interconnected facts. Each fact is a "triplet" represented by:

* Two **entities** (nodes) - for example: "Kendra", "Adidas shoes"
* A **relationship** (edge) connecting them - for example: "loves"

What makes Graphiti unique is its ability to autonomously build a knowledge graph while handling changing relationships and maintaining historical context.

<img src="https://mintcdn.com/getzep-graphiti/xMjzb6MI8lalS8HB/images/graphiti-graph-intro.gif?s=e57e4aee394d65b0ebd15986ad5a5ce5" alt="Graphiti temporal walkthrough" width="1920" height="1080" data-path="images/graphiti-graph-intro.gif" />

## Why Choose Graphiti?

Traditional RAG approaches often rely on batch processing and static data summarization, making them inefficient for frequently changing data. Graphiti addresses these challenges:

<AccordionGroup>
  <Accordion title="Real-Time Incremental Updates">
    Add new data episodes immediately without batch recomputation. Graphiti processes each episode incrementally, extracting entities and relationships in real-time.
  </Accordion>

  <Accordion title="Bi-Temporal Data Model">
    Track both when events occurred and when they were ingested into the system. This enables accurate point-in-time queries and contradiction handling through temporal edge invalidation.
  </Accordion>

  <Accordion title="Efficient Hybrid Retrieval">
    Achieve low-latency queries without relying on LLM summarization. Graphiti combines semantic embeddings, BM25 keyword search, and graph traversal for typically sub-second latency.
  </Accordion>

  <Accordion title="Custom Entity Definitions">
    Define your own entity types and relationships using straightforward Pydantic models. Create flexible ontologies tailored to your specific domain.
  </Accordion>

  <Accordion title="Scalability">
    Efficiently manage large datasets with parallel processing, suitable for enterprise environments. Works with multiple graph database backends including Neo4j, FalkorDB, Kuzu, and Amazon Neptune.
  </Accordion>
</AccordionGroup>

## Graphiti vs. GraphRAG

Graphiti is optimized for dynamic, continuously updating data rather than static document summarization:

| Aspect                     | GraphRAG                              | Graphiti                                         |
| -------------------------- | ------------------------------------- | ------------------------------------------------ |
| **Primary Use**            | Static document summarization         | Dynamic data management                          |
| **Data Handling**          | Batch-oriented processing             | Continuous, incremental updates                  |
| **Knowledge Structure**    | Entity clusters & community summaries | Episodic data, semantic entities, communities    |
| **Retrieval Method**       | Sequential LLM summarization          | Hybrid semantic, keyword, and graph-based search |
| **Adaptability**           | Low                                   | High                                             |
| **Temporal Handling**      | Basic timestamp tracking              | Explicit bi-temporal tracking                    |
| **Contradiction Handling** | LLM-driven summarization judgments    | Temporal edge invalidation                       |
| **Query Latency**          | Seconds to tens of seconds            | Typically sub-second latency                     |
| **Custom Entity Types**    | No                                    | Yes, customizable                                |
| **Scalability**            | Moderate                              | High, optimized for large datasets               |

## Architecture

Graphiti uses a pluggable driver architecture, making the core framework backend-agnostic:

* **Graph Databases**: Neo4j, FalkorDB, Kuzu, Amazon Neptune
* **LLM Providers**: OpenAI, Azure OpenAI, Anthropic, Google Gemini, Groq, Ollama
* **Embeddings**: OpenAI, Azure OpenAI, Voyage AI, Google Gemini, local models
* **Search**: Hybrid semantic + keyword (BM25) + graph traversal

## Graphiti and Zep

Graphiti powers the core of [Zep's context engineering platform](https://www.getzep.com) for AI Agents. Using Graphiti, Zep demonstrates [State of the Art in Agent Memory](https://blog.getzep.com/state-of-the-art-agent-memory/).

Read the paper: [Zep: A Temporal Knowledge Graph Architecture for Agent Memory](https://arxiv.org/abs/2501.13956).

### Zep vs Graphiti

| Aspect                             | Zep                                                                                           | Graphiti                                                          |
| ---------------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **What they are**                  | Fully managed platform for context engineering and AI memory                                  | Open-source graph framework                                       |
| **User & conversation management** | Built-in users, threads, and message storage                                                  | Build your own                                                    |
| **Retrieval & performance**        | Pre-configured, production-ready retrieval with sub-200ms performance at scale                | Custom implementation required; performance depends on your setup |
| **Developer tools**                | Dashboard with graph visualization, debug logs, API logs; SDKs for Python, TypeScript, and Go | Build your own tools                                              |
| **Enterprise features**            | SLAs, support, security guarantees                                                            | Self-managed                                                      |
| **Deployment**                     | Fully managed or in your cloud                                                                | Self-hosted only                                                  |

**Choose Zep** if you want a turnkey, enterprise-grade platform with security, performance, and support baked in.

**Choose Graphiti** if you want a flexible OSS core and you're comfortable building/operating the surrounding system.

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get up and running with Graphiti in minutes
  </Card>

  <Card title="Installation" icon="download" href="/installation">
    Install Graphiti with your preferred package manager and backend
  </Card>
</CardGroup>
