P1: 完善 skill 文档 - 强调增强而非替换

- 更新 graph-memory/SKILL.md:添加与 memory-core 关系对比表
- 更新 graph-memory-persona/SKILL.md:添加定位声明和使用建议
- 更新 graph-memory-task/SKILL.md:添加定位声明和使用建议
- 更新 bundled-skills/ 下对应文件
This commit is contained in:
root
2026-04-24 14:06:22 +08:00
parent a4a904f66b
commit 7314d85ac6
7 changed files with 238 additions and 219 deletions

View File

@ -1,24 +1,44 @@
---
name: graph-memory
description: "图记忆工具 - 检索、写入、删除记忆,管理人设和任务。使用 recall 检索、commit 写入、purge 删除"
description: "图记忆工具 - 检索、写入、删除记忆,管理人设和任务。作为 OpenClaw memory-core 的增强补充,不替代其核心功能"
metadata: {"openclaw": {"requires": {"bins": ["node"]}}}
user-invocable: true
---
# GraphMemory 图记忆操作
# GraphMemory 图记忆系统
你可以通过以下操作与图记忆系统交互。
让 AI 拥有真正的长期记忆能力。
## 核心操作
> **定位声明**:本工具是 **OpenClaw memory-core 的增强补充**,而非替代。memory-core 负责 session transcripts 和历史消息管理,GraphMemory 提供图数据库形式的结构化长期记忆。两者可并存运行。
## 与 memory-core 的关系
| 功能 | memory-core | GraphMemory (本工具) |
|------|-------------|---------------------|
| 对话历史 | ✅ 自动保存 messages | ❌ 不管理对话历史 |
| 结构化记忆 | ❌ 无 | ✅ 三元组图存储 |
| 人设管理 | ❌ 无 | ✅ persona_update/clear |
| 任务追踪 | ❌ 无 | ✅ task_create/set_state |
| 自动触发 | ✅ 自动索引检索 | ❌ LLM 可选调用 |
## 核心概念
### 实体 (Entity)
现实世界中的对象,如"用户"、"Python"、"WaterFlow"。
### 关系 (Relation)
连接两个实体的关系,格式为三元组:主体 - 关系 - 客体。
## 可用命令
### 1. recall - 检索记忆
从记忆图中检索相关信息。
**参数**:
- `queryIntent`: 搜索意图/关键词
- `queryIntent`: 搜索意图/关键词(必需,若无则需提供 seedEntities)
- `seedEntities`: 可选的种子实体名
- `depth`: 检索深度
- `depth`: 检索深度 1-5(默认 2)
- `sessionFilter`: 可选的会话ID过滤
### 2. commit - 写入记忆
@ -26,7 +46,7 @@ user-invocable: true
将信息写入记忆图。
**参数**:
- `triplets`: 三元组数组,每个包含 subject, relation, object
- `triplets`: 三元组数组,每个包含 subject, relation, object(必需)
- `sessionId`: 会话ID
- `turnId`: 轮次ID
@ -37,7 +57,7 @@ user-invocable: true
**参数**:
- `criteria`: 删除条件 (subject, target, relation, sessionId)
- `mode`: 删除模式 (soft/hard/supersede)
- `newRelation`: 可选的替代关系
- `newRelation`: 替代关系(supersede 模式必需)
### 4. introspect - 查看状态
@ -63,3 +83,4 @@ user-invocable: true
2. **结构化**: 使用三元组 (主体-关系-客体) 格式
3. **关联**: 通过关系连接相关实体
4. **定期清理**: 删除过时或错误的信息
5. **与 memory-core 配合**: 对话历史由 memory-core 管理,结构化事实由 GraphMemory 管理