Audit, clean, and optimize Clawdbot's vector memory (LanceDB). Use when memory is bloated with junk, token usage is high from irrelevant auto-recalls, or setting up memory maintenance automation.
保持向量记忆精简。防止垃圾记忆造成Token浪费。
审计: 检查记忆中的内容
memory_recall query=* limit=50
清除: 清空所有向量记忆
bash
rm -rf ~/.clawdbot/memory/lancedb/
然后重启网关:clawdbot gateway restart
重新注入: 清除后,从MEMORY.md中存储关键事实
memory_store text=<事实> category=preference|fact|decision importance=0.9
垃圾记忆的主要来源是autoCapture: true。禁用它:
json
{
plugins: {
entries: {
memory-lancedb: {
config: {
autoCapture: false,
autoRecall: true
}
}
}
}
}
使用gateway action=config.patch来应用。
✅ 存储:
❌ 绝不存储:
设置月度清除+重新注入:
cron action=add job={
name: memory-maintenance,
schedule: 0 4 1 ,
text: 月度记忆维护:1) 清除 ~/.clawdbot/memory/lancedb/ 2) 解析 MEMORY.md 3) 将关键事实存储到新的 LanceDB 4) 报告完成
}
使用memory_store时:
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 memory-hygiene-1776380242 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 memory-hygiene-1776380242 技能
skillhub install memory-hygiene-1776380242
文件大小: 1.68 KB | 发布时间: 2026-4-17 15:18