GridSimEnv Desk: a real ERCOT battery's trading desk as an RL environment

Fifteen AI models run a real Texas battery's trading desk through 8 real weather fronts, scored in dollars against the best possible plan and the battery's real operator.

Affiliation

Scale AI

Published

October 29, 2026

What is in GridSimEnv

GridSimEnv hands an AI agent the trading desk of a real battery on the Texas grid. For three days at a time, while a real heat wave or winter storm sweeps across Texas, it reads ERCOT’s prices and forecasts as they were posted, bids the battery into the power markets and decides when to charge and when to sell. Every window is settled in dollars and scored against the best plan hindsight allows. We put 15 AI models through 32 of these windows, and in the August heat wave most of them out-earned the real operator at three of the four batteries.

GPT-6.1 Sol trades a 100 MW battery near Houston through the August 2026 heat wave. It made $85,771, 71% of the best possible profit; the battery’s real operator made $20,647. The panel on the right shows each tool call as it happens. Watch it in 3D.

Before and after: the real operator and the agents

Every window also happened for real. The battery’s own operator traded those same three days, and ERCOT publishes what each battery did 60 days later: its day-ahead awards, its output and its charge every five minutes (Electric Reliability Council of Texas, 2026a, 2026b). That gives each window a before and an after. Here are the 3 windows where the agents most clearly beat the operator, all on the 18 to 20 August 2026 heat wave, after every reported training cutoff1. Each shows the operator beside the run that made the most there, GPT-6.1 Sol’s.

Each panel is one window. Top: the node's day-ahead price, hourly, and its real-time price, every 15 minutes. Below, for the real operator as it ran and for the run: what it sold (up) or bought (down) a day ahead in each hour, and the battery's charge. Hover or tab into a panel to read any hour; its table holds the totals.

Most of each gap is day-ahead trading. Through most of this heat wave the day-ahead price ran above real time, and GPT-6.1 Sol sold far more energy a day ahead than the battery could deliver, then bought it back in real time, cheaper; other models traded the same way on a smaller scale. ERCOT’s day-ahead market allows such positions because it ignores a battery’s charge; its credit screening, not modelled here, would limit them. They do not always pay: on the next front, 26 to 28 August 2026, real-time prices spiked to about $800 a MWh, and the operator came out ahead of at least 13 of the models at each of its 4 batteries.

Try it

This is the GridSimEnv Playground, the environment’s OpenEnv Space, embedded live. Load a window and run the desk with the agents’ own eleven tools, call budget and grade: ask the optimizer, send its offers, end your turn and watch the market play out beside the battery in 3D, then see how you rank against the real operator and the 15 models. Its Playground tab is OpenEnv’s MCP playground; the code is in hub/openenv on GitHub.

The GridSimEnv Playground, live

Loading the Playground from its Space…

It opens on window #25, Battery S02 in the 18 to 20 August 2026 heat wave, the run in the film above. Quick play is three clicks a wake-up (ask the optimizer, submit its proposal, end your turn), Autopilot repeats them to the end as the desk’s reference does, and every tool also takes raw JSON. Open the Playground ↗

Why it matters

A grid battery makes its money on decisions: when to charge, when to sell and how much to hold in reserve, around the clock in ERCOT’s day-ahead and real-time markets. The same hardware earns very different amounts depending on who bids it, so closing that gap is revenue without a single new battery, and well-timed batteries put power on the grid exactly when it is scarcest, on heat-wave evenings and storm mornings.

21.5GW

of batteries on ERCOT's grid, October 2026

ERCOT fact sheet, Oct 2026 · ERCOT Monthly, Jul 2025

76%

of what perfect timing allowed, captured by the best quarter of ERCOT battery bidders in January 2026

Modo Energy, Apr 2026

$29.4/kW

a year of revenue for ERCOT batteries in 2025, Modo's estimate, down from 2023

Modo Energy, Feb 2026

166GW

of batteries waiting to connect to ERCOT in July 2026, more than any other kind of plant

ERCOT overview, Jul 2026

12.0GW

discharged at once by ERCOT's batteries, a record, on 22 July 2026

Grid Status, Aug 2026 · ERCOT Monthly, Jul 2025

$799/MWh

real-time price at Battery S01 at 22:00 on 26 August, the rollout's spike, against that hour's day-ahead price

This benchmark, replayed

That work is done today by round-the-clock trading desks and bidding software; an AI agent with the same forecasts, notices and rules could watch every interval, act on news in seconds and let one desk run far more batteries. No one should hand a real battery to an untested agent, though: here, one bad position in a price spike lost $142,769 in a single window, nearly twice what the same model made at the same battery a week earlier. GridSimEnv is where to test and train them first: real ERCOT days, the desk’s own tools and rules, and every window settled in dollars against hindsight and the battery’s real operator.

The eval

Fifteen models ran all 32 windows once, each in its maker’s own harness (Claude Code, Codex CLI or Gemini CLI) or, for the open-weight models, OpenCode, with the same eleven tools, 14 calls a wake-up and at most 100 wake-ups a window.

Each point is a model: its mean capture C over the windows it finished against its mean cost a window, on a log scale. The step line is the cost frontier, the models no other model beats on both. Hover, tap or tab to a point for its 95% CI.
Cost: each window's tokens at the model maker's list price; Beam-1.0 at Together AI's; Qwen3.5-9B at Fireworks' metered rate; Qwen3.5-9B + desk SFT and Qwen3-4B in GPU time.

Watch a rollout

All 476 runs replay in the Replays Space: the battery site in 3D in its real light and weather, each wake-up’s tool calls and what the agent wrote, the market and the battery as they moved, and the grade.

Rollouts in 3D: 32 windows, 15 models

Loading the replay from the Replays Space…

It opens at 22:00 on 26 August in the bench’s costliest run, GPT-6.1 Sol at Battery S01 (Far West) over 26 to 28 August 2026, the front after the film’s: its evening day-ahead sales met an all but empty battery and were bought back as real-time prices hit $799. It lost $142,769; the real operator made $34,874. Press play, or pick any model and window under Episodes. Open in Replays ↗

How the reward works

Every window ends in an ERCOT settlement statement: day-ahead and real-time energy, reserves, imbalance and battery wear, priced by the market’s own rules. The score is that statement’s total P, so it is deterministic, with no judge model and no sampling. Capture C places P between doing nothing and perfect hindsight, C = (P − Pidle) / (Phind − Pidle): 0% at idle, 100% at hindsight, below zero for a run that does worse than idling. The contract’s reward R runs from 0.2 at idle to 1 at the desk’s own planner, R = 0.2 + 0.8 (P − Pidle) / (Pplan − Pidle) clipped to 0 and 1, with the planner’s margin over idle counted as at least a tenth of the physical hindsight’s; it is 0 for a run with no accepted offer.

Every model's settled P on the film's window, Battery S02, on the scale from idle (C 0%) to hindsight (C 100%), with the desk's planner and the real operator marked; the strip below draws R along the same scale. Hover, tap or tab to a row for its P, C and R.

The references are settled the same way. Hindsight is the best plan the market’s rules allow with every price, award and deployment of the window known in advance, one linear program solved by the same optimiser the agents can call. Idle sends no offers. The planner is that optimiser re-planning at every wake-up on exactly what the agent can see. The real operator appears twice: its own disclosed bids replayed through the same clearing and settlement, and what it actually did, settled on the same statement. Offers the desk’s checks refuse change nothing.

On the film’s window GPT-6.1 Sol settles $85,771, idle settles $2 and hindsight $120,595, so C = ($85,771 − $2) / ($120,595 − $2) = 71.1%. It beat the planner’s $55,981, so its R is capped at 1.

Training on GridSimEnv

We fine-tuned Qwen3.5-9B with TRL on transcripts of the desk’s own planner, which calls optimize and submits its proposal. AgentEnv captured them by playing the planner through OpenCode on 144 training windows whose operating days stay clear of the benchmark’s2, and the model learned to make the same calls, with a short rationale at each wake-up.

The recipe

Data
144 three-day training windows; 438 rows, three a window; 397 after the 150k-token cap, about 34M tokens, 1.3M of them trained
Model
Qwen3.5-9B, LoRA r 32 / α 64 on all linear layers
Training
TRL SFTTrainer, lr 1e-4, 1 epoch, 50 steps, gradient accumulation 8; activations offloaded to CPU, so rows up to 150k tokens fit on one 95 GiB GPU (RTX PRO 6000, g7e.8xlarge spot), in 4.5 h
Eval
OpenCode with vLLM at a 262,144-token context, the same harness for base and student
Cost
about $104 of GPU for training and the evals on our own servers; the teacher is our own planner, so no LLM API spend
Code
desk_distill_sft.py and desk_distill_train.py, and the pre-registration
Guide
AgentEnv’s training docs
Each row is a benchmark window: Qwen3.5-9B's C (grey) and the fine-tuned model's (blue), with the planner's C on that window as a tick. Rows run from the largest gain to the largest loss. Hover, tap or tab to a row for its numbers.

Where models fail

We replayed every one of the 476 benchmark runs on the frozen engine and measured how each model ran the desk. Three habits separate the top of the board from the bottom.

Means over each model's graded windows, from an exact replay of every episode. Pick a model to highlight it in all three charts and read its profile; hover, tap or tab to a row for its numbers.

Beam-1.0 on GridSimEnv

We replayed all 32 of Beam-1.0’s runs exactly, every P to the cent, and changed one thing at a time. Beam follows the desk’s planner faithfully: 97% of the day-ahead curve hours it submits against a proposal copy it exactly. Two habits cost it: 91% of its optimize calls keep the default physical position where the planner asks for spread, a fix that leans on Winter Storm Fern’s windows, and its last accepted offer comes 23.5 hours before a window ends. Fixing both in the replay adds +14.0 points of C [+3.0, +28.7], 98% of its 14.2-point gap to the planner. With a pre-registered playbook of those habits, Beam-1.0 itself then reached C 18.9% [6.0, 35.8], up from 6.7% and near the planner’s 20.9%: +12.2 points [+1.6, +26.9], where the replay predicted +14.0. The playbook was written after seeing Beam’s failures on these same windows, so this shows the fixes carry over to Beam’s own play, not performance on unseen windows; outside Winter Storm Fern’s front the gain is +5.8 [−0.3, +12.8], an interval that includes zero. The dataset card gives each effect with its interval, the playbook run, and the published files.

The arrow takes Beam-1.0 from 6.7% at $0.31 to 18.9% at $0.44 a window with the playbook, toward the cost frontier but still below it: at its own cost the gap to the frontier narrows from 10.1 to 5.6 points, and DeepSeek V4.1 Flash stays cheaper and higher. The frontier and the other models are the leaderboard's; Beam-1.0 + playbook is not a leaderboard entry, and its playbook was written after seeing Beam-1.0's failures on these same windows.

Data sources

DataSourceLicence
Day-ahead and real-time prices, reserve prices, system lambda and demand curvesERCOT public reports NP4-190-CD, NP6-905-CD, NP6-788-CD, NP4-188-CD, NP6-332-CD, NP6-331-CD, NP4-212-CD and NP6-323-CDERCOT Website User Agreement, section 5; not relicensed
Load, wind and solar, ERCOT’s forecasts as issued, outagesERCOT public reports NP6-345-CD, NP4-733-CD, NP4-738-CD, NP3-565-CD, NP4-742-CD, NP4-745-CD, NP3-233-CD and NP1-346-ERERCOT Website User Agreement, section 5
Market and operations noticesERCOT noticesERCOT Website User Agreement, section 5
The real operator’s bids, awards and output; each battery’s limitsERCOT 60-day disclosures NP3-966-ER, NP3-965-ER and NP3-991-EX, and ERCOT’s December 2025 CDR reportERCOT Website User Agreement, section 5; only derived values are published
Weather alertsNWS watches, warnings and advisories, through the Iowa Environmental Mesonet’s VTEC archivepublic domain (NWS)
Weather in the replaysASOS observations, from the Iowa Environmental Mesonet, Iowa State Universitypublic domain (NWS, FAA), credited as the IEM asks
Temperatures that located the frontsNOAA HRRR model runspublic domain (NOAA)
Solar capacity behind the modelled PVU.S. Energy Information Administration, Form EIA-860Mpublic domain
The desk’s price forecastdesk-qr-v1, fitted in the plugin on ERCOT’s posted prices and forecastsApache-2.0 code; ERCOT’s terms for the data
The battery sites in 3Dprocedural, built in code; three.jsCC0; MIT

Source: ERCOT. GridSimEnv is not affiliated with or endorsed by ERCOT, NOAA, the EIA or the Iowa Environmental Mesonet; the plugin’s data licence holds ERCOT’s terms in full, and its NOTICE sets out each source.

Footnotes

  1. The windows: every window in July and August 2026, after every reported training cutoff, on which at least 12 of the 15 models settled above the real operator, both as it ran and with its own bids replayed through the same market. That picks Batteries S01, S02 and S03 on the 18 to 20 August 2026 heat wave. The operator as it ran is its real day-ahead awards and metered output, settled on the same statement as the agents’ runs at ERCOT’s real prices; its own bids, replayed from the same starting charge, earn $10,827, $17,102 and $32,268.

  2. One benchmark front, 8 to 10 May 2026, falls inside some training windows’ spans, but only as their day-ahead price history, the week before their operating days; no training transcript names those dates.

  3. Base Qwen3.5-9B was served by Fireworks on the benchmark and by our own vLLM on the held-out windows; the fine-tuned model by our own vLLM on both.

  1. Electric Reliability Council of Texas. (2026a). 60-Day DAM Disclosure Reports (NP3-966-ER). https://www.ercot.com/mp/data-products/data-product-details?id=NP3-966-ER
  2. Electric Reliability Council of Texas. (2026b). 60-Day SCED Disclosure Reports (NP3-965-ER). https://www.ercot.com/mp/data-products/data-product-details?id=NP3-965-ER