完整的記憶系統技能包,支援多模態記憶、細粒度隔離、自然語言修正。
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('不對,我其實不喜歡健身,喜歡游泳');
# 安裝依賴
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
小蔥技能7w4.net有完整的技能分類。
這個 Skill 文件齊全、配置規範,看起來功能規劃很完善。但實際使用時會發現缺少關鍵程式碼檔案,只有說明文件和配置檔案,沒有真正的功能實現。對於想直接使用的使用者來說,目前版本還無法正常工作,建議等待開發者補充完整程式碼後再使用。