๐ต๏ธ
ANDERSON
The System โ SRE Health Monitor
Every 5 minutes, Anderson checks the heartbeat of the entire Matrix. CPU, RAM, disk, services โ if anything crashes, Anderson auto-restarts it and alerts Neo on WhatsApp.
A Real Alert
Zion crashes at 3 AM โ Anderson detects, fixes, and reports
โฐ
CRON
every 5 minutes
triggers
๐ต๏ธ
ANDERSON
health.py check
โ ๏ธ zion.service = dead!
auto-restart
AUTO-FIX
systemctl restart zion
verify โ is-active โ
alert Neo
๐ฑ WHATSAPP ALERT
๐จ [Anderson] ALERT
zion.service was DEAD
โ restarted โ ACTIVE โ
3:00 AM โ Zion crashes (OOM)
3:05 AM โ Anderson detects
3:05 AM โ Restarted + alert sent
A Real Alert โ Trinity-CLI Edition
Trinity-CLI task fails or hangs โ Anderson catches it within 5 min and alerts Neo
๐ฑ
NEO (WhatsApp)
@trinity-cli loop test
๐ป TRINITY-CLI
claude -p "..." (Opus 4.7)
โ ๏ธ multi-turn loop impossible
writes status='failed'
๐๏ธ trinity_tasks (SQLite)
#391ea62a โ status='failed'
reads
๐ต๏ธ
ANDERSON
health.py โ every 5 min
check_trinity_cli_
failed_tasks()
๐จ 1 failed + 1 stale
๐ฑ WHATSAPP ALERT
๐จ [Anderson]
Trinity-CLI failed task
#391ea62a
+ 1 stale claim > 5 min
โ Neo investigates
DETECTION TYPES:
โ status='failed' (last 24h)
โฐ status='claimed' & claimed_at > 5 min ago (stale/hung)
runner crashed / Opus errored
runner picked it up but never marked done โ likely hung
Everything Anderson Monitors
Anderson is the sun โ checks radiate across the entire system
๐ต๏ธ
ANDERSON
RESOURCES
system vitals
๐ฅ๏ธ CPU usage %
๐ง RAM (24 GB total)
๐พ Disk space
๐ก๏ธ Load average
SERVICES
systemd watchdog
๐๏ธ zion.service
๐ก whatsapp-bridge
๐บ trinity-ws.service
๐
zion-calendar
๐ป trinity-cli tasks
ACTIONS
auto-remediation
๐ Auto-restart dead
๐จ WhatsApp alert
๐ Log to health.db
๐งน nightly cleanup
NETWORK
connectivity checks
๐ TCP :8080 bridge
๐ TCP :8765 WS
๐ก Internet reachable
ALERTS
notification channels
๐ฌ WhatsApp to Neo
๐ health_history.db
๐ journalctl logs
๐ alert mode = verbose
SCHEDULE
cron orchestration
โฑ๏ธ health every 5 min
๐งน cleanup midnight
๐ bridge restart 5 min
๐ stagger cron jobs
Tech Stack
Runtime Python 3 โ cron triggered
Schedule Every 5 minutes (cron)
Checks CPU, RAM, disk, systemd services, TCP ports, Trinity-CLI failed/stale tasks
Actions Auto-restart, WhatsApp alerts, log to SQLite
CLI Watcher check_trinity_cli_failed_tasks() โ detects status='failed' (24h) + stale 'claimed' (>5 min)
Database health_history.db (incident history)
Key File AgentAnderson/health.py
Cost $0 โ cron + Python + systemd