Graphiti技能使用说明

subsun 3周前 (03-31) openclaw小龙虾 48 0

Graphiti 知识图谱

使用 Graphiti 的 REST API 和动态服务发现来查询和管理您的知识图谱。

先决条件

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

工具

graphiti_search

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

Graphiti

用法:

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 URL:

export GRAPHITI_URL="http://10.0.0.10:8001"
# OR
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\"}'
"

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏

相关推荐

网友评论

  • (*)

最新评论

用户管理

您好,欢迎到访网站!
    用户注册

上网淘巴领天猫淘宝优惠券,一年省好几千。

广告  ×

您是本站第817593名访客 今日有0篇新文章/评论