Inspiration

For the past couple of months, I have been building an AI Cycling Coaching application that provides recommended daily workouts based on readiness and past activity data. When analyzing this challenge, I realized that the WebMCP capabilities can be used to develop a standalone workout creation canvas as well as have it plugged into an AI Cycling Coaching app.

Amateur cyclist have limited time, changing readiness, specific goals, and important sessions they need to protect. AI can offer recommendations, but they often arrive as opaque text with no shared editing surface, visible calculations, or reliable approval boundaries.

Cadence Workout Studio explores a different model: the athlete and agent collaborate on the same visible workout, while Cadence owns the calculations, constraints, revision history, and safety boundaries.

What it does

Cadence is a shared workout-composition studio powered by seven focused WebMCP tools.

An agent can inspect the rider’s planning context, select an approved workout structure, construct interval blocks, evaluate the athlete’s exact revision, request a bounded repair, and validate the result.

Every agent action appears immediately in the same interface the athlete uses. The Studio shows interval changes, workout duration, intensity, training load, time in zone, constraint violations, repair tradeoffs, provenance, and exact-revision status.

The athlete can edit the proposed workout at any time. Approval and export remain human-only actions, so an agent cannot silently finalize a workout. The complete workflow also works manually in browsers without WebMCP.

How I built it

I built Cadence as a public, synthetic-data challenge edition using Next.js, React, and TypeScript.

The WebMCP integration registers seven narrow page tools through document.modelContext.registerTool. Each tool delegates to the same domain services used by the human interface, rather than maintaining a separate agent workflow.

Workout calculations and validation are independent of the WebMCP transport. Cadence calculates duration, intensity factor, training load, power targets, and time in zone. Every edit creates a new revision, invalidates previous validation or approval, and rejects stale agent requests.

The application uses browser-local persistence and a resettable fictional rider, so judges need no account, credentials, wearable, private database, or personal health data. Approved indoor workouts can be exported as .zwo or JSON files.

The repository includes automated domain, schema, persistence, stale-revision, export-gate, and browser workflow tests, along with the complete challenge-period implementation history.

Challenges I ran into

The hardest challenge was making the agent and athlete true collaborators, not building a chat interface that generated a finished workout.

I needed one revisioned artifact that both sides could inspect and change without losing authorship or allowing stale operations. That required exact-revision validation, approval fingerprints, visible provenance, and automatic invalidation after every edit.

Designing repair behavior was another challenge. The agent should not directly invent arbitrary changes, so Cadence accepts a bounded objective and priorities, chooses the concrete repair itself, and records the resulting tradeoffs.

I also had to keep the seven tools narrow enough for reliable agent use while returning enough structured state for both the agent and athlete to verify every result.

Accomplishments that I'm proud of

I am proud that Cadence feels like a complete product that can integrate with its parent product, ThresholdLabs, to improve the recommendation engine or act as a standalone workout configurator.

The athlete can deliberately change a workout, create a constraint violation, ask an agent to evaluate the exact revision, let Cadence repair it, validate the repaired workout, and then personally approve and export it.

The same calculations, constraints, and state transitions power both the WebMCP tools and the manual interface. The app preserves human authority while making agent collaboration visible, structured, and useful.

I am also proud that the public challenge edition requires no credentials or private infrastructure and contains only isolated synthetic data.

What I learned

I learned that the strongest WebMCP tools expose domain capabilities rather than mirroring buttons or asking an agent to scrape the interface.

WebMCP becomes especially powerful when the webpage remains the source of truth. The agent contributes intent and priorities, the application enforces its domain rules, and the human can see and verify the result.

I also learned that human approval is more meaningful when it is tied to an exact, validated revision rather than a general conversation or recommendation.

What's next for Cadence Workout Studio

Next, I would expand the approved workout library, add richer outdoor execution guidance, improve comparison between alternative repairs, integrate into ThresholdLabs intelligence engine, and support reusable athlete-created templates.

A future production version could connect to athlete-owned training data with explicit consent, while preserving the same visible provenance, bounded agent actions, exact-revision validation, and human approval model demonstrated here.

Built With

  • codex
Share this project:

Updates

Submission history