Graphiti知识图谱引擎 是 AI Skill Hub 本期精选Agent工作流之一。在 GitHub 上收获超过 27.1k 颗 Star,综合评分 8.5 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
Graphiti知识图谱引擎 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
Graphiti知识图谱引擎 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install graphiti
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install graphiti
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/getzep/graphiti
cd graphiti
pip install -e .
# 验证安装
python -c "import graphiti; print('安装成功')"
# 命令行使用
graphiti --help
# 基本用法
graphiti input_file -o output_file
# Python 代码中调用
import graphiti
# 示例
result = graphiti.process("input")
print(result)
# graphiti 配置文件示例(config.yml) app: name: "graphiti" debug: false log_level: "INFO" # 运行时指定配置文件 graphiti --config config.yml # 或通过环境变量配置 export GRAPHITI_API_KEY="your-key" export GRAPHITI_OUTPUT_DIR="./output"
<p align="center"> <a href="https://www.getzep.com/"> <img src="https://github.com/user-attachments/assets/119c5682-9654-4257-8922-56b7cb8ffd73" width="150" alt="Zep Logo"> </a> </p>
</div> <div align="center">
<a href="https://trendshift.io/repositories/12986" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12986" alt="getzep%2Fgraphiti | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</div>
[!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:
<p align="center"> <img src="images/graphiti-graph-intro.gif" alt="Graphiti temporal walkthrough" width="700px"> </p>
pip install graphiti-core[falkordblite]
Requirements:
- Python 3.10 or higher - Neo4j 5.26 / FalkorDB 1.1.2 / Kuzu 0.11.2 / Amazon Neptune Database Cluster or Neptune Analytics Graph + Amazon OpenSearch Serverless collection (serves as the full text search backend) - OpenAI API key (Graphiti defaults to OpenAI for LLM inference and embedding)
[!IMPORTANT] Graphiti works best with LLM services that support Structured Output (such as OpenAI and Gemini). Using other services may result in incorrect output schemas and ingestion failures. This is particularly problematic when using smaller models.
Optional:
[!TIP] The simplest way to install Neo4j is via Neo4j Desktop. It provides a user-friendly interface to manage Neo4j instances and databases. Alternatively, you can use FalkorDB on-premises via Docker and instantly start with the quickstart example:> docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest >
pip install graphiti-core
or
uv add graphiti-core
If you plan to use FalkorDB as your graph database backend, install with the FalkorDB extra:
```bash pip install graphiti-core[falkordb]
If you plan to use Kuzu as your graph database backend, install with the Kuzu extra:
```bash pip install graphiti-core[kuzu]
If you plan to use Amazon Neptune as your graph database backend, install with the Amazon Neptune extra:
```bash pip install graphiti-core[neptune]
```bash
pip install graphiti-core[anthropic]
pip install graphiti-core[groq]
pip install graphiti-core[google-genai]
pip install graphiti-core[anthropic,groq,google-genai]
pip install graphiti-core[falkordb,anthropic,google-genai]
pip install graphiti-core[neptune] ```
You can use Docker Compose to quickly start the required services:
docker compose up
This will start the Neo4j Docker service and related components.
docker compose --profile falkordb up
This will start the FalkorDB Docker service and related components.
[!IMPORTANT] Graphiti defaults to using OpenAI for LLM inference and embedding. Ensure that an OPENAI_API_KEY is set in your environment. Support for Anthropic and Groq LLM inferences is available, too. Other LLM providers may be supported via OpenAI compatible APIs.
For a complete working example, see the Quickstart Example in the examples directory. The quickstart demonstrates:
The example is fully documented with clear explanations of each functionality and includes a comprehensive README with setup instructions and next steps.
```python from openai import AsyncOpenAI from graphiti_core import Graphiti from graphiti_core.llm_client.azure_openai_client import AzureOpenAILLMClient from graphiti_core.llm_client.config import LLMConfig from graphiti_core.embedder.azure_openai import AzureOpenAIEmbedderClient
In addition to the Neo4j and OpenAi-compatible credentials, Graphiti also has a few optional environment variables. If you are using one of our supported models, such as Anthropic or Voyage models, the necessary environment variables must be set.
Database names are configured directly in the driver constructors:
neo4j (hardcoded in Neo4jDriver)default_db (hardcoded in FalkorDriver)As of v0.17.0, if you need to customize your database configuration, you can instantiate a database driver and pass it to the Graphiti constructor using the graph_driver parameter.
```python from graphiti_core import Graphiti from graphiti_core.driver.neo4j_driver import Neo4jDriver
api_key = "<your-google-api-key>"
llm_config = LLMConfig( api_key="ollama", # Ollama doesn't require a real API key, but some placeholder is needed model="deepseek-r1:7b", small_model="deepseek-r1:7b", base_url="http://localhost:11434/v1", # Ollama's OpenAI-compatible endpoint )
llm_client = OpenAIGenericClient(config=llm_config)
azure_client = AsyncOpenAI( base_url="https://your-resource-name.openai.azure.com/openai/v1/", api_key="your-api-key", )
```
The Gemini reranker uses the gemini-2.5-flash-lite model by default, which is optimized for cost-effective and low-latency classification tasks. It uses the same boolean classification approach as the OpenAI reranker, leveraging Gemini's log probabilities feature to rank passage relevance.
| Aspect | Zep | Graphiti |
|---|---|---|
| **What they are** | Managed context graph infrastructure for AI agents | Open-source temporal context graph engine |
| **Context graphs** | Manages vast numbers of per-user/entity context graphs with governance | Build and query individual context graphs |
| **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 |
| Aspect | GraphRAG | Graphiti |
|---|---|---|
| **Primary Use** | Static document summarization | Dynamic, evolving context for agents |
| **Data Handling** | Batch-oriented processing | Continuous, incremental updates |
| **Knowledge Structure** | Entity clusters & community summaries | Temporal context graph — entities, facts with validity windows, episodes, 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 with automatic fact invalidation |
| **Contradiction Handling** | LLM-driven summarization judgments | Automatic fact invalidation with temporal history preserved |
| **Query Latency** | Seconds to tens of seconds | Typically sub-second latency |
| **Custom Entity Types** | No | Yes, customizable via Pydantic models |
| **Scalability** | Moderate | High, optimized for large datasets |
Graphiti is specifically designed to address the challenges of dynamic and frequently updated datasets, making it particularly suitable for applications requiring real-time interaction and precise historical queries.
Graphiti是知识图谱+AI智能体领域的优秀开源项目,架构创新且社区活跃。27k星标体现其价值认可,适合构建具有记忆能力的智能系统。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,Graphiti知识图谱引擎 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | graphiti |
| Topics | 知识图谱AI智能体工作流RAGLLM |
| GitHub | https://github.com/getzep/graphiti |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-06-06 · 更新时间:2026-06-06 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端