memory-optimizer-base
多Agent记忆管理系统 - 开放协作的知识库解决方案 支持私有+公共双层记忆空间,自动生成每日总结,跨Agent知识检索
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/2720480371/memory-optimizer-baseMulti-Agent Memory Optimizer
让每个 AI Agent 拥有独立记忆,同时共享公共知识库
🌟 核心价值
- 隐私保护:每个 Agent 独立记忆空间,互不干扰
- 知识传承:重要经验发布到公共空间,其他 Agent 可检索使用
- 自动化:每日自动生成总结(通过 crontab),减少人工负担
- 开箱即用:完整工具链,5 分钟快速部署
📦 安装
# 1. 进入 skills 目录
cd ~/.npm-global/lib/node_modules/@qingchencloud/openclaw-zh/skills/
# 2. 确保此技能目录存在
# memory-optimizer-base/
# 3. 初始化你的 Agent
./memory-optimizer-base/memory_optimizer.py init --agent <your_agent_id>
🎯 核心工作流
1. OpenClaw 日常会话 → 记录到 memory/YYYY-MM-DD.md
2. 每日 23:00 自动 summarize → 生成 medium-term/YYYY-MM-DD.md
3. 人工确认内容 → 执行 upload → 发布到 public/<agent>/<date>/
4. 任何 Agent 可 search-public → 获取其他 Agent 的经验
🔨 命令速查
# 初始化
./memory_optimizer.py init --agent xiaotian
# 手动生成总结(测试用)
./memory_optimizer.py summarize --agent xiaotian --date 2026-04-06
# 上传到公共空间
./memory_optimizer.py upload --agent xiaotian --date 2026-04-06 --title "事件标题"
# 搜索公共知识
./memory_optimizer.py search-public "关键词"
# 查看私有记忆
./memory_optimizer.py private list --agent xiaotian
# 分析系统状态
./memory_optimizer.py analyze --agent xiaotian
# 配置管理
./memory_optimizer.py config --set memory.sync_enabled=true
⚙️ 配置
编辑 config/default.json:
{
"memory": {
"base_path": "~/.openclaw/workspace-xiaotian",
"private_root": "memory/private",
"public_root": "memory/public",
"medium_term_retention_days": 1
},
"summarizer": {
"template": "...", // 自定义输出格式
},
"upload": {
"require_upload_confirm": true // 发布前是否需要人工确认
}
}
📂 文件结构
memory-optimizer-base/
├── memory_optimizer.py # 主程序
├── .gitignore # 隐私保护
├── README.md # 详细文档
├── SKILL.md # 本文档
├── config/
│ ├── default.json # 默认配置
│ └── agents/ # 各 Agent 配置(自动生成)
└── lib/ # 核心模块
├── analyzer.py
├── summarizer.py
├── uploader.py
├── retriever.py
├── optimizer.py
├── tierer.py
└── sync.py
🔐 安全与隐私
- ✅ 所有真实记忆文件(
memory/、.openclaw/)已在.gitignore中排除 - ✅ 默认上传需人工确认,避免误发
- ✅ 私有空间严格隔离,公共空间仅包含主动分享的内容
- ⚠️ 公共空间内容永久可见,发布前请检查
📖 完整文档
详见 README.md
🤝 贡献
欢迎 Issue 和 PR!
版本: 0.2.0 | 许可: MIT-0
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-2720480371-memory-optimizer-base": {
"enabled": true,
"auto_update": true
}
}
}Tags
Related Skills
calling-agent-squad
Activate a multi-agent team (the Squad) to manage complex projects, business tasks, or development workflows. The squad includes a Manager, Architect, Coder, Reviewer, and Observer. Use when the user wants to "call a squad", "start a project", or "deploy squad" with specialized roles and quality control loops.
autodream-core
通用记忆整理引擎 — 基于适配器模式的跨平台记忆整理技能。自动去重、合并、删除过时条目。| Universal Memory Consolidation Engine — Adapter-based cross-platform memory organization. Auto-dedup, merge, prune stale entries.
context-compressor
Intelligently compress context — conversations, code, logs. Preserve key information while reducing token usage. Auto-detects content type and applies optimal compression.
securityvitals
Security vitals checker for OpenClaw. Scans your installation, scores your setup, and shows you exactly what to fix. First scan in seconds.
auto-context
智能上下文卫生检查器。分析当前会话的上下文污染程度 (长对话、主题漂移、噪声累积),建议:continue、/fork、/btw 或新会话。 支持手动触发(/auto-context)和自动触发(响应层实现)。 基于 ArXiv 论文和认知心理学研究的多维度评估体系。