Scripts2026年3月31日·1 分钟阅读

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
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

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?")

介绍

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.


🙏

来源与感谢

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

相关资产