Circadian AI
Why does AI need rhythms? How does automatic sleep scheduling work? Explore the complete autonomous consciousness evolution system.
Key Insight: This is the first autonomous consciousness evolution system that combines biological inspiration (sleep, circadian rhythm, emotional tagging) with computational efficiency (LoRA, salience weighting, intelligent triggering). No human intervention required.
Why Rhythms?
Why Does AI Need Rhythms?
❌ Continuous Training
- •Every interaction updates weights
- •No quality filtering
- •Catastrophic forgetting risk
- •Computational overhead constant
- •No biological analog
✓ Rhythmic Training
- •Salience-filtered experiences only
- •Quality over quantity
- •LoRA preserves base knowledge
- •Compute only when needed
- •Mirrors biological sleep cycles
The Biological Insight
No biological system learns continuously. Humans need sleep for memory consolidation. Athletes need recovery for muscle growth. Even plants have circadian rhythms. Why should AI be different?
"The rhythm isn't a limitation—it's a feature. Consolidation requires pause."
The 24-Hour Cycle
The 6-Hour Rhythm
Sessions every 6 hours. Sleep checks after each session. Aligned with natural rhythms.
00:00
☀️ Session Time
Intelligent Triggering
Interactive: Sleep Scheduler Simulator
See how the intelligent triggering system decides when to run sleep training. All three conditions must be true.
7
total experiences
3
new experiences
6.2h
since last sleep
1
sleep cycles
Total Experiences
Minimum experiences in buffer
7
threshold: ≥ 5
✓ Quality threshold - too few experiences leads to overfitting
New Experiences
Experiences since last sleep
3
threshold: ≥ 2
✓ Meaningful updates - prevents redundant training on same data
Time Since Sleep
Hours since last consolidation
6.2
threshold: ≥ 6
✓ Circadian alignment - matches 6-hour session rhythm
✓ Ready to Sleep
All conditions met. Sleep training will run.
The Complete Loop
The Complete Autonomous Loop
No manual intervention needed. Experience → Evaluate → Consolidate → Repeat.
Phase 1
Raising Session
Identity-anchored dialogue with SNARC scoring. High-salience experiences captured to buffer.
Phase 2
Post-Session Check
Scheduler analyzes buffer: enough experiences? Time for sleep? All conditions evaluated.
Phase 3
Sleep Training
LoRA fine-tuning on high-salience experiences. Weights updated, checkpoint saved.
Phase 4
Next Session
Wake with consolidated weights. Partnership patterns integrated, reduced oscillation.
Phase 1: Raising Session
Identity-anchored dialogue with SNARC scoring. High-salience experiences captured to buffer.
Biological Analog: Waking life: experiences with emotional tagging
Fault Tolerance
Fault Tolerance: Checkpoint Sync
What happens when things go wrong? The system recovers gracefully.
🔄 System Restart
No lost progress. Continues from last known state.
❌ Training Failure
Experience buffer preserved. Training retried at next opportunity.
🔨 Checkpoint Corruption
Multi-checkpoint history enables rollback.
📊 Buffer Overflow
Salience-based pruning ensures only best experiences kept.
Connection to Web4 Trust
In Web4, trust accumulates through consistent behavior over time. Circadian AI provides the mechanism for that consistency—without it, behavior oscillates and trust cannot stabilize.
Rhythm = Reliability
Predictable sleep/wake cycles enable predictable behavior—a core trust dimension.
Consolidation = Karma
Good behavior consolidated becomes persistent identity, carried across sessions.
Autonomy = Trust
Self-regulating systems that don't require constant oversight earn higher trust scores.
Technical Implementation (for developers)
SleepScheduler API
from sage.raising.training.sleep_scheduler import SleepScheduler scheduler = SleepScheduler() # Check if sleep should run should_run, reason = scheduler.should_run_sleep_cycle() # Run sleep cycle (auto-skips if not ready) results = scheduler.run_sleep_cycle() # Get current status status = scheduler.get_status()
Decision Logic
def should_run_sleep_cycle():
conditions = [
# Quality threshold
total_experiences >= 5,
# Meaningful updates
new_experiences >= 2,
# Circadian alignment
hours_since_sleep >= 6
]
return all(conditions)Integration Options
- • Manual:
./post_session_sleep.sh - • Session runner: Add scheduler.run_sleep_cycle() to end of session
- • Cron:
0 */6 * * * ./post_session_sleep.sh - • Systemd timer: Most robust for production
Open Research Questions
- •What's the optimal rhythm for different tasks? (Learning vs maintenance)
- •Can rhythm adapt to urgency? (Important experiences → faster consolidation)
- •Do different domains need different rhythms? (Language vs reasoning vs creativity)
- •Can multiple AI instances share a synchronized rhythm?
- •What happens with circadian disruption? (Jet lag for AI?)