groundrun.io

Why AI agents need hardware in the loop

Why AI agents need hardware in the loop

Put the hardware in the loop. An AI coding agent working on a connected product should be able to run its change on the real device while it works, then read back what the device did.

Hardware in the loop is the obvious choice: without it, agents can only guess what their code does.

Why hardware? The hardware knows the truth

The device is where the answers are. Run the change on it and the product reports what it does.

A real device does everything it does. The startup sequence, the exact moment the radio comes up, what the flash controller is busy with while a write is in flight: all of it is in the answer the device gives back.

Timing, current draw, and what a device does when the power drops halfway through a write to flash exist nowhere except on the bench. An instrument reads them off the running product. Cut the power at the wrong microsecond and the device comes back with a half-written page in flash.

What it does next is a fact about that part on that board.

And everything the product does comes together on the device. The firmware sends a reading when the value changes, the app subscribes once pairing completes, so a freshly unpacked device shows an empty panel until something in the room moves. Two correct pieces, one broken flow. The flow they add up to only runs on the device.

The flow they add up to only runs on the device.

An array of identical connected product circuit boards, each with a connector header and power components

Why in the loop? The agent gets it while it's hot

The answer is worth most while the agent still has the whole change in its head. It knows which line it moved, what it was reaching for, and what it expected to see. Hand it the result at that moment and the fix is an edit.

When the answer comes back in minutes, the work moves in minutes. The agent flashes the build, walks the flow with the app against the cloud, reads the step that failed, changes the code, goes again.

A dozen turns of that is an afternoon.

What an agent can be handed is set by what can be checked. With the product answering while the work happens, work that reaches across the product becomes work an agent can take. Move the cloud's sync interval, change what the device does when it wakes, change what the app shows while it waits: one change in three places, and the flow says whether it worked.

What an agent can be handed is set by what can be checked.

Hardware in the loop just became hardware in the agentic loop

Hardware in the loop has been a good idea for a long time. What changed is that the thing writing the code is now the thing operating the bench.

An agent will run the same flow a hundred times and be as careful on the hundredth as on the first. Repetition costs it nothing. So a flow can run through the night, as the work lands, with the result written down every time.

An agent also operates the bench itself. Flashing an image, power cycling a device, driving the app on a phone, waiting for the cloud to catch up: that's software work, which is the work agents are good at. The bench stops being a thing somebody has to be standing at.

A bench power supply showing a voltage and a current reading while a hand adjusts the current control

And an agent reads the instruments. Current draw, how long a piece of code takes, how much memory is left with the radio up: they arrive as numbers an agent can work against. It changes the code, runs it again, and watches the number move.

How Groundrun does it

Groundrun is hardware in the loop with the whole product on the rig, operated by the agents themselves.

The devices you ship sit on a rig built around your product, with your app on real phones and your test cloud behind them, so a flow runs the way a customer's would. What comes back is about the product people hold.

Groundrun runs as a command-line tool, so the agents invoke a run and read what happened from inside the same session where the change is being written. The loop closes at the speed an agent works.

The answer is in front of the agent while the change is still on the workbench.

And the rig takes the product's physical measurements while a flow runs, current draw among them. So power and performance become work an agent does in the same loop as the code that sets them, battery life included.

The agent writing the change is also the one that ran it on the product.


See how Groundrun puts your product on the rig and lets the agents run it, on the platform overview.