← 返回 Skills 市场
azhong517-svg

Agent Memory Framework

作者 Lil Cousin · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
53
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-memory-framework
功能描述
三层记忆系统框架。为 Agent 提供持久化记忆能力,包括日记忆、长期记忆和归档机制。触发词:记忆系统、memory system、记忆初始化、设置记忆、新建记忆、记忆蒸馏、归档记忆。当需要为新 Agent 配置记忆能力、或管理已有记忆时使用。
使用说明 (SKILL.md)

Memory System — 三层记忆框架

架构概览

工作记忆(当前会话)     ← 临时,不持久
  ↓ 写入
日记忆 memory/YYYY-MM-DD.md  ← 原始日志,按天归档
  ↓ 蒸馏(定期提炼)
长期记忆 MEMORY.md            ← 策划精华,跨会话持久
  ↓ 活性归档(30天未引用)
归档 memory/archive/          ← 冷存储,可追溯

核心文件

文件 用途 何时写
MEMORY.md 长期记忆(策划精华) 重要决策、教训、认知更新时
memory/YYYY-MM-DD.md 日记忆(原始日志) 每次会话有值得记录的事时
memory/archive/ 归档(冷存储) 30天未被引用的章节移入

初始化(新 Agent 首次设置)

  1. 在工作目录创建 MEMORY.md,使用模板 assets/MEMORY.md
  2. 创建 memory/ 目录
  3. AGENTS.md(或等效配置文件)中添加记忆规则(见 references/conventions.md
  4. 可选:配置蒸馏 cron(见 references/distillation.md

日常使用

写入规则

  • 日记忆:会话中有值得记录的事 → 写入 memory/YYYY-MM-DD.md
  • 长期记忆:重大决策/教训/认知 → 同时写入 MEMORY.md
  • "Mental notes" 不算 — 不写文件的记忆不会存活到下次会话
  • 先写再说 — 如果需要记住,先写文件,不要靠"我记住了"

读取规则

  • 主会话(与用户的私密对话):可自由读写 MEMORY.md
  • 共享会话(群聊、Discord、多人场景):禁止加载 MEMORY.md — 防止私人信息泄露
  • 日记忆:任何会话都可读,但只写当天的文件

安全红线

  • MEMORY.md 可能包含用户私人信息,绝不在共享上下文中加载
  • 归档文件同样可能含敏感信息,共享场景也禁读
  • 任何记忆文件不得外传(email、公开帖子等)

归档规则

  • 30天未被心跳/会话引用 → 移到 memory/archive/
  • 教训编号永远保留(编号不可回收,即使教训已过时)
  • 动态信息 >14天未更新 → 降级或归档(策略、持仓等)
  • 不按文件大小归档 — 信息密度不同,大小不是好指标
  • 归档时在 MEMORY.md 保留一行占位(章节名 + 归档日期),方便追溯

蒸馏(定期提炼)

将日记忆中值得长期保留的内容提炼到 MEMORY.md

详细流程见 references/distillation.md

零内容原则

本 Skill 只提供框架和规则,不包含任何记忆内容。每个 Agent 安装后从零积累自己的记忆。

安全使用建议
Install only if you want the agent to keep local persistent memory. Treat MEMORY.md and memory/*.md as private, avoid storing secrets, restrict all memory reads to private sessions unless explicitly approved, and review any proposed changes to AGENTS.md, TOOLS.md, skills, or cron jobs before allowing them.
能力评估
Purpose & Capability
The purpose is coherent: it provides a local three-layer memory framework with daily notes, long-term memory, and archives. Persistent memory is expected for this skill, but it can hold private user context.
Instruction Scope
The instructions allow raw daily memory to be read in any session and also tell the agent to update AGENTS.md, TOOLS.md, or relevant skills when it learns lessons; those scopes are broader than ordinary memory-file maintenance.
Install Mechanism
There is no install spec, code, binary requirement, package dependency, network endpoint, or credential requirement in the provided artifacts.
Credentials
The skill creates and maintains local files such as MEMORY.md and memory/YYYY-MM-DD.md, and mentions optional cron-based distillation. This is aligned with the memory purpose but should be explicitly controlled by the user.
Persistence & Privilege
The skill intentionally persists information and rules across sessions, including possible edits to agent configuration files or skills, without clearly requiring user approval for those persistent behavior changes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-memory-framework
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-memory-framework 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
三层记忆框架:日记忆/长期记忆/归档,零内容可移植,适用于任何Agent
元数据
Slug agent-memory-framework
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Agent Memory Framework 是什么?

三层记忆系统框架。为 Agent 提供持久化记忆能力,包括日记忆、长期记忆和归档机制。触发词:记忆系统、memory system、记忆初始化、设置记忆、新建记忆、记忆蒸馏、归档记忆。当需要为新 Agent 配置记忆能力、或管理已有记忆时使用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 53 次。

如何安装 Agent Memory Framework?

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

Agent Memory Framework 是免费的吗?

是的,Agent Memory Framework 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agent Memory Framework 支持哪些平台?

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

谁开发了 Agent Memory Framework?

由 Lil Cousin(@azhong517-svg)开发并维护,当前版本 v1.0.0。

💬 留言讨论