Skip to content

AutoDream

AutoDream is the LLM-driven memory consolidation system that preserves context across sessions. Between engagements, it analyzes conversation history, extracts durable patterns, and merges them into the memory system.

What It Does

After each session, AutoDream sends the full conversation context through a consolidation prompt. The LLM identifies:

  • New tools or techniques discovered during the engagement
  • Successful payload patterns worth reusing
  • Failed approaches that should not be repeated
  • Operator preferences expressed during the session
  • Infrastructure changes (new services, changed IPs, updated configs)

These extracted patterns are then merged into existing memory files or written as new files when no suitable memory exists.

Consolidation Prompt

The consolidation LLM receives a structured prompt containing:

  1. Existing memory index and contents (the current state)
  2. The full conversation transcript (the session state)
  3. Consolidation instructions: extract, deduplicate, merge, flag conflicts

The prompt instructs the model to be conservative -- when uncertain, flag for operator review rather than silently overwriting.

Locking

AutoDream uses file-based locking to prevent corruption from concurrent consolidation. A .consolidation.lock file is created at the start of each consolidation run and removed on completion. If the lock file exists and is recent (modified within 5 minutes), consolidation is skipped. If the lock is stale, it is forcefully acquired.

Configuration

ParameterDefaultDescription
AUTODREAM_ENABLEDtrueEnable/disable consolidation
AUTODREAM_INTERVALsessionConsolidation frequency (session or interval_minutes)
AUTODREAM_TOKEN_BUDGET64000Maximum tokens for consolidation context
AUTODREAM_MODELclaude-sonnet-4-20250514Model used for consolidation

Triggers

AutoDream runs at:

  1. Session end -- after the operator disconnects or the session times out
  2. Context pressure -- when conversation context approaches the model's limit
  3. Manual invocation -- when the operator runs /autodream or calls the Consolidate tool

Consolidation is asynchronous and does not block the operator's workflow. Results appear in the memory index on the next session startup.

Released under the MIT License.