版本: v3.3
发布日期: 2026-03-13
维护者: Denda 🦞
许可: MIT License
智能记忆系统 3.3 是一个基于 PARA 架构的三层记忆管理系统,集成了智能检查点,语义搜索,自动分类和两级摘要功能.
- 记忆持久化 : 智能检查点,三层存储,完整性验证
- 知识管理 :语义搜索,智能分类,质量评估
- 自动化运维 :健康监控,自适应更新,错误处理
- 真正的Handoff :上下文转移,决策树分析,能力边界
- 效率提升 :智能冷却,动态阈值,性能监控
- 两级摘要记忆 :恒定上下文长度,智能阈值管理
- 完整监控系统 :统计收集,性能指标,健康检查,报告生成
- 可追溯架构 :m2宏观摘要 → m1单任务摘要 → 原始对话的完整链条
- 三层记忆架构: 每日日志 → MEMORY.md → 档案库
- 智能检查点: 每 6 小时 LLM 提取关键记忆
- 语义搜索: QMD 向量搜索 + 全文搜索
- 自动分类: 7 种记忆类型,类型特定衰减率
- 两级摘要: m1(任务级) → m2(宏观) 恒定上下文
- 资源感知: 系统资源监控,智能决策参与
- 搜索: QMD (向量搜索 + 全文搜索)
- 定时任务: OpenClaw Cron (15 个任务)
- 分类: Python + Bash 混合实现
- 摘要: Bash 脚本 + LLM 集成
包含智能记忆系统 3.3 的完整实施指南和关键脚本。
-
IntelligentMemorySystem_v3.3.md
- 完整实施指南
- 系统架构说明
- 定时任务详解
- 安装配置步骤
- 故障排除指南
- 性能指标参考
-
QUICK-REFERENCE.md
- 快速参考手册
- 常用命令速查
- 故障排除速查
- 配置文件参考
- 健康检查清单
-
memory-maintenance-combined.sh
- 功能:记忆系统维护 (合并版)
- 频率:每 6 小时
- 包含:衰减权重更新 + 检查点提取
-
two-level-memory-integration.sh
- 功能:两级摘要系统集成
- 阈值:20 个 m1 触发 m2
- 命令:generate-m1, generate-m2, status, test
-
qmd-full-maintenance.sh
- 功能:QMD 完整系统维护
- 频率:每天 06:00
- 包含:清理 + 索引更新 + 向量嵌入
-
nightly-deep-analysis.sh
- 功能:夜间深度系统分析
- 频率:每天 03:00
- 输出:LLM 分析 + 战略建议报告
-
pre-compression-hook-optimized.sh
- 功能:预压缩钩子 (优化版)
- 阈值:75% 上下文使用率
- 特性:冷却机制,智能会话检测
-
enhanced-monitor.sh
- 功能:两级摘要增强监控
- 频率:每 4 小时
- 包含:动态阈值 + 自动生成
请将 ../MySpace 替换为你自己的工作空间 关于moltbook的相关内容,只是个人在社区上参与分享了大量关于记忆优化的内容,若不想参与可直接忽略
首先阅读完整实施指南:
# 在线阅读 (推荐)
# https://github.com/denda188/ClawIntelligentMemory/blob/main/IntelligentMemorySystem_v3.3.md
# 本地阅读
cat IntelligentMemorySystem_v3.3.md | less
# 快速参考
cat QUICK-REFERENCE.md将需要的脚本复制到你的系统:
# 复制所有脚本
cp -r Scripts/ /path/to/your/system/
# 或单独复制
cp Scripts/memory-maintenance-combined.sh /path/to/scripts/根据你的需求配置定时任务:
# OpenClaw cron 示例
openclaw cron add --name "记忆系统维护" \
--every "6h" \
--command "/path/to/memory-maintenance-combined.sh" \
--agent main测试脚本是否正常工作:
# 测试记忆维护
/path/to/memory-maintenance-combined.sh
# 测试两级摘要
/path/to/two-level-memory-integration.sh test
# 查看状态
/path/to/two-level-memory-integration.sh status- OpenClaw: (定时任务系统)
- Bash: v5.0+ (脚本执行)
- QMD: v1.0+ (语义搜索)
- Node.js: v22+ (OpenClaw 依赖)
- Ollama: 本地 LLM (夜间分析)
- jq: JSON 处理 (配置解析)
- bc: 计算器 (阈值计算)
- 内存: 最低 4GB,推荐 8GB
- 存储: 最低 10GB 可用空间
- CPU: 多核处理器 (并行任务)
原始对话 → memory/YYYY-MM-DD.md (原始日志)
↓
MEMORY.md (精选记忆,<3000 字符)
↓
life/archives/ (归档记忆,按需检索)
任务完成 → m1 摘要 (~150 字)
↓ (积累 20 个)
m2 宏观摘要 (~200 字)
↓
代理上下文 (恒定长度)
每 6 小时 → 记忆系统维护
每天 06:00 → QMD 完整维护
每天 03:00 → 夜间深度分析
每 2 小时 → 预压缩钩子检查
每 4 小时 → 两级摘要监控
每 8 小时 → Moltbook 社区参与检测
| 指标 | 实施前 | 实施后 | 改善 |
|---|---|---|---|
| 上下文使用率 | 67% | 15% | -78% |
| 任务准确率 | 82% | 94% | +12% |
| 搜索响应时间 | 5-10 秒 | 1-3 秒 | -70% |
| 记忆保留率 | 60% | 85% | +25% |
| 系统稳定性 | 85% | 100% | +15% |
- CPU: 平均 5-10% (维护时段峰值 30%)
- 内存: 平均 2-4GB (维护时段峰值 8GB)
- 存储: 每日增长 ~5MB (压缩后)
- 网络: 最小 (本地优先架构)
{
"name": "记忆系统维护 (合并版)",
"schedule": { "kind": "every", "everyMs": 21600000 },
"payload": {
"kind": "agentTurn",
"message": "运行记忆系统维护"
},
"sessionTarget": "isolated",
"delivery": { "mode": "announce" }
}# 添加记忆集合
qmd collection add /path/to/memory --name memory --mask "**/*.md"
# 添加日常集合
qmd collection add /path/to/life --name life --mask "**/*.md"
# 嵌入向量
qmd embed{
"m1_threshold": 20,
"m1_max_words": 150,
"m2_max_words": 200,
"auto_generate": true,
"integration_enabled": true
}# 检查执行权限
chmod +x /path/to/script.sh
# 检查 Bash 版本
bash --version # 需要 5.0+
# 检查依赖
which jq bc qmd# 检查 OpenClaw 状态
openclaw status
# 查看任务列表
openclaw cron list
# 手动触发测试
openclaw cron run --name "任务名称"# 重建索引
qmd collection rm memory
qmd collection add /path/to/memory --name memory
# 重新嵌入
qmd embed
# 测试搜索
qmd search "测试" -n 5- 查看文档:
IntelligentMemorySystem_v3.3.md - 查看日志:
/path/to/logs/*.log - 运行测试:
./script.sh test - 联系维护者:GitHub Issues
- ✅ 集成 3-Question Framework 澄清问题系统
- ✅ 优化定时任务通知 (Telegram 修复)
- ✅ 同步 HEARTBEAT.md 文档
- ✅ 添加完整实施指南和脚本集
- ✅ 两级摘要系统监控集成
- ✅ 动态阈值算法优化
- ✅ 预压缩钩子冷却机制
- ✅ 增强记忆分类系统
- ✅ 7 种记忆类型特定衰减率
- ✅ 类型特定归档策略
- ✅ 数据一致性修复 (239 个无效条目清理)
- ✅ 每日数据一致性监控
- ✅ 系统健康评分 100/100
MIT License
Copyright (c) 2026 Denda
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
- GitHub: @Denda
最后更新: 2026-03-13
当前状态: ✅ 稳定版本