AWS Builder Center
An interactive F1 race intelligence dashboard on AWS

An interactive F1 race intelligence dashboard on AWS

Part 2: An interactive F1 race-intelligence dashboard on AWS with deterministic analytics, Bedrock agents, and a championship predictor

Senior Solutions Architect | AWS AI Hero | OSS: Strands - robots, harness-sdk, decider, stan, box
Part 2 of a two-part series. Part 1, "Building a latency-tiered agentic race analysis system for Formula 1 data with Amazon Bedrock", built the engine; this post covers the interactive product on top of it and its deployment on AWS App Runner.
All results in this post are computed from public race data and are reproducible from the repository.
About the author: Vivek Raja P S is an AWS AI Hero, a lifelong Sebastian Vettel and Fernando Alonso fan, currently supporting Ferrari and Max.



Overview

Part 1 made a narrow argument: LLM agents do not belong on the pit-call path, and they earn their place when a deterministic layer computes every number and agents only turn those numbers into briefs. That argument shipped as a batch pipeline, seven narrow agents, and one baked dashboard page for the 2024 Spanish Grand Prix.
This post turns the engine into a product: a race-intelligence console that covers every grand prix from 2011 to the race that finished yesterday, drills from a single practice session up to the championship picture, and generates its analysis on demand. The whole system runs in one container on AWS App Runner, caches everything it computes in Amazon S3, and calls Amazon Bedrock for a fleet of ten narrow agents: the seven race agents from part 1 plus three drill-down agents introduced here. The design rule survives intact: agents never compute a number; every figure on screen is pandas/SciPy output cached as JSON.

Figure 1: The grand prix view. The header, stat strip, and every section mirror the selected race; each agent brief card names the payload it narrates.

Problem statement

The batch pipeline had three gaps that show up the moment a second person uses it.
First, coverage. The published page knew one race. A race engineer's questions span sessions (how did the long runs look in FP1), drivers (is this a feast-or-famine season or steady scoring), and seasons (who is actually gaining form), and they extend to the race that happened yesterday, not just the one that was curated months ago.
Second, latency economics. The deterministic layer takes about a minute per race: stint fits, pit loss, undercut ledger, counterfactual pit curves, and three frozen-clock backtests. Running that on every page view is wasteful; running it never means stale data. The system needs a cache with a clear policy: revisits are instant, regeneration is an explicit choice, and a fresh race generates exactly once and then serves everyone.
Third, grounded narrative at every altitude. Numbers alone do not answer "so what". The original seven agents narrate one race. Drill-downs need the same treatment: a practice session, a driver's season, the standings, and the title fight each need an agent that reads the computed payload and says what matters, without inventing a single figure.

Technical architecture


Figure 2: One App Runner container serves the dashboard, reads and writes the S3 output cache, invokes agents through Amazon Bedrock, and pulls recent seasons from OpenF1. An instance role grants exactly the bucket and bedrock:InvokeModel.
One container on AWS App Runner serves everything. The image bakes in the Ergast-schema CSVs (2011-2024), the frozen 2024 Spanish GP reference outputs, and the dashboard page; recent seasons come from the OpenF1 API at request time. An App Runner instance role grants exactly two things: read and write on the outputs bucket, and bedrock:InvokeModel.
The request path is a cache hierarchy:
  1. A race selection asks /api/bundle for outputs/<race>/. Local disk first, then s3://<bucket>/outputs/<race>/, and only then a 404 that the UI turns into an explicit "generate" call to action. Selection changes never start a pipeline run or a Bedrock call by themselves.
  1. Generate runs the deterministic layer in a background job: results.json, three frozen-clock backtests at 30/45/60 percent of race distance, and the agent briefs. Everything lands in S3, so the next visitor anywhere reads the cache.
  1. Season standings, session pace, and predictor projections cache the same way, under season_<year>/, session_<key>/, and predictor_<year>/.
The agent layer follows the payload-in/brief-out contract from part 1. Ten agents now ride on it: the original seven race agents (Stint Analyst, Rival Watcher, Deg Explainer, Compliance Guardian, Driver Coach, Race Reporter, Track Historian) plus three drill-down agents (Season Analyst, Driver Season Review, Championship Strategist). Each is a system prompt of roughly 150 words over Bedrock Converse; each receives a JSON payload the deterministic layer computed; none has tools. Part 1's runtime split is unchanged for the race system: the slow loop still deploys as Strands Agents on Bedrock AgentCore Runtime with Memory, and the batch tiers still run as Bedrock batch inference. The dashboard adds a third invocation path, direct Bedrock Converse calls from the server, with the model as a single configuration value (F1_BEDROCK_MODEL_ID; this deployment runs Amazon Nova Pro, and part 1's Claude routing remains in the Strands roster). The published 2024 Spanish GP outputs are marked read-only in the service layer, so a regeneration request cannot drift the numbers cited in part 1 or the repository README.
Two operational details earned their place the hard way. OpenF1 signals an empty result set with HTTP 404 and rate-limits at 30 requests per minute, so the client treats 404 as an empty list and throttles with backoff. And the dashboard vendors Chart.js into the image instead of loading it from a CDN, because one content blocker turned the page into a blank screen.

Feature highlights

Every grand prix since 2011, generated on demand. Ergast covers 2011-2024; OpenF1 covers 2025 onward, including a race one day after the flag. The 2026 British Grand Prix generated in about a minute: 26.45s measured pit loss over 39 stops, 48 stint fits, 9 pit battles, and a counterfactual showing Leclerc left 5.98s on the table by stopping on lap 25 instead of lap 19.
Session inputs, not just races. Practice, Sprint, Qualifying, and Race sessions each load into a pace view: best lap, gap to fastest, clean-lap median, and long-run degradation slope. The Stint Analyst reads the same payload and briefs it.

Figure 3: Practice 1 at Silverstone, 2026. Best lap, gap to fastest, clean median, and long-run slope per driver; the Stint Analyst briefs the same payload.
Drill down by driver or by season. The driver view walks one driver across every grand prix of a season with grid, finish, positions gained, and cumulative points, and the Driver Season Review agent characterises the scoring pattern. The season view puts the standings next to the points progression, and the Season Analyst names who is gaining and who is fading from the last three rounds of scores.

Figure 4: The 2026 season view. Standings and points progression from the deterministic layer; the Season Analyst names who is gaining and who is fading from the last three rounds of scores.

Figure 5: One driver across a season, with the Driver Season Review agent characterising the scoring pattern.
A championship predictor with a path-to-title model. A header badge opens the projection: a bootstrap of each driver's own per-round scores over the remaining rounds, 4000 simulations. Eleven rounds into 2026 it prices Antonelli at a 79.7 percent title probability. For any contender it computes the path to the title deterministically: the points gap, the required average against the leader's current form, whether the title is mathematically alive, and the minimum wins needed with second places everywhere else. The Championship Strategist turns that scenario into a strategy note; when the arithmetic says a driver needs more than a win per round, the payload says so and the agent reports it plainly.Figure 6: The predictor modal. Projection with title probabilities, the per-driver path-to-title scenario, the Championship Strategist's brief, and the method stated in the footnote.
Honest by construction. Every brief card names its payload. The prediction audit section carries the frozen-clock backtest so the model grades itself against realized outcomes. The projection modal states its method and its exclusions in a footnote. When a race is not cached, the page says so and waits for an explicit generate rather than showing stale numbers under a fresh title.

Prerequisites and walkthrough

To reproduce: Python 3.10+, Docker, the AWS CLI, and an AWS account with Amazon Bedrock model access to Amazon Nova Pro (or set F1_BEDROCK_MODEL_ID to a model your account can invoke).
git clone https://github.com/Vivek0712/f1-agentic-analysis && cd f1-agentic-analysis
./scripts/fetch_data.sh # Ergast-schema CSVs
python scripts/build_dashboard.py # bake the page
AWS_PROFILE=\<profile\> ./scripts/deploy_apprunner.sh
The deploy script is idempotent: it creates the ECR repository, builds and pushes the linux/amd64 image, creates the instance role (S3 bucket read/write plus bedrock:InvokeModel) and the ECR access role, and creates the App Runner service with /api/seasons as the health check. Re-running it pushes a new image and App Runner auto-deploys. Model access is one environment variable (F1_BEDROCK_MODEL_ID, default us.amazon.nova-pro-v1:0), so switching the agent fleet to another Bedrock model is a config change.
Cost shape: App Runner bills a single 1 vCPU / 2 GB instance while the service runs, S3 storage for the JSON caches is negligible, and agent briefs are single Nova Pro invocations per view, generated once and cached.

Cleanup

Delete the App Runner service, the ECR repository, the two IAM roles, and the outputs bucket. The offline path (python scripts/serve_dashboard.py) keeps working with no AWS resources beyond optional S3 and Bedrock access.

Conclusion

The transferable pattern is unchanged from part 1, now proven at product scale: keep the LLM off the fast path, feed it fitted parameters rather than raw data, and cache the deterministic layer's output so the expensive computation happens once. What the dashboard adds is the interaction contract around that pattern: selections read caches, generation is explicit, published reference numbers are immutable, and every agent card names the payload it narrates. Any domain with a deterministic analytics core and a human attention bottleneck (payments operations, grid management, clinical monitoring) can reuse the shape, down to the single-container deployment.


Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article