← Back to Skills Marketplace
azhong517-svg

Agent Memory Framework

by Lil Cousin · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
53
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install agent-memory-framework
Description
三层记忆系统框架。为 Agent 提供持久化记忆能力,包括日记忆、长期记忆和归档机制。触发词:记忆系统、memory system、记忆初始化、设置记忆、新建记忆、记忆蒸馏、归档记忆。当需要为新 Agent 配置记忆能力、或管理已有记忆时使用。
README (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 安装后从零积累自己的记忆。

Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-memory-framework
  3. After installation, invoke the skill by name or use /agent-memory-framework
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
三层记忆框架:日记忆/长期记忆/归档,零内容可移植,适用于任何Agent
Metadata
Slug agent-memory-framework
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Agent Memory Framework?

三层记忆系统框架。为 Agent 提供持久化记忆能力,包括日记忆、长期记忆和归档机制。触发词:记忆系统、memory system、记忆初始化、设置记忆、新建记忆、记忆蒸馏、归档记忆。当需要为新 Agent 配置记忆能力、或管理已有记忆时使用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 53 downloads so far.

How do I install Agent Memory Framework?

Run "/install agent-memory-framework" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Memory Framework free?

Yes, Agent Memory Framework is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Agent Memory Framework support?

Agent Memory Framework is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Memory Framework?

It is built and maintained by Lil Cousin (@azhong517-svg); the current version is v1.0.0.

💬 Comments