SupplyMesh: Recover the network. Protect the driver. Prove every decision.
Inspiration
Supply chains do not fail in neat database rows. They fail in the physical world: a truck approaches a low bridge, a road closes, severe weather reaches an active corridor, or a delivery schedule starts competing with a driver’s rest window.
Most fleet dashboards can show that something is wrong, but resolving the disruption still requires a dispatcher to manually inspect vehicles, routes, cargo, timing constraints, and safety policies across multiple systems.
We built SupplyMesh around a simple idea:
An AI agent should help recover the operation without turning the driver into another variable to optimize.
Driver rest, vehicle clearance, cargo continuity, and road safety are not soft scores that can be traded away for a faster ETA—they are hard operational boundaries. The agent analyzes the situation and prepares a response, but a human dispatcher retains absolute authority over critical changes.
Our first prototype was closer to a conventional fleet dashboard with a small set of read-only tools. It worked, but it did not demonstrate why WebMCP was necessary. We redesigned the project around a complete disruption-recovery workflow that both the human and the agent could understand through the exact same visible application state.
What it does
The main scenario begins before Unit 211 leaves Toledo.
Its assigned route contains a 3.90 m clearance restriction. The vehicle itself is 3.80 m high, but the operator requires an additional 0.20 m safety buffer:
- 3.80 m vehicle height
- + 0.20 m operator safety buffer
- = 4.00 m required clearance
- Result: 4.00 m required > 3.90 m available (Route rejected)
Through WebMCP, the agent inspects the authoritative vehicle, route, cargo, incident, and timing state. It compares the current route with a verified alternative, checks the driver’s remaining operating window, preserves cargo assignments, and stages a recovery plan.
What the agent cannot do
There is no approval tool. The agent cannot weaken the safety buffer, ignore the rest window, or authorize its own proposal. It can only request human review.
When the dispatcher approves the exact plan in the visible interface, SupplyMesh binds that approval to the plan fingerprint and the current scenario revision. Only then does recovery_plan_execute appear dynamically as an available WebMCP capability.
Once authorized, the agent can:
- Execute the exact approved route change.
- Verify the resulting state independently.
- Confirm that the clearance policy, rest window, and cargo continuity still pass.
- Prove that the route was changed only once.
- Produce a stable, auditable receipt.
If the vehicle, route, constraints, or scenario revision change after approval, the authorization invalidates immediately and the execution capability disappears.
SupplyMesh also includes a driver-first rest opportunity planner. Instead of treating spare delivery time as extra productivity, it identifies opportunities to give the driver more rest while remaining within delivery tolerance. The agent compares available options, but only a human can schedule or remove the stop.
How we built it
SupplyMesh is built with:
- Frontend & Core: React 19, TypeScript, Vite, and Bun
- State Management: Zustand for shared application state
- Mapping & Visualization: Leaflet (operational map) and Three.js (close-range volumetric vehicles)
- Testing & Verification: Playwright and Vitest for browser and domain validation
- Agent Integration: Native WebMCP tools
The visible UI and the WebMCP tools share the exact same domain operations. This prevents the agent from modifying a hidden copy of the state that disagrees with what the dispatcher sees.
The recovery tool surface adapts to the workflow: tools for comparing or staging a plan are available early, while execution capabilities only mount after valid human approval. Deprecated or completed capabilities are torn down using isolated AbortSignal lifecycles.
The road network uses 15 checked-in OpenRouteService routes containing 45,577 verified coordinates. Routing is not computed at runtime, and no routing API keys are exposed to the browser.
For live context, SupplyMesh integrates Open-Meteo and the public DGT DATEX II traffic feed without paid API keys. Both live feeds are strictly advisory: they inform the operator and agent, but cannot mutate routes, approvals, or safety constraints automatically.
Challenges we faced
The core challenge was not connecting an AI model to a map, but making every layer of the workflow operationally truthful:
- State Synchronization: The original alternative route began in Toledo while the vehicle was displayed partway through another route. We fixed this by introducing a deterministic pre-dispatch snapshot where Unit 211 remains at the origin.
- Spatial Integrity: We ensured clearance calculations, incident markers, exclusion zones, proposed routes, and final audit receipts all referenced the exact same physical coordinates.
- Enforcing Human Authority: Approval had to be cryptographically and logically bound to a plan fingerprint and scenario revision. Stale or modified plans fail closed by design, and re-executing cannot trigger duplicate route mutations or receipts.
- Hybrid 2D/3D Rendering: Synchronizing Leaflet coordinates with a shared Three.js canvas required maintaining vehicle progress between perspective changes, aligning truck headings with route bearings, and scaling weather overlays correctly with zoom levels.
- External Resilience: Public traffic and weather APIs fail intermittently. The live data layer degrades gracefully, keeping the deterministic recovery scenario functional even when external providers go down.
What we learned
- Context over Quantity: The value of WebMCP lies not in the volume of exposed tools, but in providing precise, state-scoped capabilities that map directly to what the human operator sees.
- Enforceable Human-in-the-Loop: "Human-in-the-loop" should be an architectural constraint, not just a policy. In SupplyMesh, unauthorized execution is structurally impossible because the tool does not exist until approval is granted.
- Deterministic Trust: Reproducible clocks, versioned routes, explicit scenario revisions, and immutable receipts are what separate an operational enterprise tool from an unpredictable demo.
- People-First Optimization: Operational efficiency does not have to come at the driver's expense. SupplyMesh treats safety buffers and mandatory rest windows as non-negotiable constraints, not variables to optimize away.
What’s next
SupplyMesh currently demonstrates a deeply verified single-incident recovery scenario. Next steps include:
- Dynamic route recalculation and multi-region support.
- Direct TMS (Transportation Management System) integrations.
- Multi-vehicle coordinated recovery planning.
The goal is not to replace dispatchers, but to give them a shared operational workspace where complex logistics disruptions can be inspected, authorized, and resolved transparently alongside AI agents.
Built With
- bun
- dgt-datex-ii
- leaflet.js
- open-meteo
- openrouteservice
- playwright
- react-19
- three.js
- typescript
- vite
- webmcp
- zustand
Log in or sign up for Devpost to join the conversation.