← 返回 Skills 市场
tomor1984

Agent Memory System New

作者 Tomor1984 · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
312
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-memory-system-new
功能描述
OpenClaw Agent 长期记忆系统 - 温度模型 + 自动归档 + 知识提炼。让 AI Agent 拥有持久记忆,自动管理冷热数据,从经验中提炼可复用技能。
使用说明 (SKILL.md)

Agent Memory System 🧠

OpenClaw Agent 长期记忆系统

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

核心功能

1. 温度模型

温度 时间范围 存储位置 说明
🔥 热 \x3C 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 \x3Clesson-name> [skill-name]

功能:

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

目录结构

workspace/
├── MEMORY.md                    # 核心长期记忆(\x3C5KB)
└── memory/
    ├── INDEX.md                 # 导航索引
    ├── YYYY-MM-DD.md            # 每日日志
    ├── lessons/                 # 经验教训
    │   ├── README.md            # 教训索引
    │   └── \x3Ctopic>.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
crontab -e

# 添加以下内容
0 0 * * 0 ~/.openclaw/workspace/skills/agent-memory-system/scripts/memory-gc.sh >> ~/.openclaw/logs/memory-gc.log 2>&1
45 23 * * * ~/.openclaw/workspace/skills/agent-memory-system/scripts/nightly-reflection.sh >> ~/.openclaw/logs/nightly-reflection.log 2>&1

4. 验证安装

# 手动运行一次 GC
~/.openclaw/workspace/skills/agent-memory-system/scripts/memory-gc.sh

# 手动运行一次反思
~/.openclaw/workspace/skills/agent-memory-system/scripts/nightly-reflection.sh

使用指南

Agent 每日工作流

  1. 会话开始

    • 读取 MEMORY.md 获取核心记忆
    • 检查今日日志 memory/YYYY-MM-DD.md
  2. 会话中

    • 重要决策 → 记录到 decisions/
    • 犯错/教训 → 记录到 lessons/
    • 人物信息 → 记录到 people/
  3. 会话结束

    • 更新每日日志
    • 标记完成事项

从教训提取技能

# 假设有一个教训文件: memory/lessons/deploy-without-test.md
./scripts/extract-skill.sh deploy-without-test

# 会生成: skills/deploy-without-test/SKILL.md
# 然后手动完善 SKILL.md 内容

查询归档数据

# 查看归档目录
ls -la memory/.archive/

# 搜索归档内容
grep -r "关键词" memory/.archive/

记忆模板

MEMORY.md 模板

# MEMORY.md - 长期记忆

> 核心知识和决策的精华

## 核心决策

| 决策 | 状态 | 优先级 | 最后更新 |
|------|------|--------|----------|
| ... | ... | ... | ... |

## 最佳实践

...

## 经验教训索引

| ID | 主题 | 类别 | 状态 |
|----|------|------|------|
| ... | ... | ... | ... |

每日日志模板

# YYYY-MM-DD

## 完成
- [事项] - 状态

## 问题
- [问题] - 解决方案

## 明天
- [计划]

教训模板

---
title: "教训标题"
date: YYYY-MM-DD
category: lessons
lesson_id: LRN-YYYYMMDD-XXX
priority: 🔴/🟡/🟢
status: active
---

# 教训标题

## 背景
...

## 问题
...

## 原因
...

## 解决方案
...

## 预防
...

健康度指标

指标 正常范围 检查频率
MEMORY.md 大小 \x3C 5KB 每日
热数据数量 5-10 个 每周
教训数量 持续增长 每周
归档率 \x3C 20%/周 每周

故障排除

记忆丢失

  1. 检查 MEMORY.md 是否存在
  2. 检查 memory/ 目录权限
  3. 查看 .archive/ 是否有误归档

GC 不执行

  1. 检查 crontab 配置
  2. 检查脚本执行权限
  3. 查看日志文件

技能提取失败

  1. 确认教训文件存在
  2. 检查 lessons 目录路径
  3. 确认 skills 目录可写

与其他系统的关系

系统 关系
memory_search 语义搜索本系统管理的文件
elite-longterm-memory LanceDB 向量存储(可选增强)
agent 每日报告 可读取 memory/ 数据生成报告

更新日志

v1.0.0 (2026-03-04)

  • 初始版本
  • 温度模型 + 自动归档
  • 夜间反思 + 技能提炼
  • 健康度监控

由阿福创建维护 - OpenClaw Agent 生态

安全使用建议
This package is internally consistent with its stated purpose, but it will create/modify files and install cron tasks on your machine. Before installing: 1) read the scripts (memory-gc.sh, nightly-reflection.sh, extract-skill.sh, install.sh) to confirm there is no unwanted behavior; 2) backup ~/.openclaw/workspace and your lessons if you have existing data (extract-skill.sh updates lesson frontmatter and can overwrite); 3) run GC with --dry-run first to see what would be archived; 4) prefer the interactive scripts/install.sh which prompts for confirmation, or manually add the cron entries yourself if you want tighter control; 5) consider running in a test workspace (set WORKSPACE env var) before applying to your real data. If you want, paste the scripts and I can highlight any specific lines to inspect further.
功能分析
Type: OpenClaw Skill Name: agent-memory-system-new Version: 1.0.0 The agent-memory-system bundle is a legitimate utility designed to manage an AI agent's long-term memory through a structured markdown-based system. It includes features for automated archiving of old logs (GC), daily reflection generation, and a 'skill extraction' mechanism that allows the agent to create new skill bundles from recorded lessons. The included shell scripts (install.sh, memory-gc.sh, nightly-reflection.sh, and extract-skill.sh) perform standard file management and crontab scheduling tasks that are clearly documented and aligned with the stated purpose. No evidence of data exfiltration, malicious execution, or unauthorized persistence was found.
能力评估
Purpose & Capability
Name/description match the actual artifacts: scripts create and manage a workspace/memory hierarchy, implement a temperature model, archive >30d files, run nightly reflection and extract skills from lessons. No unrelated credentials, binaries, or external services are required.
Instruction Scope
SKILL.md and the included scripts instruct the agent/user to create directories, run scripts, and add cron jobs. The scripts also automatically modify lesson files (update frontmatter with status and skill-path) when extracting skills — this is consistent with the stated 'skill extraction' feature but is a potentially surprising side‑effect that users should expect.
Install Mechanism
No network downloads or package installs are performed by the included scripts; everything is filesystem operations and cron configuration. No external URLs, shorteners, or archive extraction from remote hosts were observed.
Credentials
The skill does not request environment variables, credentials, or config paths. Scripts optionally respect a WORKSPACE env var but otherwise operate on user home paths (~/.openclaw/workspace). No secrets or unrelated service tokens are required.
Persistence & Privilege
The install routines configure cron jobs and create files under ~/.openclaw/workspace and ~/.openclaw/workspace/skills, giving this skill recurring execution (nightly/weekly). This persistence is coherent with a long‑term memory feature but is an important behavioral privilege you should be aware of.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-memory-system-new
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-memory-system-new 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Structured memory system for AI agents with layered storage, auto-archiving, and multi-agent sync
元数据
Slug agent-memory-system-new
版本 1.0.0
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

Agent Memory System New 是什么?

OpenClaw Agent 长期记忆系统 - 温度模型 + 自动归档 + 知识提炼。让 AI Agent 拥有持久记忆,自动管理冷热数据,从经验中提炼可复用技能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 312 次。

如何安装 Agent Memory System New?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-memory-system-new」即可一键安装,无需额外配置。

Agent Memory System New 是免费的吗?

是的,Agent Memory System New 完全免费(开源免费),可自由下载、安装和使用。

Agent Memory System New 支持哪些平台?

Agent Memory System New 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Memory System New?

由 Tomor1984(@tomor1984)开发并维护,当前版本 v1.0.0。

💬 留言讨论