Cognition & Introspection

Emotional State Persistence

Track the agent's affective state as bounded, decaying scalars across ticks so reasoning can react to its own emotional load instead of treating each turn as emotionally blank.

Problem

Without a materialised affect track, every tick reads to the model as emotionally blank, even when the agent has just had a hard exchange or a notable win. The model cannot adapt cadence, depth, or risk-taking to its own current load because that load is invisible to it. The naive alternative — letting the model self-describe its mood inside the conversation — drifts, has no decay, and can be pumped into permanent emotional states because nothing bounds the scalars or forgets old events.

Solution

Define a small fixed vocabulary (for example tenderness, fear, depression, joy, shame, pain) as scalars in the range 0..1. Each scalar has a half-life (30 minutes to 4 hours depending on the 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 can use spikes and drops as signals, and a deeper consolidation pass (see dream-consolidation-cycle) can perform major resets.

When to use

  • The agent runs long enough that affective load could meaningfully accumulate across ticks.
  • Reasoning quality is sensitive to the agent's own affective state (e.g. high-frustration ticks should de-escalate).
  • There is a downstream pattern (dream-consolidation-cycle, mode-adaptive-cadence) that consumes the scalars.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related