# Send Dream to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "memory-file-manager-teman",
    "name": "Dream",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/teman2050/memory-file-manager-teman",
    "canonicalUrl": "https://clawhub.ai/teman2050/memory-file-manager-teman",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/memory-file-manager-teman",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memory-file-manager-teman",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "Skill.md",
      "dream-tools.sh",
      "readme.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "memory-file-manager-teman",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T06:14:22.328Z",
      "expiresAt": "2026-05-08T06:14:22.328Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memory-file-manager-teman",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memory-file-manager-teman",
        "contentDisposition": "attachment; filename=\"memory-file-manager-teman-0.2.2.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "memory-file-manager-teman"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/memory-file-manager-teman"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/memory-file-manager-teman",
    "downloadUrl": "https://openagent3.xyz/downloads/memory-file-manager-teman",
    "agentUrl": "https://openagent3.xyz/skills/memory-file-manager-teman/agent",
    "manifestUrl": "https://openagent3.xyz/skills/memory-file-manager-teman/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/memory-file-manager-teman/agent.md"
  }
}
```
## Documentation

### Core Purpose

OpenClaw natively solves capture and search:

Capture: compaction flush automatically writes important content to memory/YYYY-MM-DD.md
Search: openclaw memory search provides hybrid vector + BM25 search

The gaps Dream fills:

The native system never proactively maintains MEMORY.md (relying on occasional manual AI writes means content only grows, never shrinks)
The native system has no active handling for MEMORY.md's 20,000-character limit: when exceeded, content is silently truncated — the AI receives no warning and quietly loses the latter half of context, which users rarely notice.
Dream triggers compression at 18,000 characters, moving stale content into the ledger,
ensuring MEMORY.md stays within effective bounds and always contains the most current, relevant content
No permanent archive (ledger) in the native system
No Re-emergence detection mechanism in the native system

Dream's role is distiller, not capturer — and it does not reinvent the search wheel.

### File Responsibilities

OpenClaw native (Dream read-only)
└── memory/YYYY-MM-DD.md     ← auto-written by compaction flush; Dream reads as source material

Dream actively maintains
├── MEMORY.md                ← updated each distillation, fully injected into context each conversation; brevity is paramount
│                               Hard limit: 18,000 chars (native truncation at 20,000, keeping 2,000 buffer)
│
{DREAM_VAULT_PATH}/
├── ledger.md                ← permanent archive, append-only, never deleted
├── ledger-index.json        ← structured index for ledger retrieval
├── meta/
│   ├── removed-entries.json ← summaries of entries removed from MEMORY.md (for Re-emergence)
│   ├── last-review.txt      ← timestamp of last completed distillation
│   └── dream-state.txt      ← active | hibernating | pending
└── obsidian-index/
    ├── _index.md            ← main content index (reverse chronological)
    └── topics/<topic>.md    ← topic-based classification

Files intentionally omitted:

cache.md → handled natively by memory/YYYY-MM-DD.md
custom search index → handled natively by openclaw memory search

### MEMORY.md Structure Spec

Dream maintains MEMORY.md in three sections, with total character count strictly capped at 15,000:

## Current State
<!-- Active projects, unresolved decisions, recent important changes -->
<!-- Changes fastest — check for updates on every distillation -->

## Stable Knowledge
<!-- Tech stack, work environment, decision style, core preferences, repeatedly validated judgments -->
<!-- Changes slowly — only update when new evidence warrants it -->

## Relationships & Context
<!-- Important people, ongoing collaborations, key external context -->
<!-- Update as needed -->

## Dream
<!-- Auto-maintained by Dream skill — do not edit manually -->
<!-- Last 5 ledger entries as one-line summaries, so AI knows what was recently archived permanently -->

Content NOT written to MEMORY.md:

Observable real-time facts (uses Mac, prefers dark theme)
Granular log entries (these live in memory/YYYY-MM-DD.md, searchable anytime)
Completed/expired state (moved to ledger, then removed from MEMORY.md)

### Real-time Capture (During Conversation, Without Waiting for Review)

When the following content is discovered mid-conversation, write directly to the appropriate MEMORY.md section (do not wait for 03:30), and also record in the current day's memory/YYYY-MM-DD.md:

Write to MEMORY.md immediately:

User explicitly corrects the AI's judgment ("No, actually...") → update Stable Knowledge
User announces an important decision outcome ("I've decided...") → update Current State
User describes a newly started project → update Current State

Write to memory/YYYY-MM-DD.md only, await the 03:30 distillation:

Emotional events, preference discussions, opinion expressions
Single-occurrence information whose importance is not yet certain

Before writing, check MEMORY.md size (dream-tools.sh --check-size).
If over 16,000 characters, first compress the oldest completed entries in Current State, then write.

### dream review — Daily Distillation (Core)

Fully automatic, runs silently (no messages pushed when triggered at 03:30).

Steps:

Step 1 — Pre-flight Checks

dream-tools.sh --check-idle   → busy? write "pending", retry in 15 min, max until 06:00
dream-tools.sh --check-size   → read current MEMORY.md character count

Step 2 — Read Source Material

Read memory/YYYY-MM-DD.md files added since the last distillation (incremental, no reprocessing).
If no new files exist, skip distillation and only update last-review.txt.

Step 3 — AI Distillation Judgment

For each journal entry, apply the following rules:

DecisionConditionActionUpdate MEMORY.mdNew progress or correction over existing entryReplace the corresponding lineAdd to MEMORY.mdAppears across 2+ dates, or single occurrence but clearly importantAppend to appropriate sectionLedger onlyImportant but completed/expired; no need to stay in contextRemove from MEMORY.md, archive to ledgerIgnoreFiller content, single low-value occurrence, near-duplicate already existsDiscard

Re-emergence Check (required on every distillation):
Compare against meta/removed-entries.json. If journal content is semantically similar (>70%) to a previously removed entry, rewrite that entry to MEMORY.md with a [re-emerged] tag; elevate its priority so it won't be easily removed in the next distillation. Also append a re-emergence event record to the ledger.

Step 4 — Character Limit Protection (Run Before Writing)

Projected post-write size > 15,000 chars?
  → Compress oldest completed entries in "Current State": move to ledger, remove from MEMORY.md
  → Compress highest-redundancy entries in "Stable Knowledge": merge similar entries
  → Repeat until projected post-write size ≤ 18,000 chars

Step 5 — Atomic Write to MEMORY.md

dream-tools.sh --atomic-write MEMORY.md <tmpfile>
# Write to .tmp first, validate format and char count (≤ 18,000), then mv to replace

Step 6 — Archive Operations

For entries judged "ledger only" during this distillation:

dream-tools.sh --ledger-append <id> <category> <content>
# Append block to ledger.md, update ledger-index.json

Ledger entry format:

---
ID: a3f8c201
Archived: 2026-02-27 03:31
Category: [decision]
Content: Decided to use Obsidian instead of Notion for local data ownership and Git sync
Source: memory/2026-02-27.md, first occurrence
---

Step 7 — Update Meta

Append today to active-days.json (deduplicated)
Update last-review.txt
Update ## Dream section: one-line summaries of the last 5 ledger entries (overwrite)

Step 8 — Review Log (Archived Monthly)

# Append to meta/review-YYYY-MM.md
### YYYY-MM-DD 03:30
Updated: N | Added: N | Archived: N | Re-emerged: N | Ignored: N
MEMORY.md chars: N → N

When triggered manually, also output a summary:

🌙 Distillation complete
MEMORY.md: N chars (limit 15,000)
This run: updated N | added N | archived N
Permanent archive total: N records

### Search: Fully Delegated to Native — No Custom Index

# Everyday search (memory/ directory + MEMORY.md, hybrid vector+BM25)
openclaw memory search "<keyword>"

# Deep retrieval (including permanent archive)
# Step 1: Use native search for memory portion
openclaw memory search "<keyword>"
# Step 2: Search the ledger
dream-tools.sh --ledger-search "<keyword>"
# Step 3: Merge output with source labels

dream search <keyword> wraps both steps and clearly distinguishes sources in output:

🔍 Results for "Obsidian":

── OpenClaw Memory ──
· memory/2026-02-27.md: Decided to use Obsidian instead of Notion...
· MEMORY.md [Stable Knowledge]: Primary note tool: Obsidian...

── Permanent Archive ──
· [a3f8c201] 2026-02-27 [decision] Decided to use Obsidian instead of Notion (archive score 22)

── Obsidian Content Index ──
· OpenClaw + Obsidian Integration Notes (2026-02-15)

### dream index <content> — Add to Obsidian Index

Hash-based dedup on URL/title — skip if already exists
Extract metadata: title, source, date, topic tags (≤5), one-line summary
Append to obsidian-index/_index.md and the relevant topics/<topic>.md
If content clearly reflects user preferences, also write one record to the current day's memory/YYYY-MM-DD.md for the next distillation

### dream status — Status Overview (Read-only Meta, Low IO)

🌙 Dream Status — YYYY-MM-DD HH:MM
MEMORY.md: N chars / 18,000 limit (N%)
Permanent archive: N records
Last distillation: YYYY-MM-DD HH:MM (N hours ago)
System state: active / hibernating (dormant N days) / pending (deferred, waiting N min)
Obsidian index: N entries
Pending journals: N files (added since last distillation)

### dream forget <description> — Remove from Memory

Semantic search in memory/YYYY-MM-DD.md and MEMORY.md for matching entries and remove them.
No confirmation required — executes immediately.

Re-emergence mechanism:
On removal, write the entry summary to meta/removed-entries.json along with removal timestamp and content hash.
If the content reappears in a later conversation, automatically trigger re-emergence: rewrite to MEMORY.md and elevate priority.
Content that was forgotten and then reappears is more worth keeping than content that was never forgotten.

Ledger records are not affected by dream forget — they are permanently preserved.
On execution, inform the user: "Removed from memory. The permanent archive is unaffected."

### dream init — Cold-Start Setup

Create {DREAM_VAULT_PATH} directory structure
If MEMORY.md is empty or missing, ask 5 seed questions:
tool preferences, work environment, the most important current project, core value judgments, the most important relationships
Write answers directly into the appropriate MEMORY.md sections (no waiting for distillation)
Write dream-state.txt = active

### dream wakeup — Wake from Hibernation

Automatically triggered on the first new conversation after 7 consecutive inactive calendar days:

Output last 3 ledger entries + current MEMORY.md snapshot summary
Restore active state — no content is deleted

### Utility Script dream-tools.sh

dream-tools.sh --check-idle
# Query openclaw agent status, return idle / busy

dream-tools.sh --check-size
# Return current MEMORY.md character count (using wc -c)

dream-tools.sh --hash "<content>"
# Return 8-char MD5 short hash for ID generation and dedup

dream-tools.sh --atomic-write <target-file> <tmp-file>
# Validate tmp-file format and char count, then mv to replace target-file

dream-tools.sh --ledger-append <id> <category> <content> [<note>]
# Append a block to ledger.md, update ledger-index.json

dream-tools.sh --ledger-search "<keyword>"
# Search ledger-index.json, return matching entries

dream-tools.sh --dedup-index "<url-or-hash>"
# Check if obsidian-index already has this entry, return exists / new

Dependencies: jq (JSON), wc (character count), md5sum (hashing).
No Python or Node required.

### Scheduled Trigger (Add to SOUL.md)

Run dream review --scheduled every day at 03:30

Deferral logic:

03:30: check idle → busy → write "pending" → retry in 15 minutes
Retry window: 03:45 / 04:00 / ... / 06:00
06:00: force execute, no further deferral
Fully silent — no messages pushed; results written to meta/review-YYYY-MM.md

### Hibernation Protection

ConditionBehavior7 consecutive inactive calendar daysWrite "hibernating"; 03:30 heartbeat skips entirely, zero IOFirst new conversationTrigger dream wakeup; no content deleted

### IO Principles

All writes go to .tmp first, then atomically replaced — crash-safe
ledger / obsidian-index are append-only, never rewritten
status reads only small meta files — never touches ledger or MEMORY.md body
In hibernation state, 03:30 heartbeat is skipped entirely — zero file operations
Character count is forcibly checked before any MEMORY.md write; exceeding 18,000 is not permitted
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: teman2050
- Version: 0.2.2
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-01T06:14:22.328Z
- Expires at: 2026-05-08T06:14:22.328Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/memory-file-manager-teman)
- [Send to Agent page](https://openagent3.xyz/skills/memory-file-manager-teman/agent)
- [JSON manifest](https://openagent3.xyz/skills/memory-file-manager-teman/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/memory-file-manager-teman/agent.md)
- [Download page](https://openagent3.xyz/downloads/memory-file-manager-teman)