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.
Installation agent prête
Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.
npx -y tokrepo@latest install 34ea44af-b30f-4129-b6fd-a2cb4366ab4b --target codexÀ exécuter après confirmation du plan en dry-run.
What it is
Graphiti is an open-source library by Zep that builds real-time knowledge graphs for AI agents. Unlike static knowledge bases, Graphiti continuously ingests new information, extracts entities and relationships, and maintains temporal awareness -- it knows when facts were added, updated, or became stale. The knowledge graph serves as long-term structured memory for agents that need to remember and reason over accumulated information.
Developers building AI agents that need persistent, structured memory beyond simple conversation history benefit most. Agents handling customer support, research, or multi-session workflows need to remember entities, relationships, and how they change over time.
How it saves time or tokens
Without Graphiti, agents typically store memory as flat text, which requires embedding search and often returns irrelevant context. Graphiti's graph structure enables precise entity lookups and relationship traversals. An agent can ask 'what is the status of Project X?' and get the current answer from the graph rather than searching through thousands of conversation turns. The temporal layer means outdated information does not pollute queries -- only the latest state is returned unless history is specifically requested.
How to use
- Install Graphiti:
pip install graphiti-core
- Initialize the graph and add episodes:
from graphiti_core import Graphiti
graph = Graphiti(neo4j_uri='bolt://localhost:7687', neo4j_user='neo4j', neo4j_password='password')
await graph.add_episode(
name='meeting_notes',
episode_body='Alice joined the team as lead engineer on April 10. The project deadline is May 15.',
source='meeting'
)
- Query the graph for entities and relationships:
results = await graph.search('What role does Alice have?')
print(results) # Returns: Alice -> lead engineer, added April 10
Example
# Add multiple episodes over time
await graph.add_episode(
name='update_1',
episode_body='Project deadline moved from May 15 to June 1 due to scope changes.',
source='slack'
)
# Graphiti updates the temporal state automatically
results = await graph.search('project deadline')
# Returns: June 1 (latest), with history showing May 15 was previous
# Entity-specific queries
entities = await graph.get_entity('Alice')
# Returns all relationships: role, team, projects, timeline
Related on TokRepo
- AI Memory Providers -- Graphiti deep-dive on TokRepo
- Knowledge Graph Tools -- Knowledge graph tools for AI agents
Common pitfalls
- Graphiti requires Neo4j as the graph database backend. Set up Neo4j before using Graphiti -- the Docker image is the quickest path.
- Entity extraction quality depends on the LLM used for processing episodes. Use a capable model (Claude, GPT-4) for accurate entity and relationship extraction.
- Large volumes of episodes can slow down graph updates. Batch episode ingestion during off-peak times for production workloads.
Questions fréquentes
Vector databases store embeddings for similarity search. Graphiti builds a structured knowledge graph with entities, relationships, and temporal metadata. Graph queries return precise entity-level answers; vector search returns similar text chunks. They solve different problems and can be complementary.
Yes. Graphiti uses Neo4j as its graph storage backend. Neo4j Community Edition is free and open source. Run it via Docker: 'docker run -p 7687:7687 neo4j:latest'.
Graphiti timestamps every entity and relationship when created or updated. When you add a new episode that contradicts earlier information, Graphiti updates the graph and preserves the history. Queries return the current state by default but can access the full timeline.
Yes. Graphiti integrates with agent frameworks as a memory backend. You can use it as a tool that agents call to store and retrieve structured knowledge during multi-step workflows.
Yes. Graphiti is open source and maintained by Zep. The core library (graphiti-core) is available on PyPI and GitHub under an open-source license.
Sources citées (3)
- Graphiti GitHub Repository— Graphiti builds real-time knowledge graphs for AI agents
- Zep Graphiti Documentation— Temporal awareness and entity extraction for agent memory
- arXiv: Knowledge Graphs for LLMs— Knowledge graphs for structured AI agent memory
En lien sur TokRepo
Source et remerciements
Created by Zep. Licensed under Apache 2.0. getzep/graphiti — 24,000+ GitHub stars
Fil de discussion
Actifs similaires
Graphiti — Temporal AI Knowledge Graph by Zep
Build dynamic knowledge graphs from AI agent conversations. Graphiti tracks entity changes over time, resolves contradictions, and provides temporal-aware queries.
Rerun — Visualize Multimodal AI Data in Real-Time
SDK for logging, storing, and visualizing 3D, images, time series, and text in real-time. Built for robotics and AI. 10K+ stars.
Foam — Personal Knowledge Management System for VS Code
Foam is a free, open-source personal knowledge management tool that runs inside VS Code. Inspired by Roam Research, it uses wikilinks, backlinks, and a graph visualization to help you organize interconnected notes in plain Markdown files.
Graphite — Scalable Real-Time Graphing and Metrics Platform
Graphite is a time-series monitoring platform that stores numeric data and renders graphs on demand, providing a flexible API for querying, transforming, and visualizing operational metrics.