AI Marathon Coach Grounded in 28 Days of Actual Training Data
Built a coaching platform around real Garmin training and recovery history, pairing a deterministic daily recommendation with a separate conversational 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, the daily recommendation had to reflect recent workload and recovery, with an explicit decision from rules that could be inspected. Conversational coaching needed grounded context without being confused with that deterministic daily decision.
The Approach
Integrated Garmin Connect to ingest activity history, heart rate, and daily wellness (sleep, HRV, resting HR, body battery, stress, readiness), starting with a 90-day activity backfill. A scheduled poller plus an on-demand "force sync" keeps the data current, with a sync-status panel surfacing freshness and failures.
Made the typed daily recommendation deterministic: the pipeline computes metrics from a 28-day activity window and combines them with recovery signals. A guardrail rules engine owns the call (proceed / reduce / swap to recovery / rest), and the LLM narrates that decision.
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 separate multi-turn AI coaching interface using metrics derived from a 28-day activity window, the latest ten activities, and current recovery data. Chat calls the model directly on that constructed context; its conversational answers do not carry the daily recommendation's deterministic guarantee.
The Impact
- Authenticated product ingests real Garmin data through a 90-day initial activity backfill, scheduled polling, and on-demand sync; daily recommendations and chat metrics use a 28-day activity window
- A deterministic rules engine owns the typed daily recommendation while the LLM explains it; conversational chat answers questions separately using the athlete's metrics, latest ten activities, and recovery data
- 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
Evidence
- RepresentativeMarathon Coach - public demo against a sample athlete
Related
Marathon Coach
Visualize training load, mileage, and HR zones, and chat with a coach grounded in your real data.
Coach me
See a training recommendation for a fixed 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.