hermes - ✅(Solved) Fix 🌙 feat: Dreaming — Automatic Background Memory Consolidation [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#25309Fetched 2026-05-14 03:47:26
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Participants
Timeline (top)
labeled ×6cross-referenced ×1

Add a Dreaming system that automatically consolidates short-term conversation memories into long-term memory during quiet hours, inspired by biological sleep cycles and OpenClaw's Dreaming process.

Root Cause

Add a Dreaming system that automatically consolidates short-term conversation memories into long-term memory during quiet hours, inspired by biological sleep cycles and OpenClaw's Dreaming process.

Fix Action

Fixed

PR fix notes

PR #25314: feat(dreaming): add background memory consolidation plugin

Description (problem / solution / changelog)

🌙 Dreaming — Automatic Background Memory Consolidation

Implements a 3-phase background memory consolidation system inspired by biological sleep cycles and OpenClaw's Dreaming process.

Closes #25309

Phases

PhaseWhat it doesWrites to memory?
Light SleepScans recent sessions, deduplicates, stages candidatesNo
REM SleepExtracts themes/patterns, produces Dream Diary entryNo (DREAMS.md)
Deep SleepScores and promotes to MEMORY.mdYes

Scoring (weighted 0-1)

  • Relevance 30%, Frequency 24%, Query diversity 15%, Recency 15%, Consolidation 10%, Conceptual richness 6%

Features

  • Cron-scheduled (default: 3 AM daily), respects user activity
  • Configurable thresholds, lookback, and frequency
  • Dream Diary in DREAMS.md
  • CLI: hermes dream run, hermes dream status, hermes dream diary
  • Opt-in, disabled by default

Files

  • plugins/dreaming/init.py — main engine
  • plugins/dreaming/cli.py — CLI commands
  • plugins/dreaming/tools.py — tool schemas
  • plugins/dreaming/plugin.yaml — plugin metadata

Changed files

  • plugins/dreaming/__init__.py (added, +731/-0)
  • plugins/dreaming/cli.py (added, +168/-0)
  • plugins/dreaming/plugin.yaml (added, +8/-0)
  • plugins/dreaming/tools.py (added, +106/-0)

Code Example

plugins:
  entries:
    dreaming:
      config:
        enabled: false           # opt-in
        frequency: "0 3 * * *"  # cron schedule
        quiet_minutes: 60        # skip if user active within N minutes
        model: null              # null = default model (for future LLM-based REM)
        max_candidates: 50       # max candidates per cycle
        promotion_threshold: 0.6 # min score to promote
        min_recall_count: 2      # min frequency to promote
        lookback_days: 7         # how many days of sessions to scan
        dream_diary_path: null   # null = ~/.hermes/DREAMS.md
RAW_BUFFERClick to expand / collapse

🌙 feat: Dreaming — Automatic Background Memory Consolidation

Summary

Add a Dreaming system that automatically consolidates short-term conversation memories into long-term memory during quiet hours, inspired by biological sleep cycles and OpenClaw's Dreaming process.

Motivation

Hermes already has memory nudges, session search, and FTS5 indexing — but memory consolidation is manual and ad-hoc. The agent has no built-in way to:

  • Automatically review recent conversations during idle time
  • Score and promote important memories to MEMORY.md
  • Reflect on patterns and themes across sessions
  • Maintain a human-readable "Dream Diary" of insights

This means valuable context from past conversations is often lost unless the user or agent explicitly saves it. A dreaming system closes this gap.

Proposed Design

A new plugins/dreaming/ plugin that runs a 3-phase consolidation cycle via cron:

PhaseWhat it doesWrites to memory?
Light SleepScans recent session transcripts, deduplicates, stages candidate memoriesNo
REM SleepExtracts recurring themes, patterns, and produces a narrative dream diary entryNo (DREAMS.md only)
Deep SleepScores candidates (relevance, frequency, recency, diversity, richness, dedup), promotes high-scoring entries to MEMORY.mdYes

Scoring system (weighted, 0–1 scale):

  • Relevance (30%): meaningful keyword density
  • Frequency (24%): how often the topic appears
  • Query diversity (15%): appears across multiple sessions
  • Recency (15%): newer = higher score
  • Consolidation (10%): penalize if already in MEMORY.md
  • Conceptual richness (6%): longer, more detailed = richer

Key behaviors:

  • Opt-in, disabled by default — users must explicitly enable it
  • Respects user activity — skips if user was active within quiet_minutes (default: 60 min)
  • Configurable schedule — cron expression, default 0 3 * * * (3 AM daily)
  • Dream Diary — human-readable consolidation log in DREAMS.md
  • CLI commandshermes dream run, hermes dream status, hermes dream diary

Config Schema

plugins:
  entries:
    dreaming:
      config:
        enabled: false           # opt-in
        frequency: "0 3 * * *"  # cron schedule
        quiet_minutes: 60        # skip if user active within N minutes
        model: null              # null = default model (for future LLM-based REM)
        max_candidates: 50       # max candidates per cycle
        promotion_threshold: 0.6 # min score to promote
        min_recall_count: 2      # min frequency to promote
        lookback_days: 7         # how many days of sessions to scan
        dream_diary_path: null   # null = ~/.hermes/DREAMS.md

Implementation

I've built a working proof-of-concept in a local branch with:

  • plugins/dreaming/__init__.py — main engine (Light/REM/Deep phases)
  • plugins/dreaming/cli.py — CLI commands
  • plugins/dreaming/tools.py — tool schemas for cron-triggered LLM calls
  • plugins/dreaming/plugin.yaml — plugin metadata

Inspiration

  • OpenClaw's Dreaming process (PR openclaw/openclaw#19685)
  • Human memory consolidation during sleep (hippocampus → neocortex transfer)
  • Hermes' existing cron + session store infrastructure

Open Questions

  1. Should the REM phase use an LLM call for richer reflections, or is the rule-based approach sufficient for v1?
  2. Should dreaming be a built-in plugin or a user-installed one?
  3. Any concerns about the scoring weights or thresholds?

Would love to hear if this aligns with the Hermes vision. Happy to iterate on the design and submit a PR if there's interest.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING