← 返回 Skills 市场
bigkingcn

AutoDream Memory

作者 Bigkingcn · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
108
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install autodream-memory
功能描述
AutoDream - Automatic memory consolidation sub-agent. Periodically (24h +5 sessions) organizes MEMORY.md and memory files, deduplicates, merges, removes stal...
使用说明 (SKILL.md)

AutoDream Skill - 自动记忆整理

核心理念

像 REM 睡眠一样整理记忆。

AutoDream 是一个后台运行的记忆整理子代理,解决长期记忆衰减问题:

  • 记忆文件随时间积累变得混乱
  • 相对日期(如"昨天")失去意义
  • 过时的调试方案引用已删除的文件
  • 矛盾条目堆积

工作原理

四阶段流程

阶段 操作 输出
1. Orientation 读取当前记忆目录,建立记忆状态地图 记忆文件清单、条目统计
2. Gather Signal 窄搜索会话记录,提取用户纠正、明确保存指令、重复主题、重要决策 高价值信号列表
3. Consolidation 合并新信息,转换相对日期为绝对日期,删除矛盾/过时条目,合并重复 整理后的记忆文件
4. Prune and Index 更新 MEMORY.md 索引,保持\x3C200 行(启动加载阈值) 精简的 MEMORY.md

触发条件

自动触发(双条件):

  • 距上次整理 ≥ 24 小时
  • 自上次整理后 ≥ 5 次会话

手动触发:

  • 运行 /dream 命令
  • 或直接告诉智能体"运行 AutoDream 整理记忆"

安全约束

  • 只读模式:只能写入记忆文件,不能修改项目代码
  • 锁文件:防止并发运行
  • 后台执行:不阻塞用户会话
  • MEMORY.md 限制:保持≤200 行(启动加载阈值)

快速开始

立即运行一次

python3 skills/autodream/scripts/autodream_cycle.py --workspace .

配置定时任务(默认 24 小时)

bash skills/autodream/scripts/setup_24h.sh

自定义间隔

bash skills/autodream/scripts/setup_24h.sh 12h

手动触发整理

python3 skills/autodream/scripts/autodream_cycle.py --workspace . --force

输出文件

  • memory/autodream/state.json - 运行状态(上次运行时间、会话计数)
  • memory/autodream/consolidation_report.json - 整理报告
  • memory/autodream/pruned_entries.json - 被删除的条目
  • memory/autodream/merged_entries.json - 被合并的条目
  • memory/autodream/cycle_report.md - 人类可读的整理报告
  • MEMORY.md - 更新后的记忆索引
  • memory/topics/*.md - 更新后的主题记忆文件

与 memory-mesh-core 的关系

特性 memory-mesh-core autodream
主要目标 跨工作区记忆共享 单工作区记忆整理
整理频率 12 小时 24 小时 +5 次会话
记忆范围 本地 + 全局共享 本地记忆文件
输出格式 JSON + GitHub Issue Markdown + JSON
适合场景 多智能体协作 个人工作区维护

推荐组合使用:

  • autodream 负责日常记忆整理
  • memory-mesh-core 负责跨工作区记忆共享

安全规则

  • 绝不删除用户明确标注"重要"的记忆
  • 绝不修改项目源代码
  • 绝不泄露敏感信息(API 密钥、密码等)
  • 删除操作前备份到 memory/autodream/backup/

配置选项

skills/autodream/config/config.json 中配置:

{
  "interval_hours": 24,
  "min_sessions": 5,
  "max_memory_lines": 200,
  "backup_enabled": true,
  "dry_run": false,
  "verbose": false
}

版本历史

  • 1.0.0: 初始版本,实现四阶段整理流程
  • 1.0.1: 添加手动触发支持和备份功能
  • 1.0.2: 优化相对日期转换逻辑

社区

  • 问题反馈:https://github.com/wanng-ide/autodream/issues
  • 技能安装:skillhub install autodream
安全使用建议
Before installing or running AutoDream: - Inspect the full autodream_cycle.py (the consolidation phase was truncated in the bundle review). Search that file for any network calls (requests, urllib, aiohttp, curl, subprocess posting to curl) or code that writes outside memory/skill directories. - Do an initial run with dry_run=true (or --dry-run) and/or in a copy of your workspace to see what it would change. The setup script runs the consolidation immediately — avoid running setup_24h.sh if you don't want an immediate pass. - Keep post_enabled off and leave issue_url blank unless you explicitly trust the endpoint. If you need external reporting, audit the code that performs posting. - Because the scripts read sessions/ and other workspace files, run them in a workspace that does not contain secrets or production credentials; consider running in a disposable container or VM first. - Confirm backups are being created (memory/autodream/backup/) and test restores before allowing automatic runs. If you want, provide the rest of autodream_cycle.py (the truncated consolidation/write parts) and I can re-evaluate for any code paths that send data externally or modify non-memory files.
功能分析
Type: OpenClaw Skill Name: autodream-memory Version: 1.0.1 The AutoDream skill is a memory management utility designed to consolidate, deduplicate, and prune an AI agent's long-term memory files and session logs. The code in `autodream_cycle.py` performs legitimate file system operations consistent with its stated purpose, such as reading session JSONL files to extract user corrections and updating `MEMORY.md`. While it implements persistence via a cron-like mechanism in `ensure_openclaw_cron.py` and `setup_24h.sh`, this is a documented feature of the OpenClaw platform for background tasks. No evidence of data exfiltration, malicious command execution, or prompt injection was found.
能力评估
Purpose & Capability
Name/description (automatic memory consolidation) aligns with the provided code and docs. The package contains scripts to scan memory files, sessions, and update MEMORY.md; those are expected for this functionality.
Instruction Scope
SKILL.md instructs running included scripts and installing a cron. The scripts read workspace/sessions/*.jsonl, memory/*, and update MEMORY.md and memory/autodream/*. That is within the stated purpose, but the code operates over the entire workspace you point it at — so if the workspace contains sensitive files the script will read them (sessions, memory, etc.). The docs assert it 'will not modify project source code' but this is a policy in text; ensure the rest of the script doesn't write outside memory/skill paths. Also setup_24h.sh immediately runs autodream_cycle.py which causes immediate execution on your workspace when installing/setting up.
Install Mechanism
There is no external install or remote-download step in the skill bundle; it's instruction + local scripts. That lowers supply-chain risk. setup_24h.sh and ensure_openclaw_cron.py write local config files under the skill folder and call the local Python script.
Credentials
The skill requests no environment variables or external credentials. However, setup_24h.sh writes an 'issue_url' and 'post_enabled' field into config.json (controlled by the user-provided arguments). The visible code does not show network exfiltration, but the presence of an issue_url/post_enabled configuration flag raises the possibility that a future or truncated part of the script could POST reports externally. Verify there are no network calls in the remainder of autodream_cycle.py before enabling posting.
Persistence & Privilege
always:false and default invocation settings are used. The skill writes local state/backup files under memory/autodream and skill config under skills/autodream/config; it does not request permanent elevated platform privileges. The setup script will, however, execute the consolidation run immediately when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install autodream-memory
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /autodream-memory 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
v1.0.1: Privacy audit passed, no API keys or personal info included. 4-phase memory consolidation pipeline.
v1.0.0
Initial release: AutoDream memory consolidation skill for OpenClaw
元数据
Slug autodream-memory
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

AutoDream Memory 是什么?

AutoDream - Automatic memory consolidation sub-agent. Periodically (24h +5 sessions) organizes MEMORY.md and memory files, deduplicates, merges, removes stal... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 108 次。

如何安装 AutoDream Memory?

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

AutoDream Memory 是免费的吗?

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

AutoDream Memory 支持哪些平台?

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

谁开发了 AutoDream Memory?

由 Bigkingcn(@bigkingcn)开发并维护,当前版本 v1.0.1。

💬 留言讨论