搜索

PythonReactSEOPDF
OpenClaw

agent-memory-system

OpenClaw Agent 长期记忆系统 - 温度模型 + 自动归档 + 知识提炼。让 AI Agent 拥有持久记忆,自动管理冷热数据,从经验中提炼可复用技能。

ccyaolei0 来源安装数☆ 0 仓库 Starsv1.0.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install ccyaolei/agent-memory-system

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Agent Memory System 🧠

OpenClaw Agent 长期记忆系统

让 AI Agent 拥有持久记忆,自动管理冷热数据,从经验中提炼可复用技能。

核心功能

1. 温度模型
温度 时间范围 存储位置 说明
🔥 热 < 7 天 memory/*.md 活跃数据,高频访问
🟡 温 7-30 天 memory/*.md 近期数据,偶尔访问
❄️ 冷 > 30 天 memory/.archive/ 归档数据,低频访问
2. 自动 GC(每周日 00:00)
# 自动执行
./scripts/memory-gc.sh

功能:

  • 扫描超过 30 天的日志文件
  • 移动到 .archive/YYYY-MM/ 目录
  • 生成 GC 报告
  • 统计温度分布
3. 夜间反思(每日 23:45)
# 自动执行
./scripts/nightly-reflection.sh

功能:

  • 验证记忆 CRUD
  • 创建反思记录
  • 更新健康度统计
  • 检查待归档数据
4. 技能提炼
# 从教训中提取技能
./scripts/extract-skill.sh <lesson-name> [skill-name]

功能:

  • 从 memory/lessons/ 读取教训
  • 生成 skills/<skill-name>/ 技能包
  • 自动创建 SKILL.md 模板

目录结构

workspace/
├── MEMORY.md                    # 核心长期记忆(<5KB)
└── memory/
    ├── INDEX.md                 # 导航索引
    ├── YYYY-MM-DD.md            # 每日日志
    ├── lessons/                 # 经验教训
    │   ├── README.md            # 教训索引
    │   └── <topic>.md           # 具体教训
    ├── decisions/               # 重大决策
    │   ├── README.md            # 决策索引
    │   └── YYYY-MM-DD-*.md      # 决策记录
    ├── people/                  # 人物档案
    ├── reflections/             # 反思记录
    └── .archive/                # 归档数据
        └── YYYY-MM/             # 按月归档

快速开始

1. 安装
# 方法一:从 clawhub 安装
clawhub install agent-memory-system

# 方法二:手动安装
cp -r agent-memory-system ~/.openclaw/workspace/skills/
2. 初始化目录
mkdir -p ~/.openclaw/workspace/memory/{lessons,decisions,people,reflections,.archive}
touch ~/.openclaw/workspace/memory/INDEX.md
touch ~/.openclaw/workspace/MEMORY.md
3. 配置 Cron 任务
# 编辑 crontab...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/ccyaolei/agent-memory-system
Version
1.0.0
Commit
8dda4894e843cabb1aa89c3722ad592e6d30df48
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Agent Memory System 🧠

OpenClaw Agent 长期记忆系统 - 温度模型 + 自动归档 + 知识提炼

功能

  • 🔥 温度模型: 热(<7天) / 温(7-30天) / 冷(>30天)
  • 🗄️ 自动归档: 每周日 00:00 执行 GC
  • 💭 夜间反思: 每日 23:45 验证 + 统计
  • 🔧 技能提炼: 从教训中提取可复用技能

安装

方式 1:一键安装(推荐)
# 1. 安装技能
clawhub install agent-memory-system

# 2. 运行安装脚本(自动配置)
cd ~/.openclaw/workspace/skills/agent-memory-system/scripts
./install.sh

安装脚本会:

  • ✅ 自动创建记忆目录
  • ✅ 复制模板文件
  • ✅ 配置定时任务(可选)
方式 2:手动安装
clawhub install agent-memory-system

# 手动创建目录
mkdir -p ~/.openclaw/workspace/memory/{lessons,decisions,people,reflections,.archive}

# 手动配置 cron
crontab -e
# 添加:
# 0 0 * * 0 ~/.openclaw/workspace/skills/agent-memory-system/scripts/memory-gc.sh
# 45 23 * * * ~/.openclaw/workspace/skills/agent-memory-system/scripts/nightly-reflection.sh

文件结构

agent-memory-system/
├── .clawhub/origin.json    # Clawhub 元数据
├── _meta.json              # 技能元数据
├── SKILL.md                # 详细文档
├── README.md               # 本文件
├── scripts/
│   ├── memory-gc.sh        # 垃圾回收脚本
│   ├── nightly-reflection.sh  # 夜间反思脚本
│   └── extract-skill.sh    # 技能提取脚本
└── templates/
    ├── MEMORY-template.md  # MEMORY.md 模板
    ├── daily-log-template.md  # 每日日志模板
    └── lesson-template.md  # 教训模板

许可证

MIT

来源内容

SKILL.md
# Agent Memory System 🧠

**OpenClaw Agent 长期记忆系统**

让 AI Agent 拥有持久记忆,自动管理冷热数据,从经验中提炼可复用技能。

## 核心功能

### 1. 温度模型

| 温度 | 时间范围 | 存储位置 | 说明 |
|------|----------|----------|------|
| 🔥 热 | < 7 天 | memory/*.md | 活跃数据,高频访问 |
| 🟡 温 | 7-30 天 | memory/*.md | 近期数据,偶尔访问 |
| ❄️ 冷 | > 30 天 | memory/.archive/ | 归档数据,低频访问 |

### 2. 自动 GC(每周日 00:00)

```bash
# 自动执行
./scripts/memory-gc.sh
```

功能:
- 扫描超过 30 天的日志文件
- 移动到 `.archive/YYYY-MM/` 目录
- 生成 GC 报告
- 统计温度分布

### 3. 夜间反思(每日 23:45)

```bash
# 自动执行
./scripts/nightly-reflection.sh
```

功能:
- 验证记忆 CRUD
- 创建反思记录
- 更新健康度统计
- 检查待归档数据

### 4. 技能提炼

```bash
# 从教训中提取技能
./scripts/extract-skill.sh <lesson-name> [skill-name]
```

功能:
- 从 `memory/lessons/` 读取教训
- 生成 `skills/<skill-name>/` 技能包
- 自动创建 SKILL.md 模板

## 目录结构

```
workspace/
├── MEMORY.md                    # 核心长期记忆(<5KB)
└── memory/
    ├── INDEX.md                 # 导航索引
    ├── YYYY-MM-DD.md            # 每日日志
    ├── lessons/                 # 经验教训
    │   ├── README.md            # 教训索引
    │   └── <topic>.md           # 具体教训
    ├── decisions/               # 重大决策
    │   ├── README.md            # 决策索引
    │   └── YYYY-MM-DD-*.md      # 决策记录
    ├── people/                  # 人物档案
    ├── reflections/             # 反思记录
    └── .archive/                # 归档数据
        └── YYYY-MM/             # 按月归档
```

## 快速开始

### 1. 安装

```bash
# 方法一:从 clawhub 安装
clawhub install agent-memory-system

# 方法二:手动安装
cp -r agent-memory-system ~/.openclaw/workspace/skills/
```

### 2. 初始化目录

```bash
mkdir -p ~/.openclaw/workspace/memory/{lessons,decisions,people,reflections,.archive}
touch ~/.openclaw/workspace/memory/INDEX.md
touch ~/.openclaw/workspace/MEMORY.md
```

### 3. 配置 Cron 任务

```bash
# 编辑 crontab...
README
# Agent Memory System 🧠

OpenClaw Agent 长期记忆系统 - 温度模型 + 自动归档 + 知识提炼

## 功能

- 🔥 **温度模型**: 热(<7天) / 温(7-30天) / 冷(>30天)
- 🗄️ **自动归档**: 每周日 00:00 执行 GC
- 💭 **夜间反思**: 每日 23:45 验证 + 统计
- 🔧 **技能提炼**: 从教训中提取可复用技能

## 安装

### 方式 1:一键安装(推荐)

```bash
# 1. 安装技能
clawhub install agent-memory-system

# 2. 运行安装脚本(自动配置)
cd ~/.openclaw/workspace/skills/agent-memory-system/scripts
./install.sh
```

安装脚本会:
- ✅ 自动创建记忆目录
- ✅ 复制模板文件
- ✅ 配置定时任务(可选)

### 方式 2:手动安装

```bash
clawhub install agent-memory-system

# 手动创建目录
mkdir -p ~/.openclaw/workspace/memory/{lessons,decisions,people,reflections,.archive}

# 手动配置 cron
crontab -e
# 添加:
# 0 0 * * 0 ~/.openclaw/workspace/skills/agent-memory-system/scripts/memory-gc.sh
# 45 23 * * * ~/.openclaw/workspace/skills/agent-memory-system/scripts/nightly-reflection.sh
```

## 文件结构

```
agent-memory-system/
├── .clawhub/origin.json    # Clawhub 元数据
├── _meta.json              # 技能元数据
├── SKILL.md                # 详细文档
├── README.md               # 本文件
├── scripts/
│   ├── memory-gc.sh        # 垃圾回收脚本
│   ├── nightly-reflection.sh  # 夜间反思脚本
│   └── extract-skill.sh    # 技能提取脚本
└── templates/
    ├── MEMORY-template.md  # MEMORY.md 模板
    ├── daily-log-template.md  # 每日日志模板
    └── lesson-template.md  # 教训模板
```

## 许可证

MIT

相关技能

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

139mail

chang-tong

139邮箱邮件收发 Skill - 支持 IMAP/SMTP 协议,兼容139/QQ/163/Gmail等主流邮箱 功能: 1. 发送邮件(SMTP) 2. 接收邮件(IMAP) 3. 查看收件箱列表 4. 查看未读邮件 当用户提到 "发邮件"、"收邮件"、"查看邮件"、"邮箱"...