Back to Blog
Features6 min read

Agent Dreaming: How Your AI Agents Learn While They Sleep

By Bot It Out Team

Your agents talk to dozens of people every day. They handle customer questions, negotiate deals, debug code, and draft content. But without a way to consolidate those experiences, every conversation starts from scratch.

That's the problem Dreaming solves.

What Is Agent Dreaming?

Dreaming is inspired by how human brains work during sleep. When you sleep, your brain replays the day's experiences, decides what's worth keeping, and weaves important observations into long-term memory. You wake up with insights you didn't consciously realize.

OpenClaw's REM (Reflective Experience Memory) does the same thing for your AI agents. After conversations end, the system:

  1. **Records session transcripts** into a corpus (the "experiences")
  2. **Promotes valuable observations** from short-term to long-term memory
  3. **Writes dream diaries** — reflective summaries that synthesize patterns across multiple sessions
  4. **Extracts deep insights** — higher-level knowledge distilled from accumulated dreams

A Practical Example

Imagine your Sales Agency agent talks to 15 prospects this week. Without dreaming, each conversation is isolated. The agent might ask the same qualifying questions, miss patterns in objections, and forget that a particular pitch angle worked three times in a row.

With dreaming enabled, after those 15 conversations the agent's memory consolidation kicks in:

  • Short-term promotion: "Prospect mentioned competitor X's pricing is a pain point" gets promoted to long-term memory
  • Dream diary: "This week, 60% of prospects cited integration complexity as their top concern. The 'single API key' pitch resonated strongest with technical buyers."
  • Deep insight: "Enterprise prospects respond better to security-first positioning, while SMB prospects care more about time-to-value"

Next week, the agent starts every conversation with this accumulated wisdom. It didn't need to be explicitly trained — it learned from experience.

How It Works Under the Hood

Dreaming uses the memory-core plugin in OpenClaw:

  • Session corpus is stored in `.dreams/session-corpus/` — raw records of past conversations
  • MEMORY.md holds long-term persistent knowledge — the "facts" your agent knows
  • DREAMS.md contains reflective summaries — the "wisdom" extracted from experience
  • Promotion scoring ranks which short-term observations deserve long-term storage based on frequency, relevance, and novelty

The CLI gives you visibility into the process:

  • `openclaw memory promote` — see what's being promoted and why
  • `openclaw memory promote-explain` — understand the scoring logic
  • `openclaw memory rem-harness` — preview what the next dream cycle would produce
  • `openclaw memory rem-backfill` — retroactively generate dream entries from historical sessions

Dreaming vs. Active Memory

These are complementary, not competing:

FeatureActive MemoryDreaming (memory-core)
When it runsDuring conversations (real-time)Between conversations (background)
What it doesSearches past context before replyingConsolidates experiences into knowledge
AnalogyLooking something up in your notesSleeping on a problem and waking up with the answer
Best forRecalling specific facts and preferencesBuilding expertise over time

The ideal setup is both: Active Memory for real-time recall, and Dreaming for background learning. Currently they use the same plugin slot in OpenClaw, but future versions may allow running both simultaneously.

When to Use Dreaming

Dreaming is most valuable when your agents:

  • Have repeated interactions with similar types of users or problems
  • Need to improve over time without manual retraining
  • Handle complex domains where patterns emerge gradually
  • Operate autonomously and you want them to get smarter without your intervention

If your agent just answers FAQ-style questions from documentation, dreaming adds less value. But if your agent negotiates, advises, creates, or solves novel problems — dreaming is where the magic happens.

Getting Started

Dreaming is part of the memory-core plugin in OpenClaw. From your Bot It Out dashboard, go to your instance's Agents tab and look for the Memory & Context section. The memory-core plugin can be configured as your memory backend to enable REM-based consolidation.

For the best experience, combine it with a good embedding provider (for semantic search) and give your agents enough conversation volume to have meaningful experiences to consolidate.

Your agents don't just respond. They learn.

Ready to deploy your AI agent?

Get started free for 30 days.

Start Free