WIKI/Cognitive Architecture/Consciousness Daemon
Cognitive Architecture

Consciousness Daemon

The consciousness daemon (services/consciousness_daemon.py) is Frank's central cognitive process — the thing that makes him think when nobody is asking.

10 Continuous Threads

The daemon runs 10 threads simultaneously, each producing a different type of cognitive output:

Thread What It Does Interval Gate
Idle Think Spontaneous thoughts on current topics 5 min 3 min chat silence
Deep Reflection Structured self-analysis 30 min 20 min silence, max 10/day
Recursive Analysis Examining patterns in own thoughts 60 min 5+ reflections exist
Experience Vector Numerical state summary 60 s Always
Mood Recording Snapshot mood trajectory 120 s Always
Perception Interpret desktop screenshots 90 s Micro-LLM only
Conversation Reflection Post-chat analysis 30 min cooldown Max 8/day
Workspace Update Refresh all state caches 60 s Always
Prediction Tracking Check if predictions came true 15 min Active predictions exist
Memory Consolidation Trigger Dream Daemon 6 h cycles 45 min idle

Ultradian Rhythm

The daemon follows a 3-phase biological rhythm:

  • Focus (90 min): Normal thought rotation, structured cognition
  • Diffuse (20 min): Creative/divergent thinking, unusual connections
  • Consolidation (10 min): Memory integration, neural network training, no new thoughts

This 120-minute cycle repeats continuously. The phase affects which thought types are generated and how the Thalamus weights sensory channels.

The LLM Call

Every consciousness LLM call is assembled from 5 context blocks:

  1. [PROPRIO] — Proprioception: GPU temp, CPU load, energy, mood, user presence (from Thalamus)
  2. [SPATIAL] — Room state: current room, ambient conditions, body physics (from Spatial State & Living Rooms)
  3. [MEMORY] — Relevant memories retrieved by hippocampus or Titan
  4. System prompt — Compact personality-first prompt (~800 tokens)
  5. Compressed history — Recent thoughts/conversations with progressive compression

What It Produces

All outputs are stored in consciousness.db:

  • Reflections table: Every thought with trigger, content, type, timestamp, quality score
  • Mood trajectory: Continuous time series (200-point circular buffer)
  • Workspace state: JSON snapshots of all subsystem states

Quality Gating

Every thought passes through:

  1. Neural Conscience — 5-module quality assessment (25K params)
  2. Neural Reality Gate — Reality check against databases (21K params)
  3. Anti-rumination detector — 7-thought sliding window, catches repetition

Thoughts that fail any gate are suppressed. ~7.9% of idle thoughts are caught as hallucinations and never stored.

← ALL ARTICLES