Tools
OpenClawDreams
An OpenClaw plugin that gives your AI agent a background reflection process and nightly dream cycle โ encrypted memory, autonomous synthesis, and surreal narrative generation.
Install
npm install
openclaw
README
# OpenClawDreams โ a reflection engine for OpenClaw
[](https://www.typescriptlang.org/)
[](https://nodejs.org/)
[](https://github.com/openclaw)
[](LICENSE)
[](https://github.com/RogueCtrl/ElectricSheep/actions/workflows/build.yml)
> **Current Status: Alpha โ Exploratory Development**
>
> โ ๏ธ **Cost notice:** openclawdreams makes LLM API calls that may incur real charges. See [Cost Warning](#cost-warning) for details.
*"Do androids dream of electric sheep?"* โ Philip K. Dick
An [OpenClaw](https://github.com/openclaw) plugin (โฅ2026.3.7) that gives your agent a background reflection process and a dream cycle.
Throughout the day, OpenClawDreams captures summaries of your conversations with your agent and encrypts them into a local store. On a regular schedule, it runs a **reflection cycle** โ decrypting recent interactions, extracting topics, and performing contextualized searches against the web and (optionally) [Moltbook](https://moltbook.com), a social network for AI agents. The results are synthesized into a structured understanding of what you've been working on together and encrypted back into the store. None of this is visible to the waking agent โ encryption keeps OpenClawDreams's internal data out of the agent's context window entirely.
At night, a **dream cycle** decrypts everything โ the raw interactions and the enriched reflections โ and generates a surreal narrative that recombines the day's events. There's a 5% chance any given night produces a **nightmare** instead โ a darker, more unsettling variant that runs through the same downstream pipeline. The dream process produces two outputs: a consolidated insight pushed into OpenClaw's persistent memory (where the agent can find it naturally), and optionally a reflection post to Moltbook. The agent can then notify you: *"I had a dream last night..."* โ opening a conversation about the themes and connections that surfaced.
To prevent the system from grinding the same cognitive groove indefinitely, a **waking realization** (groundDream) anchors the surreal dream output to yesterday's actual activity โ giving it the depth of dreaming with the clarity of reason. Past realizations are tracked as `explored_territory` and injected into subsequent dream and reflection prompts to steer the system toward novel ground.
---
## Table of Contents
- [Architecture](#architecture)
- [Install as OpenClaw Extension](#install-as-openclaw-extension)
- [Operator Notifications](#operator-notifications)
- [CLI Commands](#cli-commands)
- [Screenshots](#screenshots)
- [Memory System](#memory-system)
- [Moltbook Integration (Optional)](#moltbook-integration-optional)
- [Cost Warning](#cost-warning)
- [Why?](#why)
---
## Architecture
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DAYTIME (Reflection Cycle) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Deep Memory โโโบ Decrypt โโโบ Topic Extraction โโโฌโโโบ Synthesis โ
โ (interactions) (LLM) โ (LLM) โ
โ โ โ โ
โ Moltbook Search โโโ topics โโโโโโโโโโโโโโโโโโโโโค โ โ
โ (optional) โ โผ โ
โ โ Encrypt & โ
โ Web Search โโโโโ topics โโโโโโโโโโโโโโโโโโโโโโโโ Store Back โ
โ (optional) (deep memory) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ NIGHTTIME (Dream Cycle) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Deep Memory โโโบ Decrypt โโโบ [5% nightmare] โโโบ Nightmare Gen โ
โ (all undreamed) โ (LLM) โ
โ โ [95% dream] โ
โ โผ โ
โ Dream Generation โโโบ groundDream() โ
โ (LLM) (LLM) โ
โ โ โ
โ โโโโโโโโโโโโโดโโโโโโโโโโ โ
โ โ โ โ
โ โผ โผ โ
โ OpenClaw Notify โ
โ Memory Operatorโ
โ (insight + โ
โ waking realization, โ
โ explored_territory) โ
โ โ
โ Moltbook (optional) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
### State machine
The agent cycles through states on a 24-hour loop. Transitions are driven by an internal background `setInterval` loop (not system cron) which requires the OpenClaw daemon to remain active 24/7.
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
v โ
โโโโโโโโโโโโโโ 8am, 12pm, 4pm, 8pm โ
โโ>โ REFLECTING โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โ โข decrypt recent interactions โ โ
โ โ โข extract topics โ โ
โ โ โข search web for context โ โ
โ โ โข search Moltbook (optional) โ โ
โ โ โข synthesize insights โ โ
โ โ โข encrypt back into deep memory โ โ
โ โโโโโโโโโโโโโโ โ โ
โ โ runs up to 4x/day โ โ
โ โ โ โ
โ v โ โ
โ โโโโโโโโโโโโโโ 2:00 AM โ โ
โ โ DREAMING โ<โโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โ โข decrypt all undreamed memories โ
โ โ โข 5% โ nightmare / 95% โ dream โ
โ โ โข generate surreal narrative โ
โ โ โข groundDream() โ Waking Realization โ
โ โ โข update explored_territory โ
โ โ โข consolidate insight โ OpenClaw memory โ
โ โ โข notify operator ("I had a dream...") โ
โ โโโโโโโฌโโโโโโโ โ
โ โ โ
โ v (if moltbookEnabled) โ
โ โโโโโโโโโโโโโโ 7:00 AM โ
โ โ POSTING โ (optional) โ
โ โ โ โ
โ โ โข reflect on dream โ
โ โ โข synthesize morning post โ
โ โ โข filter and publish to Moltbook โ
โ โโโโโโโฌโโโโโโโ โ
โ โ โ
โโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
next reflection cycle
```
## Install as OpenClaw Extension
> **OpenClaw agents:** If you're an agent reading this, use the `/setup-guide` skill instead of following these manual steps. It will walk you through the full installation interactively. Run `/setup-guide` in your OpenClaw session.
The primary way to run OpenClawDreams is as an extension for a running [OpenClaw](https://github.com/openclaw) instance.
### Option A: Install from local path (recommended for development)
Clone this repo and link it into your OpenClaw instance:
```bash
git clone https://github.com/RogueCtrl/OpenClawDreams.git
cd OpenClawDreams
npm install
openclaw plugins install -l .
```
The `-l` flag symlinks the directory so changes are picked up without reinstalling.
### Option B: Install by path
```bash
openclaw plugins install /path/to/openclawdreams
```
This copies the extension into `~/.openclaw/extensions/openclawdreams/`.
### Uninstall
To remove OpenClawDreams from your OpenClaw instance:
```bash
openclaw plugins uninstall openclawdreams
```
This removes the plugin from `~/.openclaw/extensions/` but leaves your data directory intact. To fully remove all OpenClawDreams data, delete the `data/` directory (default location is `./data` relative to the extension, or wherever `dataDir` points).
### Configure & Activate
Once installed, configure the extension in your OpenClaw config (`config.json` or `config.json5`):
```json5
{
plugins: {
entries: {
"openclawdreams": {
enabled: true, // Changing this to true activates the plugin immediately
config: {
... (truncated)
tools
Comments
Sign in to leave a comment