Agents on
the Run
Two hosted agents, one real training dataset — from a single-agent analyst to a four-agent coaching workflow, built with Foundry Toolkit for VS Code.
One workout API, two agents
Both projects read from the same source: health.cpalm.dk — a personal training log with a public JSON API. No auth, two endpoints.
GET /api/workouts
List of recent sessions.
workoutType
startUtc / endUtc
durationSeconds
distanceKm
avgHeartRateBpm
maxHeartRateBpm
isIndoor
GET /api/workouts/{id}
Detail for one session.
activeEnergyKj
zoneBreakdown
splits
route
heartRateSeries
169sessions logged
10activity types
Jan–Aug2026 window
0auth required
Snapshot from workshop testing — the live count grows with every new session.
Workout Analyst
User
→
Agent Server
→
Agent + tools
⇄
health.cpalm.dk
Persona: a knowledgeable, encouraging coach — not a generic chatbot.
Grounding: every claim must come from tool data, never invented.
Tools:
get_workouts(days) and get_workout_detail(id).Always ends with one concrete, actionable suggestion.
How has my training volume looked over the last two weeks?
What was my last run like — what heart rate zones did I spend time in?
Am I balancing cardio and strength training?
Workout Coach
Python step
fetch_workout_data
Calls the live API — no LLM involved
→
Agent
WorkoutDataAgent
Summarizes training, relays the goal
→
Agent
GoalAgent
Extracts target, timeframe, volume
→
Agent
MatchingAgent
Fit score + gaps, evidence-only
→
Agent
CoachAgent
Next-2-weeks training plan
I'm training for Broløbet Storebælt 2027 — a half marathon (21.1 km) across the Great Belt bridge in Denmark, on Saturday, September 4, 2027. That's 53 weeks away. Based on my recent training, how on track am I for this goal, what are my biggest gaps, and what should my next two weeks of training look like?
Real-time data, without the replay bug
A workflow-hosted agent that calls a tool can hit an open Agent Framework bug: a stale tool response gets replayed on the next turn, the Responses API rejects it, and the whole hosted workflow fails permanently — not just that one request.
✗ Breaks the workflow
WorkoutDataAgent = Agent(
tools=[get_workouts],
)
# LLM calls the tool itself —
# hits the replay bug inside
# WorkflowBuilder
✓ Live data, no LLM tool call
@executor
async def fetch_workout_data(...):
data = fetch_recent_workouts_text()
await ctx.send_message(data)
# plain Python step runs first —
# same live data, zero tool-calling
Single agent, or workflow?
| Pattern | Best for | Live data via | Deployed to Foundry |
|---|---|---|---|
| Workout Analyst | Quick, open-ended Q&A about training history | LLM tool calls | Yes |
| Workout Coach | Structured goal-fit analysis + a training plan | Python step before the agent chain | Local only |
Same dataset, same toolkit, two shapes of agent — pick the one that matches the question you're answering.