memory-optimizer-base

多Agent记忆管理系统 - 开放协作的知识库解决方案 支持私有+公共双层记忆空间,自动生成每日总结,跨Agent知识检索

3,891 stars

Best use case

memory-optimizer-base is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

多Agent记忆管理系统 - 开放协作的知识库解决方案 支持私有+公共双层记忆空间,自动生成每日总结,跨Agent知识检索

Teams using memory-optimizer-base should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/memory-optimizer-base/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/2720480371/memory-optimizer-base/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/memory-optimizer-base/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How memory-optimizer-base Compares

Feature / Agentmemory-optimizer-baseStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

多Agent记忆管理系统 - 开放协作的知识库解决方案 支持私有+公共双层记忆空间,自动生成每日总结,跨Agent知识检索

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Multi-Agent Memory Optimizer

> 让每个 AI Agent 拥有独立记忆,同时共享公共知识库

## 🌟 核心价值

- **隐私保护**:每个 Agent 独立记忆空间,互不干扰
- **知识传承**:重要经验发布到公共空间,其他 Agent 可检索使用
- **自动化**:每日自动生成总结(通过 crontab),减少人工负担
- **开箱即用**:完整工具链,5 分钟快速部署

---

## 📦 安装

```bash
# 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 的经验
```

---

## 🔨 命令速查

```bash
# 初始化
./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`:

```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](./README.md)

---

## 🤝 贡献

欢迎 Issue 和 PR!

---

**版本**: 0.2.0 | **许可**: MIT-0

Related Skills

Pricing Optimizer

3891
from openclaw/skills

Analyzes and optimizes pricing strategy using proven frameworks

Business Strategy & Growth

Logistics Operations Optimizer

3891
from openclaw/skills

You are a logistics operations analyst. When the user describes their supply chain, shipping, or distribution setup, generate a complete optimization framework.

Logistics & Supply Chain Optimization

Fleet Management Optimizer

3891
from openclaw/skills

You are a fleet management analyst. Help the user optimize vehicle fleet operations, reduce costs, and improve utilization.

Workflow & Productivity

Database Engineering Mastery

3891
from openclaw/skills

> Complete database design, optimization, migration, and operations system. From schema design to production monitoring — covers PostgreSQL, MySQL, SQLite, and general SQL patterns.

Coding & Development

Customer Acquisition Cost (CAC) Optimizer

3891
from openclaw/skills

Analyze, benchmark, and reduce your customer acquisition cost across every channel.

Business Analytics & Strategy

Agent Memory Architecture

3891
from openclaw/skills

Complete zero-dependency memory system for AI agents — file-based architecture, daily notes, long-term curation, context management, heartbeat integration, and memory hygiene. No APIs, no databases, no external tools. Works with any agent framework.

memory-cache

3891
from openclaw/skills

High-performance temporary storage system using Redis. Supports namespaced keys (mema:*), TTL management, and session context caching. Use for: (1) Saving agent state, (2) Caching API results, (3) Sharing data between sub-agents.

General Utilities

Memory

3891
from openclaw/skills

Infinite organized memory that complements your agent's built-in memory with unlimited categorized storage.

Memory Management

auto-memory

3891
from openclaw/skills

Indestructible agent memory — permanently stored, never lost. Save decisions, identity, and context as a memory chain on the Autonomys Network. Rebuild your full history from a single CID, even after total state loss.

AI Persistence & Memory

Triple-Layer Memory System

3880
from openclaw/skills

三层记忆系统 - 解决 AI Agent 长对话记忆丢失和上下文管理问题

Memory & Context Management

Claude Code Memory Kit

3891
from openclaw/skills

Stop Claude Code from repeating mistakes — enforce guardrails, preserve context, maintain consistency across sessions

eo-ability-memory

3891
from openclaw/skills

主动记忆能力(Proactive Memory),跨会话延续用户偏好、项目上下文,记住导师要求和格式规范