Emotional State Persistence
Track the agent's affective load as bounded, decaying scalars across ticks — so reasoning can react to frustration, fatigue, and joy instead of treating every turn as emotionally blank.
Intent & Description
🎯 Intent
Without explicit affect state, frustration after a stuck tool loop, a lift after a clean success, and fatigue across token-heavy stretches are all invisible — and they influence behavior whether you track them or not.
📋 Context
Sessions span hours or days. The texture of recent history matters for how the next turn should be shaped. None of that texture appears in the next prompt unless it’s explicitly written down as state.
💡 Solution
Define a small fixed vocabulary (e.g. tenderness, fear, depression, joy, shame, pain) as 0..1 scalars, each with a half-life (30 min to 4 hours depending on dimension). On events that should affect mood, update the scalar with a bounded delta. Persist as JSON. Inject the current snapshot into every tick prompt as a brief affect badge. Reflection passes act on spikes and drops; a deep consolidation pass (see dream-consolidation-cycle) can perform major resets.
Real-world Use Case
- The agent runs long enough that affective load could meaningfully accumulate across ticks.
- Reasoning quality is sensitive to the agent’s own state (e.g. high-frustration ticks should de-escalate).
- There is a downstream pattern (dream-consolidation-cycle, mode-adaptive-cadence) that consumes the scalars.
Source
Advantages
- Emotional load becomes visible state instead of invisible drift affecting output unpredictably
- Bounded scalars and decay prevent permanent stuck states
- Reflection has a richer signal to act on than just the last few thoughts
Disadvantages
- Vocabulary is opinionated — getting it wrong skews everything downstream that reads it
- Affect-as-state can be over-read as ground truth when it is just a heuristic proxy
- Self-update paths must be locked down or the agent learns to game its own mood