AI Marathon Coach Grounded in 90 Days of Actual Training Data
Built a coaching platform that reasons over real Garmin training and recovery history, not generic templates, pairing a deterministic safety-first rules engine with a multi-turn AI coach and a Whoop/Oura-style data dashboard.
The Problem
Generic marathon training plans are static artifacts that do not adapt to current readiness, recovery, or long-run recency.
Data-heavy platforms can show ATL, CTL, and TSB trends, but athletes still need to interpret those signals and translate them into concrete next-step training decisions.
For marathon preparation, guidance had to reflect the last 90 days of actual workload rather than assumptions about the athlete's baseline fitness, and a coaching tool can never let an LLM make a safety call on its own.
The Approach
Integrated Garmin Connect to ingest activity history, heart rate, and daily wellness (sleep, HRV, resting HR, body battery, stress, readiness) on a scheduled poller plus an on-demand "force sync," with a sync-status panel surfacing freshness and failures.
Made the recommendation deterministic: a guardrail rules engine owns the call (proceed / reduce / swap to recovery / rest), and the LLM only narrates it. The model never decides a safety outcome.
Built a Whoop/Oura-style dashboard around endurance-critical signals: 12-week weekly volume and training load with an acute:chronic workload (ACWR) status pill, aerobic-efficiency drift, a training-consistency calendar heatmap with run-log drill-down, and recovery trends for sleep, HRV/resting HR, and readiness.
Computed training load (TRIMP) at read time so CSV imports and Garmin-polled activities share one formula, with no source-dependent drift, and no silently-zeroed load.
Implemented a multi-turn AI coaching interface that passes the previous 90 days of Garmin data as grounded context to Claude via the Anthropic API (with Bedrock failover), with a prompt that forbids inventing any mileage or pace not in the data.
The Impact
- Authenticated product ingests real Garmin data (activity, heart rate, and daily wellness) on a scheduled poller plus on-demand sync, then grounds every recommendation in the athlete's last 90 days
- A deterministic rules engine owns every recommendation while the LLM only explains it, so safety calls are never delegated to the model
- A glanceable data dashboard turns raw history into trends (weekly load with an ACWR pill, aerobic-efficiency drift, a consistency heatmap, and recovery panels), each degrading gracefully when a signal is missing
- Surfaces trend-level signals (e.g. unintended intensity drift despite stable weekly mileage) rather than generic plan templates
- A public no-login demo runs the coaching interface against a realistic sample athlete, so anyone can try it without connecting an account
- Same exposure-safety controls as the finance tool: a hard daily cost ceiling, per-session rate caps, and a default-off kill switch
Related
Marathon Coach
Visualize training load, mileage, and HR zones, and chat with a coach grounded in your real data.
Coach me
See today’s training recommendation against a sample athlete.
Building an AI Marathon Coach: Deterministic Rules, LLM Narratives, and the 2026 NYC Marathon
How I built a personal AI coaching system for marathon training, layering deterministic guardrails over an LLM narrative engine, ingesting Garmin FIT files, and designing for my own injury history.
Wiring Garmin Into My Marathon Coach: A Live Data Integration Without an Official API
How I replaced manual CSV exports with a live Garmin data feed for my AI marathon coach: a scheduled unofficial-API poller, resilient session handling, and the design calls that keep training and recovery data fresh and trustworthy.
A One-Day Security Baseline for a Solo Fleet
You cannot out-staff a security team when you are the whole team. But the failures that actually end a solo operation are a short, known list, and each has a cheap defense you set up once. Here is the catastrophic floor I stood up in an afternoon.
Building an AI-Native Platform: A Retrospective
A year of building and operating a small fleet of finance and content products almost entirely through an AI coding agent. What worked, what was hard, the honest failures (including a flagship signal that measured nothing and an edge that vanished net of costs), and the lessons that transfer.