Inspiration
Energy costs represent 30-40% of AI infrastructure spend at the hyperscale companies. Yet workload routing is static; we route code and models to regions without considering the actual physical state of the grid. Electricity wholesale prices swing 10x intraday, and cooling efficiency is thermodynamically linked to ambient temperature; even the materials used to produce power are not the same across the country. California runs 100% renewels during solar peaks; Texas burns coal at night, meanwhile, nobody is optimising for this. We asked, What if routing decisions were made in real time, physics-aware, and carbon-conscious?
What it Does
Ingests live grid data from 3 US datacenter regions (San Jose/CAISO, Ashburn/PJM, Austin/ERCOT): wholesale prices, carbon intensity, 24-hour forecasts, and ambient temperature. Scores regions on normalized cost, facility efficiency (PUE), carbon, and latency. Presets for Training (carbon-first), Inference (latency-first), Batch (cost-first). Claude's agent decides which region to route to—now or defer to a cleaner hour—with reasoning backed by actual numbers. The model judges; C++ does the math. Takes real action: Opens a GitHub PR with a Kubernetes manifest pinned to the chosen region, or boots a real Fly.io machine in that region. Verifiable. Auto-cleaned. Fleet autopilot routes entire job queues autonomously, accumulating savings with Claude-written explanations.
How we built it
Layer 1: Data Ingestion (Node.js/Next.js)
- Parallel API calls via Promise.allSettled()
- 3-second timeouts per API
- Graceful fallbacks to historical data
Layer 2: Optimization Engine (C++ → WebAssembly)
- Priority queue for O(1) optimal region lookup
- Thermodynamic PUE scaling based on live temperature
- Compiled via Emscripten: 10x faster than JavaScript
Layer 3: Autonomous Agent (Claude Sonnet 4.6)
- Tool-use pattern with 5 callable functions
- Claude autonomously chains tools and makes routing decisions
- Explains reasoning and acknowledges risks
Layer 4: Dashboard (React/Tailwind/Recharts)
- Real-time region matrix, cost calculator, carbon forecast
- Claude's full analysis with risk warnings
*Layer 5: MCP * -fully built MCP allowing calls from agents and AI, fully autonomous workflow
Challenges we ran into
Finding real price data: Our first source (EIA) returns demand in MWH, not price, so we switched to GridStatus.io real-time LMP/SPP feed.
Score normalizations: carbon intensity (hundreds) initially swamped price and PUE, so weights and presents didn't change the ranking until we normalized every factor onto a common scale.
Making the agent fast: a multi-step tool chain, extended thinking took 30-40 seconds. We preloaded all the data into one forced tool call and dropped to 7 seconds while not losing any decision quality.
Free tier rate limits: GridStatus 1-req/s + monthly quota forced sequential cached fetching.
Accomplishments that we're proud of
Built a full loop system: not just a dashboard that recommends, but an agent that decides within guardrails and provisions real compute in the region that the math determined was the most optimal.
A real Fly.io machine booting in the agent-selected region.
What we learned
LLMs can't do it all, using an LLM or agent where it would be truly beneficial and not just to say we have it in our tech stack. -Guardrails belong in code, not in a prompt: filter the choice before the model -Context is king: pre-loading data into one call is dramatically faster than letting the agent fetch it step by step
What's next f3or Gridmind
Bring your own cloud: each enterprise connects their own system so the agent can route into the customer's infrastructure ( Slurm, AWS/GCP), not a pooled account)
Built With
- c++
- claude
- electricitymaps
- next.js
- node.js
- openweathermap
- react
- tailwindcss
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.