three-tier-memory
三级记忆管理系统 (Three-Tier Memory)。短期记忆滑动窗口 + 中期记忆自动摘要(LLM) + 长期记忆向量检索(RAG)。当需要管理对话历史、自动摘要、语义检索、构建个人知识库时使用此 Skill。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/forvendettaw/three-tier-memoryThree-Tier Memory Manager
AI 代理的三级记忆管理系统:短期、中期、长期记忆自动管理。
架构
| 层级 | 存储 | 触发 | 容量 |
|---|---|---|---|
| 短期 | sliding-window.json | 实时/FIFO | 10条 |
| 中期 | summaries/ | Token阈值/摘要 | 无限 |
| 长期 | vector-store/ | 语义检索 | 无限 |
快速开始
# 初始化
python3 scripts/memory_manager.py init
# 添加记忆
python3 scripts/memory_manager.py add --type short --content "用户喜欢黑色"
python3 scripts/memory_manager.py add --type long --content "用户的邮箱是 [email protected]"
# 搜索
python3 scripts/memory_manager.py search "用户的偏好"
# 手动摘要
python3 scripts/memory_manager.py summary
# 查看状态
python3 scripts/memory_manager.py status
Hook 集成 (Auto)
已集成 OpenClaw Hook,会话结束自动保存记忆:
# Hook 已启用
openclaw hooks enable memory-manager-hook
事件:
session:end→ 自动保存对话- 窗口满 → 自动触发摘要
依赖
# 向量检索 (可选)
pip install chromadb
配置
memory/config.json:
{
"memory": {
"short_term": {"window_size": 10},
"medium_term": {"summary_threshold": 4000},
"long_term": {"top_k": 3}
}
}
完整命令
See references.md
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-forvendettaw-three-tier-memory": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
memory-manager
三级记忆管理系统 (Three-Tier Memory Management)。用于管理 AI 代理的短期、中期、长期记忆。包括:(1) 滑动窗口式短期记忆,(2) 自动摘要生成中期记忆,(3) 向量检索长期记忆 (RAG)。当需要管理对话历史、优化上下文、构建个人知识库、或实现记忆持久化时使用此 Skill。
memory-manager
三级记忆管理系统 (Three-Tier Memory Management)。用于管理 AI 代理的短期、中期、长期记忆。包括:(1) 滑动窗口式短期记忆,(2) 自动摘要生成中期记忆,(3) 向量检索长期记忆 (RAG)。当需要管理对话历史、优化上下文、构建个人知识库、或实现记忆持久化时使用此 Skill。
openclaw-auto-doctor
实时监控 OpenClaw 日志,自动诊断错误,搜索解决方案,并自动修复问题或创建 Pull Request
memory-manager
三级记忆管理系统 (Three-Tier Memory Management)。用于管理 AI 代理的短期、中期、长期记忆。包括:(1) 滑动窗口式短期记忆,(2) 自动摘要生成中期记忆,(3) 向量检索长期记忆 (RAG)。当需要管理对话历史、优化上下文、构建个人知识库、或实现记忆持久化时使用此 Skill。
x-deep-miner
X (Twitter) 深度挖掘与归档 Skill。每小时自动扫描 AI/美股/生活类高热度推文(收藏>1000),自动翻译为专业中文文章,输出 Obsidian 格式。适用于构建个人知识库、每日情报简报。