← 返回 Skills 市场
bigkingcn

autodream-core

作者 Bigkingcn · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
92
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install autodream-core
功能描述
通用记忆整理引擎 — 基于适配器模式的跨平台记忆整理技能。自动去重、合并、删除过时条目。| Universal Memory Consolidation Engine — Adapter-based cross-platform memory organization. Auto-dedup, merge, pr...
使用说明 (SKILL.md)

AutoDream-Core | 通用记忆整理引擎

让任何 Agent 都拥有记忆整理能力 | Give Any Agent Memory Consolidation Power


📖 概述 | Overview

中文: autodream-core 是一个通用的记忆整理引擎,采用适配器模式设计,支持跨平台记忆管理。 它解决了 AI 代理长期运行中的记忆衰减问题:

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

English: autodream-core is a universal memory consolidation engine with adapter-based design for cross-platform memory management. It solves the memory decay problem in long-running AI agents:

  • Memory files become chaotic over time
  • Relative dates (e.g., "yesterday") lose meaning
  • Outdated debug solutions reference deleted files
  • Contradictory entries accumulate

🎯 核心特性 | Core Features

特性 说明
平台无关 核心逻辑与具体平台解耦
适配器模式 轻松支持 OpenClaw、Claude Code 等平台
四阶段流程 Orientation → Gather → Consolidate → Prune
性能优化 Session 扫描节流、文件数量限制
可观测性 Task 状态追踪、Analytics 埋点
单元测试 15 个核心测试用例,100% 通过
Feature Description
Platform Agnostic Core logic decoupled from specific platforms
Adapter Pattern Easy support for OpenClaw, Claude Code, etc.
4-Stage Flow Orientation → Gather → Consolidate → Prune
Performance Session scanning throttling, file limits
Observability Task state tracking, Analytics logging
Test Coverage 15 core test cases, 100% pass

🚀 快速开始 | Quick Start

安装 | Installation

# 使用 skillhub (推荐)
skillhub install autodream-core

# 或使用 clawhub
clawhub install autodream-core

基础用法 | Basic Usage

from pathlib import Path
from autodream_core import AutoDreamEngine, OpenClawAdapter

# 初始化适配器 | Initialize adapter
adapter = OpenClawAdapter(
    workspace=Path("~/.openclaw/workspace-research").expanduser()
)

# 创建引擎 | Create engine
engine = AutoDreamEngine(adapter)

# 运行整理 | Run consolidation
result = engine.run(force=True)  # force=True 强制运行

print(f"整理完成!处理了 {result['consolidation']['final_count']} 个条目")

📦 目录结构 | Directory Structure

autodream-core/
├── SKILL.md           # 技能描述 (Skill metadata)
├── README.md          # 详细文档 (Documentation)
├── package.json       # 包信息 (Package info)
├── install.sh         # 安装脚本 (Install script)
├── core/              # 核心逻辑 (Core logic)
│   ├── engine.py      # 主引擎 (Main engine)
│   ├── analytics.py   # 分析日志 (Analytics)
│   ├── stages/        # 四阶段实现 (4 stages)
│   └── utils/         # 工具函数 (Utilities)
├── adapters/          # 平台适配器 (Platform adapters)
│   ├── base.py        # 基础接口 (Base interface)
│   └── openclaw.py    # OpenClaw 实现 (OpenClaw impl)
├── tests/             # 单元测试 (Unit tests)
└── examples/          # 使用示例 (Examples)

🔧 配置选项 | Configuration

from autodream_core import AutoDreamEngine, OpenClawAdapter

adapter = OpenClawAdapter(
    workspace=Path("/path/to/workspace"),
    memory_dir=Path("/path/to/workspace/memory"),  # 可选
)

engine = AutoDreamEngine(
    adapter,
    max_memory_lines=200,        # MEMORY.md 最大行数
    stale_days=30,               # 过期条目阈值(天)
    session_throttle=0.1,        # Session 扫描节流(秒/文件)
    enable_analytics=True,       # 启用分析日志
)

📊 输出示例 | Output Example

{
  "orientation": {
    "memory_files": 5,
    "total_entries": 42
  },
  "gather": {
    "new_signals": 8,
    "session_scanned": 12
  },
  "consolidation": {
    "merged": 3,
    "removed_stale": 5,
    "final_count": 38
  },
  "prune": {
    "lines_before": 245,
    "lines_after": 178
  }
}

🧪 运行测试 | Run Tests

cd autodream-core
python -m pytest tests/ -v

🤝 贡献 | Contributing

欢迎提交 Issue 和 Pull Request!

中文:

  • 报告 Bug 或提出新功能 → GitHub Issues
  • 提交代码改进 → Pull Requests
  • 添加新平台适配器 → 参考 adapters/base.py

English:

  • Report bugs or request features → GitHub Issues
  • Submit code improvements → Pull Requests
  • Add new platform adapters → Refer to adapters/base.py

📄 许可证 | License

MIT License — See LICENSE file for details.


🔗 链接 | Links


⚠️ 注意事项 | Notes

  1. 首次运行建议手动触发,确认整理结果符合预期

  2. 定期备份 MEMORY.md,防止意外丢失重要信息

  3. 生产环境建议先在小范围测试

  4. Recommend manual trigger on first run to verify results

  5. Backup MEMORY.md regularly to prevent accidental data loss

  6. Test in staging environment first before production use

安全使用建议
This package appears coherent for a local memory-consolidation library: it reads your workspace (MEMORY.md, memory/*.md, sessions/*.json), creates state and analytics files under the workspace, and does local-only processing. Before installing or running: 1) Inspect install.sh and package.json before executing any install script. 2) Run first in a non-production/test workspace (set adapter.workspace to a safe folder) and use engine.run(force=True) manually per the README. 3) Backup your MEMORY.md (as the docs advise). 4) If you don't want local analytics, disable enable_analytics in the config or delete/ignore .autodream_analytics.jsonl. 5) Note minor packaging inconsistencies (package.json and NPM links vs. a Python implementation) — this is likely a metadata artifact but worth confirming the author's source (GitHub link in metadata points to a placeholder). If you want higher assurance, ask the publisher for provenance (repo URL and install instructions) and/or perform a quick code review of install.sh before use.
功能分析
Type: OpenClaw Skill Name: autodream-core Version: 1.0.0 The autodream-core skill bundle is a well-structured memory consolidation engine designed to manage and prune AI agent memory files. It implements a four-stage workflow (Orientation, Gather, Consolidate, Prune) using an adapter pattern to support platforms like OpenClaw. The code (engine.py, openclaw.py) performs local file operations such as reading session logs and updating MEMORY.md, which are entirely consistent with its stated purpose. It includes local analytics logging and state management without any evidence of data exfiltration, unauthorized network access, or malicious command execution.
能力评估
Purpose & Capability
The name/description (memory consolidation for agents) aligns with the code: adapters for a workspace, stages to scan memory files and sessions, dedupe/merge/prune logic, and an OpenClaw adapter. All functionality (file reads/writes, session scanning, index updates) is explained and needed for the stated purpose.
Instruction Scope
SKILL.md and runtime code instruct the agent to scan the workspace (MEMORY.md, memory/*.md, sessions/*.json), extract entries, deduplicate, prune stale entries, and update MEMORY.md. It also writes local state (.dream_state.json) and analytics (.autodream_analytics.jsonl). The instructions do not attempt to read unrelated system config, environment variables, or send data externally.
Install Mechanism
Registry has no formal install spec (instruction-only), which minimizes automatic install risk. However the package includes install.sh and package.json in the bundle — these are not executed by the platform automatically but could be used by a user to install. Inspect install.sh/package.json before running them; their presence is a packaging inconsistency but not proof of maliciousness.
Credentials
The skill requires no environment variables, no external credentials, and uses only local filesystem access in the configured workspace. The analytics logger writes local JSONL files; no network/external endpoints are used. Credential access requests are proportionate (none requested).
Persistence & Privilege
The skill persists state and analytics under adapter.memory_dir/autodream (creates directories and writes .dream_state.json and .autodream_analytics.jsonl). always is false and model invocation is allowed (platform default). Persisting local state is expected for this tool but you should be aware it will create/modify files in the specified workspace.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install autodream-core
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /autodream-core 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - Universal memory consolidation engine
元数据
Slug autodream-core
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

autodream-core 是什么?

通用记忆整理引擎 — 基于适配器模式的跨平台记忆整理技能。自动去重、合并、删除过时条目。| Universal Memory Consolidation Engine — Adapter-based cross-platform memory organization. Auto-dedup, merge, pr... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 92 次。

如何安装 autodream-core?

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

autodream-core 是免费的吗?

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

autodream-core 支持哪些平台?

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

谁开发了 autodream-core?

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

💬 留言讨论