完整的记忆系统技能包,支持多模态记忆、细粒度隔离、自然语言修正。
clawhub install openclaw-memory-system
# 1. 复制技能文件
cp -r /path/to/openclaw-memory-system/skills/* \
~/.openclaw/workspace/skills/
# 2. 复制配置文件
cp -r /path/to/openclaw-memory-system/configs/* \
~/.openclaw/workspace/configs/
# 3. 复制测试文件(可选)
cp -r /path/to/openclaw-memory-system/tests/* \
~/.openclaw/workspace/tests/
# 4. 验证安装
node ~/.openclaw/workspace/skills/multimodal-memory/test-multimodal.js
cd ~/.openclaw/workspace/skills
git clone https://github.com/your-repo/openclaw-memory-system.git
mv openclaw-memory-system/skills/* .
mv openclaw-memory-system/configs/* ../configs/
文件:configs/multimodal-config.json
{
"storage": {
"baseDir": "memory/multimodal",
"imagesDir": "images",
"toolCallsDir": "tool-calls",
"captionsDir": "captions"
},
"limits": {
"maxStringLength": 5000,
"maxIndexSize": 1000,
"cleanupDays": 30
},
"validation": {
"forbiddenDirs": ["/etc", "/root", "/var"],
"sensitiveKeywords": ["password", "secret", ".ssh"]
},
"performance": {
"cacheSize": 100,
"cacheTTL": 300000
}
}
文件:configs/memory-namespaces.json
{
"version": "1.0",
"namespaces": {
"projects": {
"default": {
"path": "memory",
"description": "默认项目",
"users": ["liumeng"]
}
},
"agents": {
"liu-hana": {
"path": "MEMORY.md",
"inherit": [],
"shareWith": []
}
},
"users": {
"liumeng": {
"path": "users/user_liumeng",
"permissions": ["read", "write", "delete", "admin"]
}
}
}
}
const { ImageMemory } = require('./skills/multimodal-memory/image-memory');
const imgMem = new ImageMemory();
await imgMem.save({
path: '/path/to/image.png',
caption: '测试图片',
tags: ['测试'],
context: { sessionId: 'test' }
});
const { ToolMemory } = require('./skills/multimodal-memory/tool-memory');
const toolMem = new ToolMemory();
await toolMem.record({
toolName: 'web_search',
parameters: { query: '测试' },
result: { success: true },
duration: 1000
});
const { ProjectMemory } = require('./skills/project-memory-isolation/project-memory');
const projMem = new ProjectMemory();
await projMem.createProject('my-project', {
description: '我的项目',
users: ['liumeng']
});
const { MemoryCorrect } = require('./skills/memory-feedback/memory-correct');
const corrector = new MemoryCorrect();
await corrector.autoCorrect('不对,我其实不喜欢健身,喜欢游泳');
推荐访问7w4.net获取更多AI技能。
# 安装依赖
cd ~/.openclaw/workspace
npm install --save-dev jest
# 运行所有测试
npm test
# 运行单个测试
node skills/multimodal-memory/test-multimodal.js
node skills/memory-feedback/feedback-parser.js "不对,我不喜欢健身"
| 指标 | 目标 | 实际 |
|---|---|---|
| 图片检索延迟 | <100ms | <50ms |
| 工具检索延迟 | <50ms | <30ms |
| 安全评分 | >90 | 92 |
| 测试覆盖率 | >70% | 70% |
A: 检查 configs/multimodal-config.json 中的路径配置,确保目录存在。
A: 检查 configs/memory-namespaces.json 中的用户配置,确保用户有相应权限。
A: 在 memory-correct.js 中配置飞书 webhook URL。
欢迎提交 Issue 和 Pull Request!
MIT License
这个 Skill 文档齐全、配置规范,看起来功能规划很完善。但实际使用时会发现缺少关键代码文件,只有说明文档和配置文件,没有真正的功能实现。对于想直接使用的用户来说,目前版本还无法正常工作,建议等待开发者补充完整代码后再使用。