Inspiration
Critical infrastructure is not a collection of isolated switches. A hospital depends on power, protection systems, data, water, transport access, emergency crews, and decisions made elsewhere in the city. During a cascading failure, the difficult part is not clicking a button—it is understanding which action is safe before the remaining time and redundancy disappear.
Most browser agents face an uncomfortable choice: infer important state from pixels and page text, or receive enough authority to act without a meaningful human checkpoint. We built GRIDFALL to explore a third model: the website exposes structured, purpose-built capabilities to an agent, the agent helps a person reason under pressure, and the person remains responsible for consequential actions.
What it does
GRIDFALL is a real-time city-grid crisis simulation centered on one urgent objective: restore protected power to St Anne ICU before its generator reserve expires.
Each mission draws one of 100 validated incident configurations. After a short pre-blackout countdown, infrastructure across the city begins failing. The operator sees an interactive top-down map of power, protection, data, road, water, and emergency-response dependencies, but the correct recovery sequence is never revealed.
A WebMCP-capable agent can inspect the live city state, check the hospital, and review the operations that are currently possible. It can then explain the likely benefit, time cost, and systemic risk of one action. In Challenge mode, the agent can only propose the operation: GRIDFALL queues it in Mission Control and waits for the human operator to authorize or reject it. The city does not change until that approval happens.
Every authorized decision advances time and can change several connected systems at once. A seemingly useful action may remove telemetry, block an ambulance corridor, consume the only mobile battery, or reconnect the hospital to an unresolved fault. If the remaining recovery path is destroyed, the mission ends immediately instead of making the player wait for a meaningless countdown.
Why WebMCP
GRIDFALL is designed around collaboration that would be fragile or impossible through ordinary screen reading. The map is optimized for people; the WebMCP tools provide the agent with the same live situation as structured, typed data. This eliminates guesswork about labels, colors, hidden panels, and changing visual state.
The experience separates observation, recommendation, and authority. Read-only tools let the agent build situational awareness. The action tool creates a visible proposal. The human sees its consequences and makes the final decision. That boundary is the product, not an afterthought.
This pattern applies beyond a game. Industrial dashboards, operations centers, financial workflows, and administrative systems can expose meaningful capabilities to agents while keeping high-impact actions inspectable and under human control.
How we implemented WebMCP
GRIDFALL registers six browser-native tools with document.modelContext.registerTool:
get_city_statereturns the current incident, infrastructure status, field clues, and recovery progress.inspect_hospital_statusreturns ICU demand, protected supply, generator reserve, patients, telemetry, access, cooling water, and active blockers.list_grid_actionsreturns the currently available operations with their time cost, benefit, risk, and current availability.take_grid_actioncreates a human-reviewable proposal in Challenge mode.start_random_incidentdraws a validated mission and starts the pre-blackout sequence.reset_missionsafely returns the simulation to standby.
The tools never expose the hidden solution or complete dependency order. The agent must reason from observable evidence, just like the operator. Tool results include structured content so the client can use state reliably instead of parsing prose.
How we built it
GRIDFALL is a client-side React 19 and TypeScript application built with Vinext and deployed on ChatGPT Sites through Cloudflare Workers.
The simulation engine models incident generation, dependencies, action resolution, irreversible consequences, win conditions, and early failure detection. The interface renders the city map, live hospital metrics, recovery history, onboarding, Czech and English localization, audio, and the human-authorization flow.
We also built a deterministic audit that exercises the complete catalogue of 100 missions and checks that every scenario is solvable, non-trivial, and consistent with critical rules such as battery exclusivity and dependency ordering.
Challenges we faced
The hardest challenge was deciding how much information to expose. If a tool returned the hidden sequence, the agent would merely read the answer. If it returned too little, the agent would be forced back into visual guessing. We iterated on the schemas until they described evidence, risks, and current possibilities without leaking the solution.
We also had to make infrastructure consequences feel logical. Early versions allowed trivial action sequences or visually implied connections that did not match the game rules. We repeatedly rebuilt the dependency graph, map layout, failure conditions, and action descriptions so the simulation communicates why a decision helped or harmed the ICU.
Finally, we treated human authorization as a real state boundary. An agent proposal must not silently mutate the simulation, become stale, or be reported as completed before the operator approves it.
Accomplishments
- A complete, playable crisis simulation rather than a single-purpose tool demo
- Six working WebMCP tools with structured outputs and clear authority boundaries
- 100 automatically validated incident configurations
- Explicit human authorization for consequential agent actions
- Immediate, explainable consequences across interconnected city systems
- An interactive map with traceable power, protection, data, and access relationships
- English and Czech localization, onboarding, accessible controls, and sound design
- A public MIT-licensed repository with no API keys, account, database, or custom agent backend required
What we learned
The most important lesson was that a tool schema is part of the user experience. Good agent integration is not just a function name and JSON input; it requires carefully designed observability, understandable consequences, and an explicit model of who is allowed to do what.
WebMCP made it possible to build one interface for two different strengths: humans understand the spatial story and remain accountable, while agents can rapidly compare structured state and dependencies. The result is stronger than either a conventional dashboard or an autonomous agent acting alone.
What's next
We would expand GRIDFALL with additional cities, incident families, replayable decision audits, accessibility modes, and scenario-authoring tools for training. The same architecture could also support safe demonstrations using real or synthetic operational telemetry while preserving the proposal-and-authorization boundary at the heart of the project.
Built With
- chatgpt-sites
- cloudflare-workers
- codex
- openai
- react
- shadcn/ui
- tailwind-css
- typescript
- vinext
- vite
- webmcp

Log in or sign up for Devpost to join the conversation.