← Back to Skills Marketplace
bigkingcn

AutoDream Memory

by Bigkingcn · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
108
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install autodream-memory
Description
AutoDream - Automatic memory consolidation sub-agent. Periodically (24h +5 sessions) organizes MEMORY.md and memory files, deduplicates, merges, removes stal...
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install autodream-memory
  3. After installation, invoke the skill by name or use /autodream-memory
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug autodream-memory
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is AutoDream Memory?

AutoDream - Automatic memory consolidation sub-agent. Periodically (24h +5 sessions) organizes MEMORY.md and memory files, deduplicates, merges, removes stal... It is an AI Agent Skill for Claude Code / OpenClaw, with 108 downloads so far.

How do I install AutoDream Memory?

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

Is AutoDream Memory free?

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

Which platforms does AutoDream Memory support?

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

Who created AutoDream Memory?

It is built and maintained by Bigkingcn (@bigkingcn); the current version is v1.0.1.

💬 Comments