-
-
Pit Wall — A WebMCP-powered racing strategy game built around shared human + AI race control.
-
Track & Control Selection — Choose the circuit and control model: Human, Co-Crew Chief, or a fully delegated AI Crew Chief.
-
WebMCP Site Tools — 8 structured tools give ChatGPT live race intelligence plus controlled race actions.
-
AI Race Analysis — ChatGPT reads live race state, evaluates strategy tradeoffs, and recommends a call without acting.
-
Live Pit Wall — Position, fuel, tire age, running order, field strategy, and decision context evolve throughout the race.
-
Shared Pit Wall — Human and AI Crew Chief calls coexist in one persistent race, with control passing between them.
-
Decision History — Every Human and AI Crew Chief strategy call is attributed, timestamped by lap, and preserved.
-
Race Recap — Stage results, strategy history, and major events create an auditable record from green flag to finish.
Inspiration
Race strategy is a constant sequence of decisions: tires, fuel, track position, cautions, pit timing, and when to sacrifice position now for an advantage later.
Most AI experiences put an assistant beside an application. I wanted to explore something different: what happens when the AI has an actual role inside the experience?
Pit Wall turns the player into a stock-car crew chief competing against autonomous rival pit walls. Through WebMCP, ChatGPT can join that same pit box.
The human can ask the AI to analyze the race, make one strategy call, manage a stage, or take responsibility for the entire race.
Delegation itself becomes a game mechanic.
What it does
Pit Wall is a browser-based stock-car strategy game built around human-agent collaboration.
Players race across five differentiated environments:
- Daytona International Speedway
- Bristol Motor Speedway
- Darlington Raceway
- Pocono Raceway
- Watkins Glen International
The simulation models fuel, tire age, pit service, cautions, stages, track position, pace, strategy splits, and autonomous opponent pit walls.
Players can interact with the race at several levels of autonomy.
Observe
ChatGPT can inspect the live race without changing anything.
Advise
The agent can analyze position, fuel, tires, stage context, field strategy, recent events, and deterministic Race Intelligence, then explain the strategic tradeoffs while leaving the decision to the human.
Act
The player can delegate exactly one strategy decision to ChatGPT.
Delegate
The player can hand over a bounded portion of the race—or the entire race through the checkered flag.
Every strategy call records its provenance, so the interface shows whether a decision came from the Human or AI Crew Chief.
The result is not a chatbot layered on top of a game. The agent and human participate in the same simulation, operate against the same race state, and can exchange control as the race develops.
Why WebMCP
Pit Wall is designed around a problem that ordinary browser automation does not solve particularly well.
A visual agent would have to inspect the interface, infer what each control means, extract race state from rendered text, and manipulate UI elements.
WebMCP gives the agent a semantic interface to the same live race the human is playing.
Pit Wall registers eight Site Tools:
get_race_stateget_my_car_stateget_field_stateget_current_decisionget_recent_eventsget_decision_historycommit_strategyadvance_to_next_decision
Six are read tools and two can mutate the race.
The read tools expose structured information about the race, player car, field, current strategic decision, recent events, and decision history.
The write tools allow an authorized agent to commit a strategy call and advance the simulation to its next meaningful decision point.
This means ChatGPT does not need to infer application state from pixels or simulate mouse clicks. It can reason over explicit race state and perform defined actions through the application's own interface.
Human UI actions and WebMCP actions operate against the same canonical race session.
Human + agent collaboration
The central idea is not simply that AI can play the game.
The player determines how much authority the AI receives.
Ask:
Analyze this situation and recommend a strategy, but don't execute anything.
ChatGPT can inspect the race and act as an analytical crew chief while the human retains control.
Or:
Take this strategy call for me.
ChatGPT can make exactly one decision.
Or:
Take the pit box through the end of this stage.
The agent can manage a bounded portion of the race and return control at the stage boundary.
Or:
Take the pit box and call this race through the checkered flag.
The AI Crew Chief can operate the race autonomously through successive strategic decisions.
Control is therefore not binary.
A player can move between Human, Co-Crew Chief, and AI Crew Chief behavior during one continuous race. Human and AI decisions remain attributed separately even as control passes between them.
This creates an interaction model where a human and an agent can observe, reason, collaborate, transfer authority, and take control back inside the same stateful application.
Race Intelligence
Pit Wall calculates deterministic Race Intelligence for both the player and agent.
It includes context such as:
- fuel margin to the next race boundary
- tire age relative to the field
- position trend
- stage context
- observable opponent strategy
- recent strategy consequences
The simulation calculates the facts. ChatGPT interprets them.
This separation is important.
The agent does not invent the underlying fuel state, tire age, position, or field behavior. Pit Wall provides deterministic race information, while ChatGPT reasons about what that information means strategically.
This allows the AI to explain why a decision matters instead of merely selecting an action.
Strategy has consequences
Pit Wall does not guarantee that either the human or AI will win.
Pit service can sacrifice substantial track position. Staying out can gain immediate position while creating future tire or fuel problems. Short-pitting can create an undercut opportunity while temporarily sending the car backward through the running order.
Different race environments also create different strategic conditions.
The player's position, tire state, fuel state, pit history, field strategy, and race circumstances evolve as decisions are made.
Completed WebMCP-controlled races have produced everything from victories to difficult finishes.
Every decision remains visible in the strategy history, including:
- who made the call
- the lap on which it occurred
- the selected strategy
- the resulting position consequence
Stage winners and the player's Stage 1 and Stage 2 results are preserved through the final race recap.
The checkered-flag screen therefore becomes more than a finishing position. It provides a record of how the human and AI managed the race together.
How I built it
Pit Wall uses a React/Vite frontend, FastAPI backend, and deterministic Python race simulation.
The architecture is:
Human + ChatGPT
→ React/WebMCP interface
→ FastAPI
→ Pit Wall adapter
→ deterministic race simulation
→ user car + autonomous field
The browser interface presents the same race state used by the agent.
WebMCP tools are registered through:
document.modelContext.registerTool(...)
The application exposes eight WebMCP Site Tools directly from the live browser experience.
The FastAPI layer provides the race-session API, while the simulation owns the canonical race state and advances the user car and autonomous field.
The submitted application is self-contained and does not require an external database at runtime.
The production build is packaged as a single-origin Docker application and deployed on Render.
Reliability and integrity
Giving an AI permission to mutate a stateful application introduces a different engineering problem from simply asking an AI for advice.
A strategy call must apply to the correct decision.
It must not execute twice.
An agent managing a bounded portion of the race must stop at the requested boundary.
And once the checkered flag falls, neither the human nor agent should be able to continue mutating the completed race.
Pit Wall therefore includes protections for:
- stale decisions
- duplicate decisions
- decision-boundary overrun
- stage-boundary handling
- post-finish mutation
- actor provenance
- Human/AI control state
Human and AI actions travel through the same underlying simulation rules rather than separate gameplay paths.
A dedicated simulation exploit and strategy-integrity audit was completed before submission.
The standalone test suite currently passes 46 focused tests covering the simulation, API behavior, WebMCP integration, decision handling, and race integrity.
What I learned
The most interesting lesson from building Pit Wall was that giving an agent tools is only part of the problem.
The harder question is how much authority should the agent have, and how does the application make that authority understandable to the human?
Read-only tools made it possible for ChatGPT to become an analyst without becoming an actor.
Explicit write tools made individual strategy delegation possible.
Decision boundaries made bounded autonomy possible.
Actor provenance made it possible to preserve a coherent history even when Human and AI Crew Chief control changed repeatedly during the same race.
WebMCP therefore became more than an integration mechanism. It shaped the game's interaction model.
Instead of asking whether an AI can operate a web application, Pit Wall asks a more interesting question:
What happens when operating the application together is part of the experience?
What's next
Pit Wall's current challenge build intentionally uses fictional drivers and modeled race behavior.
The next version can deepen the strategy game itself: more differentiated AI Crew Chief behavior, richer incidents, qualifying and race-weekend systems, additional strategic variables, expanded track characteristics, persistent seasons, championships, team development, and career progression.
The human-agent model can also become richer. Different AI Crew Chiefs could develop distinct strategic tendencies, risk tolerances, and decision styles, creating another strategic choice for the player: not only when to delegate, but who should receive that authority.
The same WebMCP architecture can extend beyond racing. Any stateful application where humans and agents need to inspect shared state, make bounded decisions, transfer authority, and preserve an auditable history can use a similar interaction model.
For Pit Wall, the foundation remains simple:
Ask your crew chief. Make the call. Share the call. Or hand over the pit box.
Built With
- agentic-ai
- ai-agents
- api
- chatgpt
- codex
- docker
- fastapi
- game-development
- human-ai-collaboration
- javascript
- multi-agent
- openai
- python
- rating
- react
- render
- simulation
- stateful-applications
- strategy-game
- vite
- webapp
- webmcp
Log in or sign up for Devpost to join the conversation.