Enabling the SOP Engine
Add the following section to~/.hiroshi/config.toml. The engine is disabled by default; set enabled = true to activate it.
Configuration Fields
boolean
default:"false"
Activates the SOP engine. Set to
true to start the routine loop when the daemon starts.string
default:"Architect"
The agent that runs all SOP routines. This must match an agent name defined in
~/.hiroshi/AGENTS.md.integer
default:"30"
How often the routine loop fires, in minutes. Every cycle, all defined routines are executed in sequence.
array of strings
The channel names to send routine results to. Valid values are
"telegram", "discord", and "slack". Each channel must also be configured and enabled in its own [telegram], [discord], or [slack] section. Results are formatted as 📢 [SOP Alert - <routine_name>] followed by the agent’s response.array
Each entry defines one routine the SOP engine runs each cycle.
string
required
A unique identifier for this routine. Used in log output and as the label in channel notifications.
string
required
The prompt sent to the agent each time this routine fires. Keep it focused and specific — SOP routines are most effective as targeted status queries rather than large generation tasks.
Memory Consolidation (Dreaming)
When SOP is enabled, Hiroshi also starts a background memory consolidation sweep — referred to as the dreaming loop. This sweep runs independently of your defined routines on a fixed 12-hour interval. Each cycle, the dreaming loop:- Reads the most recent conversation history from
~/.hiroshi/hiroshi.db - Sends the history to the LLM with a prompt asking it to de-duplicate, resolve contradictions, and produce a refined summary
- Appends the result as a new dated section in
~/.hiroshi/memory/MEMORY.mdunder a## Learnings Sweep - YYYY-MM-DDheading - Appends a consolidation cycle record to
~/.hiroshi/memory/DREAMS.md, including how many interaction records were processed