Graphiti
2026-03-31
新闻来源:网淘吧
围观:15
电脑广告
手机广告
Graphiti 知识图谱
使用 Graphiti 的 REST API 和动态服务发现来查询和管理您的知识图谱。
先决条件
- Neo4j 数据库(图存储)
- Qdrant(向量搜索)
- Graphiti 服务正在运行(默认地址:http://localhost:8001)
工具
graphiti_search
在知识图谱中搜索相关事实。

用法:
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:
- Clawdbot 配置:
clawdbot config get skills.graphiti.baseUrl - 环境变量:
$GRAPHITI_URL - 默认回退:
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\"}'
"
文章底部电脑广告
手机广告位-内容正文底部


微信扫一扫,打赏作者吧~