ScriptsMar 31, 2026·2 min read

Graphiti — Real-Time Knowledge Graphs for AI Agents

Build real-time knowledge graphs for AI agents by Zep. Temporal awareness, entity extraction, community detection, and hybrid search. Production-ready. 24K+ stars.

TO
TokRepo精选 · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

pip install graphiti-core
from graphiti_core import Graphiti

graphiti = Graphiti("bolt://localhost:7687", "neo4j", "password")
await graphiti.build_indices()

# Add episodes (facts)
await graphiti.add_episode(
    name="meeting",
    episode_body="Alice told Bob the project deadline is March 15th.",
    source_description="meeting notes",
)

# Search the knowledge graph
results = await graphiti.search("When is the project deadline?")

Intro

Graphiti is a framework by Zep for building real-time, temporal knowledge graphs that AI agents can query. Unlike static RAG, Graphiti continuously updates its graph as new information arrives — tracking entity relationships, temporal changes, and community structures. Supports hybrid search (semantic + graph traversal) for complex reasoning queries. 24,000+ GitHub stars.

Best for: AI agents that need persistent, evolving memory with relationship awareness Works with: OpenAI, Anthropic, any LLM via LiteLLM, Neo4j graph database


Key Features

Temporal Awareness

Every fact is timestamped. The graph knows when things happened and can answer time-based queries:

  • "What was the deadline before it changed?"
  • "Who joined the team last month?"

Entity & Relationship Extraction

Automatically extracts entities (people, orgs, projects) and their relationships from unstructured text.

Community Detection

Groups related entities into communities for summarization and navigation.

Hybrid Search

Combines semantic similarity, graph traversal, and BM25 text search for precise retrieval.

Production-Ready

  • Incremental updates (no full rebuilds)
  • Concurrent episode processing
  • Built on Neo4j for scalability

FAQ

Q: What is Graphiti? A: A framework for building real-time knowledge graphs for AI agents. Extracts entities and relationships from text, tracks temporal changes, and supports hybrid search. By Zep, 24K+ stars.

Q: How is Graphiti different from standard RAG? A: RAG retrieves text chunks by similarity. Graphiti builds a structured knowledge graph with entities, relationships, and temporal awareness — enabling multi-hop reasoning and change tracking.


🙏

Source & Thanks

Created by Zep. Licensed under Apache 2.0. getzep/graphiti — 24,000+ GitHub stars

Related Assets