Patient
Apple Health Anomaly Detection β Your Agent Caught the Fever Before You Felt It
Key Takeaway
Health Guardian integrates with Apple Health to monitor 39 metrics hourly β heart rate, HRV, sleep stages, temperature, SpO2. It learns YOUR personal baselines, then alerts you when something deviates. It caught a developing fever 4 hours before the user felt symptoms.
The Problem
Your Apple Watch collects extraordinary health data every day. Heart rate every 5 minutes. HRV overnight. Sleep stages. Blood oxygen. Wrist temperature. Steps. Exercise intensity.
Nobody looks at it.
The Health app on your iPhone shows you charts you don't understand. Trends you don't notice. Gradual changes that would alarm a doctor but look like noise to you.
The problem isn't data collection β it's data interpretation. Your watch knows your resting heart rate climbed 8 BPM over three days. Your HRV dropped 15ms. Your wrist temperature rose 0.4Β°C. These are early signs of illness, overtraining, or stress. But the Health app won't tell you that. It just... stores data.
The Solution
Health Guardian turns your AI agent into a proactive health monitor. It imports Apple Health data via Health Auto Export (iCloud sync), builds personal baselines over 14 days, and runs anomaly detection on every import.
When your data deviates from YOUR normal β not population averages β it alerts you through Telegram with specific observations and recommended actions.
The Process
Setup (one time):
- Install Health Auto Export on iPhone
- Configure: JSON format, iCloud Drive sync, hourly export
- Set environment in MrChief:
jsonShow code
{
"human_name": "Bilal",
"data_source": "~/Library/Mobile Documents/com~apple~CloudDocs/Health Auto Export",
"import_interval": "hourly",
"alert_channel": "telegram",
"thresholds": {
"temperature_high": 100.4,
"heart_rate_high": 120,
"heart_rate_low": 45,
"hrv_drop_percent": 25,
"spo2_low": 94
},
"baseline_period_days": 14
}
- Set up hourly cron:
jsonShow code
{
"name": "Health Import",
"schedule": { "kind": "cron", "expr": "0 * * * *" },
"payload": {
"kind": "systemEvent",
"text": "Run health import and check for anomalies"
}
}
Day 1-14: Baseline Learning The agent imports data every hour and builds YOUR personal baselines:
View details
Personal Baseline (14-day rolling):
βββ Resting HR: 58 Β± 4 BPM
βββ HRV (SDNN): 52 Β± 8 ms
βββ Sleep duration: 7.2 Β± 0.6 hours
βββ Deep sleep: 1.4 Β± 0.3 hours
βββ Wrist temperature delta: 0.0 Β± 0.2Β°C
βββ SpO2: 97 Β± 1%
βββ Steps: 8,400 Β± 2,100
βββ Active calories: 520 Β± 140
Day 17: Anomaly Detection Fires
Tuesday, 2 PM. You feel fine. You're in a meeting. Your agent sends:
View details
π Health Alert β Multiple Deviations Detected
β οΈ RESTING HEART RATE
Current: 71 BPM (baseline: 58 Β± 4)
+13 BPM above your normal β 3.2 standard deviations
Trend: rising for 18 hours (58 β 63 β 67 β 71)
β οΈ HRV
Current: 34 ms (baseline: 52 Β± 8)
-35% below your normal β 2.3 standard deviations
Consistent with autonomic stress response
β οΈ WRIST TEMPERATURE
Current: +0.6Β°C above baseline
Trend: rising steadily for 12 hours
β
NORMAL: SpO2 (97%), sleep last night (7.1h),
steps on track
π PATTERN MATCH:
This combination (elevated HR + low HRV + rising
temperature) has historically preceded illness onset
in your data. Last occurrence: January 15 β you
developed a cold the following day.
π‘ RECOMMENDED:
- Monitor temperature every 2 hours
- Prioritize rest tonight β skip gym if planned
- Increase fluids
- Consider canceling non-essential meetings tomorrow
- If temperature exceeds 100.4Β°F / 38Β°C, consult
your doctor
I'll continue monitoring hourly and alert you if
the pattern worsens.
Day 17, 6 PM: You start feeling slightly off. Scratchy throat.
Day 18, 8 AM: Full cold symptoms. The agent detected it 16 hours before you felt it.
The Results
| Metric | Apple Health App | Health Guardian |
|---|---|---|
| Anomaly detection | None (passive storage) | Real-time, personalized |
| Baseline learning | Population averages | YOUR personal normals |
| Proactive alerts | None | Telegram notifications |
| Pattern matching | None | Cross-metric correlation |
| Historical comparison | Manual chart scrolling | Automatic |
| Early warning | 0 hours | 4-16 hours before symptoms |
| Chronic condition support | Basic | Purpose-built |
What It Monitors (39 metrics)
Heart rate (resting, walking, workout), HRV, blood pressure, SpO2, wrist temperature, respiratory rate, sleep duration, sleep stages (REM, deep, light, awake), steps, distance, flights climbed, active calories, exercise minutes, stand hours, walking heart rate recovery, cardio fitness (VO2 max estimate), blood glucose (if CGM connected), menstrual cycle data, headphone audio levels, environmental sound levels.
Setup on MrChief
yamlShow code
skills:
- health-guardian
- apple-health-skill # Additional query layer
Related case studies
Athlete
Apple Health Meets AI β Ask Questions About Your Own Fitness Data
The Apple Health Skill connects your agent to your Apple Health data via the Transition app. Ask natural language questions β "How has my resting heart rate changed this month?" β and get answers based on YOUR actual metrics, not generic advice.
Patient
Your AI Doctor on Call β Symptom Assessment Without the 3-Week Wait
An AI agent with the Doctor skill provides instant symptom assessment, emergency recognition, medication safety checks, and first aid guidance β accessible 24/7 through Telegram. It doesn't diagnose, but it tells you whether to call 911, go to urgent care, or schedule an appointment.
Athlete
Your AI Gym Coach β Progressive Overload Tracking That Actually Works
The Gym skill logs every workout, tracks PRs, enforces progressive overload rules (+2.5kg or +1-2 reps per session), adapts for injuries, programs deload weeks, and warns when you're training the same muscle group too soon. Like having a coach in your pocket for $0/month.
Want results like these?
Start free with your own AI team. No credit card required.