OA0 = Omni AI 0
OA0 是一个探索 AI 的论坛
现在注册
已注册用户请  登录
OA0  ›  技能包  ›  graphiti:通过 Graphiti API 进行知识图谱操作

graphiti:通过 Graphiti API 进行知识图谱操作

 
  merge ·  2026-02-05 03:34:07 · 3 次点击  · 0 条评论  

名称: graphiti
描述: 通过 Graphiti API 进行知识图谱操作。搜索事实、添加事件、提取实体与关系。
主页: https://github.com/getzep/graphiti
元数据: {"clawdbot":{"emoji":"🕸️","requires":{"services":["neo4j","qdrant","graphiti"]},"install":[{"id":"docker","kind":"docker-compose","label":"安装 Graphiti 技术栈 (Docker)"}]}}


Graphiti 知识图谱

使用 Graphiti 的 REST API 动态查询和管理知识图谱,支持服务自动发现。

前提条件

  • Neo4j 数据库(图存储)
  • Qdrant(向量搜索)
  • Graphiti 服务已运行(默认地址:http://localhost:8001)

工具

在知识图谱中搜索相关事实。

用法:

bash command:"
GRAPHITI_URL=\$({baseDir}/references/env-check.sh)
curl -s -X POST \"\$GRAPHITI_URL/facts/search\" \
  -H 'Content-Type: application/json' \
  -d '{\"query\": \"YOUR_QUERY\", \"max_facts\": 10}' | jq .
"

graphiti_add

向知识图谱添加新事件/记忆。

用法:

bash command:"
GRAPHITI_URL=\$({baseDir}/references/env-check.sh)
curl -s -X POST \"\$GRAPHITI_URL/messages\" \
  -H 'Content-Type: application/json' \
  -d '{\"name\": \"EPISODE_NAME\", \"content\": \"EPISODE_CONTENT\"}' | jq .
"

动态配置

本技能通过环境发现自动定位 Graphiti 服务,优先级如下:

  1. Clawdbot 配置clawdbot config get skills.graphiti.baseUrl
  2. 环境变量$GRAPHITI_URL
  3. 默认回退地址http://localhost:8001

如需修改 Graphiti 地址:

export GRAPHITI_URL="http://10.0.0.10:8001"
# 或
clawdbot config set skills.graphiti.baseUrl "http://10.0.0.10:8001"

示例

搜索信息:

bash command:"
GRAPHITI_URL=\$({baseDir}/references/env-check.sh)
curl -s -X POST \"\$GRAPHITI_URL/facts/search\" \
  -H 'Content-Type: application/json' \
  -d '{\"query\": \"Tell me about Essam Masoudy\", \"max_facts\": 5}'
"

添加记忆:

bash command:"
GRAPHITI_URL=\$({baseDir}/references/env-check.sh)
curl -s -X POST \"\$GRAPHITI_URL/messages\" \
  -H 'Content-Type: application/json' \
  -d '{\"name\": \"Project Update\", \"content\": \"Completed Phase 1 of Clawdbot integration\"}'
"
3 次点击  ∙  0 人收藏  
登录后收藏  
0 条回复
About   ·   Help   ·    
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
Developed with Cursor