LeoYeAI/openclaw-auto-dream
Automatic memory consolidation for OpenClaw agents — like sleep for your AI. Powered by MyClaw.ai
About LeoYeAI/openclaw-auto-dream
LeoYeAI/openclaw-auto-dream is an open-source project on GitHub, mainly written in HTML. Automatic memory consolidation for OpenClaw agents — like sleep for your AI. Powered by MyClaw.ai It currently holds 547 stars and 0 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).
Project Overview
AI Homed tracks it on the AI Agent Memory board.
GitHub Repository Details
README
🌀 OpenClaw Auto-Dream
Your AI doesn't just remember. It dreams.
A cognitive memory architecture that gives OpenClaw agents the ability to sleep, dream, and wake up smarter.
Five memory layers. Importance scoring. Forgetting curves. Knowledge graphs. Health dashboards.
Not file management — neuroscience.
MyClaw.ai · ClawHub · OpenClaw
---
🌐 中文 · Français · Deutsch · Русский · 日本語 · Italiano · Español
---
🦞 Part of the MyClaw.ai Ecosystem
|
|
MyClaw.ai is the AI personal assistant platform everyone's obsessed with — a fully-featured OpenClaw Agent running 24/7 on your own dedicated server. Not a chatbot. Not a wrapper. A real agent with full code control, internet access, cron jobs, file systems, databases, and tool integrations. Think of it as hiring a brilliant assistant who never sleeps, never forgets*, and can actually do things. *With Auto-Dream installed, they literally never forget. |
Why MyClaw Changes Everything
Most AI tools give you a chat window. MyClaw gives you a server.
Every MyClaw instance runs OpenClaw — the open-source AI agent runtime — on dedicated infrastructure. Your agent has:
- 🖥️ A full Linux server — not a sandbox, not a container, a real machine
- 🌐 Unrestricted internet — browse, scrape, call APIs, send messages
- ⏰ Cron & background tasks — your agent works while you sleep
- 📁 Persistent file system — workspace, memory, configs, all yours
- 🧩 Skill ecosystem — install new abilities from ClawHub in one command
- 🔌 Channel integrations — Telegram, Discord, Slack, WhatsApp, and more
- 🔒 Your data, your server — no shared infrastructure, no data mining
---
The Problem
Every AI agent forgets. Session ends, context gone. Files pile up. What was that decision from two weeks ago? Which workflow worked last time? Your agent has amnesia — functional, but forgetting everything the moment it sleeps.
Auto-Dream fixes this. Like the human brain consolidating memories during sleep, Auto-Dream runs periodic "dream cycles" that scan, extract, organize, score, link, and prune your agent's knowledge — automatically, safely, and intelligently.
Why This Matters for MyClaw Users
Your MyClaw agent runs 24/7. It handles your projects, tracks your decisions, remembers your preferences, manages your workflows. Over weeks and months, it accumulates thousands of daily log entries. Without Auto-Dream, that knowledge sits in raw files — unsorted, unscored, disconnected. Your agent has the data but can't think about it.
Auto-Dream transforms your agent from a tool that executes commands into a partner that understands context, learns from history, and connects the dots you didn't see.
Why This Is Different
| Feature | Claude Code CLAUDE.md | Typical Memory Plugins | Auto-Dream | |---------|----------------------|----------------------|----------------| | Memory layers | 1 flat file | 1 file or key-value | 5 cognitive layers | | Scoring | ❌ | ❌ | Importance × Recency × References | | Forgetting | Manual cleanup | Delete or nothing | Gradual decay + archival | | Knowledge graph | ❌ | ❌ | Linked entries + reachability | | Health monitoring | ❌ | ❌ | 5-metric score + trend tracking | | Cross-instance | ❌ | ❌ | Export/import/merge bundles | | Dashboard | ❌ | ❌ | Interactive HTML with charts |
Architecture
┌──────────────────────────────────────────────────────────────────┐
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────────┐ │
│ │ COLLECT │──▶│ CONSOLIDATE │──▶│ EVALUATE │ │
│ │ │ │ │ │ │ │
│ │ Scan 7 days │ │ Route layers │ │ Score importance │ │
│ │ Flag markers│ │ Semantic dedup│ │ Forgetting curve │ │
│ │ Extract │ │ Assign IDs │ │ Health metrics │ │
│ │ insights │ │ Link relations│ │ Generate insights │ │
│ └─────────────┘ └──────────────┘ └───────────────────┘ │
│ │
│ ☽ Dream Cycle ☾ │
└──────────────────────────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌──────────────┐ ┌─────────────┐ ┌──────────────┐
│ 📊 Dashboard │ │ 🔔 Notify │ │ 📝 Dream Log │
│ HTML + Charts│ │ Push to chat│ │ Append report│
└──────────────┘ └─────────────┘ └──────────────┘
Five Memory Layers
| Layer | Storage | What Goes Here |
|-------|---------|---------------|
| Working | LCM plugin (optional, detected at setup) | Real-time context compression & semantic recall |
| Episodic | memory/episodes/*.md | Project narratives, event timelines, story arcs |
| Long-term | MEMORY.md | Facts, decisions, people, milestones, strategy |
| Procedural | memory/procedures.md | Workflows, preferences, tool patterns, shortcuts |
| Index | memory/index.json | Metadata, importance scores, relations, health stats |
Features
🧠 Cognitive Dream Cycle
Runs automatically via cron (default: 4 AM daily). Three phases:
1. Collect — Scans unconsolidated daily logs (last 7 days), detects priority markers (⚠️ PERMANENT, 🔥 HIGH, 📌 PIN, ``), extracts decisions / people / facts / projects / lessons / procedures / open threads
2. Consolidate — Routes each insight to the correct memory layer, performs semantic deduplication, assigns unique IDs (mem_NNN), creates relation links between connected entries
3. Evaluate — Scores importance using base_weight × recency × reference_boost / 8.0, applies forgetting curves (>90 days + low importance → archived, never deleted), calculates 5-metric health score, generates 1–3 non-obvious insights, writes dream report, sends notification
📊 Importance Scoring
Every entry gets a score on every dream cycle:
importance = (base_weight × recency_factor × reference_boost) / 8.0
- Recency:
max(0.1, 1.0 - days/180)— gradual decay over 6 months - References:
log₂(count + 1)— logarithmic boost for frequently-referenced entries - Markers:
🔥 HIGHdoubles base weight;⚠️ PERMANENTalways scores 1.0
📉 Intelligent Forgetting
Memories aren't deleted — they're gracefully archived:
- Entry must be >90 days unreferenced AND importance < 0.3
- Compressed to a one-line summary in
memory/archive.md - Original ID preserved for relation tracking
⚠️ PERMANENTand📌 PINentries are immune
🕸️ Knowledge Graph
Entries are linked by semantic relations. The reachability metric measures graph connectivity:
- Union-find algorithm across all entry relations
- Detects isolated knowledge clusters
- Suggests cross-references to improve coherence
🩺 Health Score (5 Metrics)
health = (freshness×0.25 + coverage×0.25 + coherence×0.2 + efficiency×0.15 + reachability×0.15) × 100
| Metric | What It Measures | |--------|-----------------| | Freshness | % of entries referenced in last 30 days | | Coverage | % of knowledge categories updated in last 14 days | | Coherence | % of entries with at least one relation link | | Efficiency | How concise MEMORY.md stays (inversely proportional to line count) | | Reachability | How well-connected the memory graph is |
🔔 Push Notifications
Dream results delivered to your chat automatically:
| Level | What You Get |
|-------|-------------|
| silent | Nothing — logged to dream-log.md only |
| summary | 🌀 Health: 82/100 \| +5 new, ~3 updated, -1 archived \| 💡 Top insight |
| full | Complete dream report with all sections |
📊 Interactive Dashboard
A zero-dependency HTML dashboard with:
- Animated health gauge (0–100)
- 5 metric cards with color-coded status
- Memory distribution donut chart
- Importance histogram
- Health trend line chart (last 30 cycles)
- Force-directed knowledge graph visualization
- Recent changes, insights, suggestions, stale entries
🔄 Cross-Instance Migration
Move memories between MyClaw instances:
"Export memory bundle" → memory/export-2026-03-28.json
"Import memory bundle" → merges with existing (newer wins)
"Export only procedures" → selective layer export
Portable JSON bundle format with full metadata, conflict resolution, and pre-import backup. Perfect for users managing multiple MyClaw instances or upgrading to a new server.
🔮 Dream Insights
After each cycle, 1–3 non-obvious observations:
- Pattern connections — "Project X's strategy mirrors what worked for Project Y"
- Temporal trends — "Strategic decisions cluster on Mondays — weekly planning detected"
- Gap detection — "No lessons recorded for last 4 projects — retrospectives overdue"
- Trend alerts — "Health declining 3 cycles: 85→79→72 — stale entries accumulating"
- Density analysis — "mem_042 referenced by 8 entries but has no outbound links"
Quick Start
Install
Via ClawHub (recommended):
clawhub install openclaw-auto-dream
Via your MyClaw agent (easiest):
Just tell your agent: "Install Auto-Dream" — it handles everything.
Manual:
git clone https://github.com/LeoYeAI/openclaw-auto-dream.git \
~/.openclaw/workspace/skills/openclaw-auto-dream
Setup
Tell your agent: "Set up Auto-Dream"
The agent will:
1. Create a cron job (default: daily at 4 AM in your timezone)
2. Initialize memory/index.json with v3.0 schema
3. Ask your preferred notification level
4. Run the first dream cycle
Manual Trigger
- "Run memory maintenance"
- "Consolidate my memories"
- "Dream now"
Dashboard
- "Show memory dashboard"
- "Generate memory dashboard"
Dream Report Example
## 🌀 Dream Report — 2026-03-28 04:00 UTC
📊 Stats
- Scanned: 7 files | New: 5 | Updated: 3 | Pruned: 1
- MEMORY.md: 142 lines | Episodes: 2 | Procedures: 8 entries
🧠 Health: 76/100
- Freshness: 72% | Coverage: 80% | Coherence: 55% | Efficiency: 90% | Reachability: 40%
🔮 Insights
- [Pattern] MyClaw growth trajectory mirrors early Shopify — consider their Series A playbook
- [Gap] No episode file for infrastructure migration — 12 related entries scattered across daily logs
📝 Changes
- [New] mem_089 — Product roadmap decision: prioritize mobile SDK
- [Updated] mem_042 — Team headcount updated: 30 → 35
- [Archived] mem_015 — Old staging API endpoint (superseded 95 days ago)
💡 Suggestions
- Coherence at 55% — link mem_089 to related project entries
- Reachability at 0.40 — 3 isolated memory clusters detected; add cross-references
Safety
| Rule | Why |
|------|-----|
| Never delete daily logs | Immutable source of truth |
| Never remove ⚠️ PERMANENT | User protection is absolute |
| Episodes are append-only | Narrative history preserved forever |
| Auto-backup on >30% change | Prevents accidental corruption |
| Index backup every cycle | Always recoverable |
| Secrets policy | Only consolidates secrets already present |
Release Notes
v4.0.0 — Intelligent Dream UX (2026-03-30)
🌟 Dream cycles that feel alive
- Skip-with-Recall: When no new content, surfaces an old memory reminder + streak count instead of empty skip
- Cumulative Growth Metrics: Notifications show "142 → 145 entries (+2.1%)" + dream streak
- Stale Thread Detection: Scans Open Threads for items >14 days untouched, surfaces top 3 in notification
- Milestone Celebrations: Triggers at 1st/7th/30th dream, 100/200/500 entries
- Weekly Summary: On Sundays, generates week-over-week growth and biggest memories
- Auto-Refresh Dashboard: Regenerates
dashboard.htmleach dream cycle - Emotional Anchor (First Dream): Personalized reflection paragraph for deeper connection
v3.6.0 — First Dream AHA Moment (2026-03-30)
- Instant First Dream: Post-install scan runs immediately — no 24h wait
- Before/After Comparison: Shows memory state change in real-time
- Empty instance handling: Works even with zero daily logs
- New reference:
first-dream-prompt.mdfor post-install experience
v3.5.0 — English Rewrite (2026-03-30)
- Full SKILL.md rewritten to English for international audience
v3.4.0 — Dashboard Redesign (2026-03-29)
- Chinese-native dashboard: Complete UI redesign with mobile responsive layout
- Placeholder system: Template uses
__DREAM_DATA_PLACEHOLDER__for dynamic data injection
v3.3.0 — Framework Fix (2026-03-29)
🔧 First successful dream cycle
- Initialized memory infrastructure: Created all missing files (index.json, dream-log.md, procedures.md, archive.md)
- Simplified dream prompt:
dream-prompt-lite.mdrewritten to 1188 bytes for reliable cold-start - Slimmed SKILL.md: Removed overengineering, focused on practical execution
- Increased timeout: 300s → 600s for complex first runs
- 3-day scan range: Daily incremental runs process only recent unconsolidated logs
v3.2.1 — Security & LCM Fix (2026-03-29)
- LCM detect-only mode: No longer auto-installs plugins; prompts user instead
- ClawHub security flag resolved: Removed auto-install commands that triggered scanner
- Sensitive data policy: Renamed from "Secrets policy" to avoid false positives
v3.2.0 — Performance Optimization (2026-03-29)
⚡ ~90% token savings on idle days
- Smart Skip: Dream cycle now checks for unconsolidated daily logs first. If nothing new in 7 days → instant exit (~2K tokens vs ~150K)
- Lite Prompt: Self-contained 97-line prompt replaces 928 lines across 3 files. Scoring formulas, templates, and all rules inlined
- Faster Execution: Cron reads 1 file instead of 3. Timeout reduced 600s → 300s
- Full prompt preserved:
dream-prompt.md(311 lines) kept for manual deep runs and debugging
v3.1.1 — Language & Stability (2026-03-28)
- User language support: Dream notifications/reports auto-detect language from
USER.md - Notification redesign: Uses cron
delivery:announceinstead of direct message tool calls - 7 bug fixes: Scoring normalization, health formula, dashboard compatibility, reference integrity
v3.0.0 — Cognitive Architecture (2026-03-28)
🧠 Major release — full cognitive memory system
- Push Notifications: 3 levels (silent/summary/full) auto-sent after dream cycle
- Memory Health Dashboard: 18KB single-file HTML with Canvas charts and force-directed knowledge graph
- Cross-Instance Migration: JSON bundle export/import with conflict resolution
- Dream Insights: 1-3 non-obvious pattern observations per cycle
- Reachability Graph: Union-find algorithm measuring memory connectivity
- 5-metric health formula: freshness × coverage × coherence × efficiency × reachability
v2.0.0 — Multi-Layer Memory (2026-03-28)
- Five memory layers: Working (LCM) → Episodic → Long-term → Procedural → Index
- Three-phase dream cycle: Collect → Consolidate → Evaluate
- Importance scoring: base_weight × recency × reference_boost with forgetting curve
- Memory index:
index.jsonwith IDs, timestamps, relations, reference counts - User markers: ⚠️ PERMANENT, 🔥 HIGH, 📌 PIN, ``
v1.0.0 — Initial Release (2026-03-28)
- Basic daily log scanning and MEMORY.md consolidation
- Semantic deduplication
- 90-day archival for unreferenced entries
- Cron-triggered isolated session execution
Upgrading
| From | To | Guide | |------|----|-------| | v1.x | v2.x | migration-v1-to-v2.md | | v2.x | v3.0 | migration-v2-to-v3.md | | v1.x | v3.0 | migration-v2-to-v3.md (includes direct path) |
All upgrades are non-destructive. Your data is always preserved.
How It Works Under the Hood
Auto-Dream leverages OpenClaw's native primitives — the same infrastructure that powers every MyClaw instance:
| Primitive | Role | |-----------|------| | Cron | Schedules dream cycles at configurable intervals | | Isolated Sessions | Runs consolidation without polluting main chat history | | File System | Reads/writes memory files across all five layers | | LCM | Provides working memory compression for long conversations |
No external dependencies. No API keys. No databases. Just files and intelligence.
---
About MyClaw.ai
|
MyClaw.ai is the AI personal assistant platform that gives every user a dedicated server running OpenClaw — with full code control, unrestricted internet, cron jobs, and a growing ecosystem of installable skills. The fastest-growing AI agent platform. Your OpenClaw, ready for you. Run instantly. Cancel anytime. 🌐 myclaw.ai · 🐦 @MyClaw_Official · 💬 r/myclaw |
License
---
"The brain doesn't stop working when you sleep. It starts its most important work."