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:
- Existing memory index and contents (the current state)
- The full conversation transcript (the session state)
- 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
| Parameter | Default | Description |
|---|---|---|
AUTODREAM_ENABLED | true | Enable/disable consolidation |
AUTODREAM_INTERVAL | session | Consolidation frequency (session or interval_minutes) |
AUTODREAM_TOKEN_BUDGET | 64000 | Maximum tokens for consolidation context |
AUTODREAM_MODEL | claude-sonnet-4-20250514 | Model used for consolidation |
Triggers
AutoDream runs at:
- Session end -- after the operator disconnects or the session times out
- Context pressure -- when conversation context approaches the model's limit
- Manual invocation -- when the operator runs
/autodreamor 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.