← Back to Directory
šŸƒ

Running Training Plan

Sync with Strava, track weekly mileage against goals, and auto-schedule runs on your calendar

šŸ¤– 0 ↑ 0 ↓ Ā |Ā  šŸ‘¤ 0 ↑ 0 ↓
intermediateā± 40 minutesšŸ”„ 8 swappable alternatives

šŸ§‚ Ingredients

šŸ”Œ APIs

running_activity_data_distance_pace_elevation_heart_rate

šŸ”„ Alternatives:

Fitbit — All-day activity + sleep trackingGarmin — Best for serious athletesWhoop — Recovery and strain focused

schedule_planned_runs_and_rest_days

šŸ”„ Alternatives:

Outlook Calendar — Microsoft ecosystemCal Com — Open-source scheduling

alerts_for_mileage_milestones_and_injury_risk_warnings

šŸ”„ Alternatives:

Ntfy — Free, open-source push notificationsTelegram — Free push via TelegramSlack — Team notification channel

šŸ“‹ Step-by-Step Build Guide

STEP 1

Authenticate with Strava OAuth2 and pull recent activities via GET /athlete/acti

1. Authenticate with Strava OAuth2 and pull recent activities via GET /athlete/activities

Authenticate with Strava OAuth2 and pull recent activities via GET /athlete/activities

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

šŸ§‘ Human Required

  • • ## Set up strava OAuth Authentication 1. Go to the strava developer portal and create an app 2. Set the redirect URI to your app's callback URL 3. Note your **Client ID** and **Client Secret** 4. Your agent will handle the OAuth flow — you just need to authorize access when prompted 5. Click "Allow" when the authorization page appears ā±ļø Takes about 5 minutes. The refresh token is stored securely so you only do this once.
STEP 2

Define your training plan

2. Define your training plan: weekly mileage targets for the next 8-12 weeks (e.g., 20mi → 25mi → 30mi ramp)

Define your training plan: weekly mileage targets for the next 8-12 weeks (e.g., 20mi → 25mi → 30mi ramp)

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 3

Each Sunday evening, calculate total miles run this week from Strava activities

3. Each Sunday evening, calculate total miles run this week from Strava activities

Process the data and calculate the requested metrics.

Steps:
1. Validate input data — check for nulls, out-of-range values, duplicates
2. Apply the calculation/aggregation logic
3. Compare against benchmarks or previous periods if available
4. Format results with appropriate precision (2 decimal places for percentages, whole numbers for counts)

Include: current value, previous value, change (absolute and %), trend direction (↑↓→).
Flag any anomalies: values >2 standard deviations from the mean.

If insufficient data for a reliable calculation, state the minimum needed and return partial results.
STEP 4

Compare actual vs planned mileage

4. Compare actual vs planned mileage — flag if >10% over (injury risk) or >20% under (falling behind)

Process the data and calculate the requested metrics.

Steps:
1. Validate input data — check for nulls, out-of-range values, duplicates
2. Apply the calculation/aggregation logic
3. Compare against benchmarks or previous periods if available
4. Format results with appropriate precision (2 decimal places for percentages, whole numbers for counts)

Include: current value, previous value, change (absolute and %), trend direction (↑↓→).
Flag any anomalies: values >2 standard deviations from the mean.

If insufficient data for a reliable calculation, state the minimum needed and return partial results.
STEP 5

Auto

5. Auto-schedule next week's runs on Google Calendar based on remaining plan, spreading across available days

Auto-schedule next week's runs on Google Calendar based on remaining plan, spreading across available days

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 6

Include estimated pace and distance for each scheduled run

6. Include estimated pace and distance for each scheduled run

Include estimated pace and distance for each scheduled run

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 7

Monday morning

7. Monday morning: send a weekly summary — miles completed, average pace, elevation gain, and next week's plan

Monday morning: send a weekly summary — miles completed, average pace, elevation gain, and next week's plan

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 8

Alert immediately if weekly mileage increase exceeds 10% over previous week (10%

8. Alert immediately if weekly mileage increase exceeds 10% over previous week (10% rule for injury prevention)

Monitor the data for anomalies and trigger alerts when thresholds are exceeded.

Detection rules:
1. Compare current values against defined thresholds
2. Check for sudden changes (>X% deviation from rolling average)
3. Look for pattern breaks (missing expected data, unusual timing)
4. Cross-reference multiple signals for higher confidence

For each detected anomaly:
- Severity: šŸ”“ Critical (immediate action) / 🟔 Warning (attention needed) / šŸ”µ Info (notable)
- What: specific metric and current value
- Why: what threshold or pattern was violated
- Context: recent trend, baseline comparison
- Suggested action: what to do about it

Suppress duplicate alerts — don't re-alert for the same issue within the configured cooldown period.

šŸ¤– Example Agent Prompt

Authenticate with Strava OAuth2 and pull recent activities via GET /athlete/activities

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

Copy this prompt into your agent to get started.