LabWired The easy way to build hardware

The Closed Loop: agents that build firmware in PlatformIO and verify it in a simulator

Category: Whitepaper

An AI agent writes firmware, builds it with PlatformIO, runs it on a deterministic digital twin, reads the result, and fixes itself — with no hardware in the loop.

The broken loop

AI coding agents are now good enough to write embedded firmware. What they can’t do is run it. On the web, an agent writes code, executes it, reads the output, and tries again — a tight loop measured in seconds. On embedded, that loop is broken: to know whether the firmware works you need a specific board, a flashing probe, and a human to wire it up and watch a UART. The agent is writing blind.

You can’t close that loop with real hardware. Hardware is serial (one board, one job at a time), non-deterministic (timing-dependent bugs that don’t reproduce), and destructible (the agent’s third attempt shouldn’t fry a power stage). To close the loop you need a substrate that is fast, deterministic, parallel, and disposable — which is a description of a simulator, not a bench.

The loop, closed

flowchart LR
  A["Agent writes /<br/>edits firmware"] -- "build · PlatformIO" --> B["firmware.elf"]
  B -- "run · LabWired sim<br/>(deterministic)" --> C["structured result<br/>result.json · UART · VCD · PC history"]
  C -- "agent reads & diagnoses" --> A

Caption: Each pass through the loop takes seconds and needs no board or probe.

Every step is headless and scriptable, so an agent can run it unattended — and run fifty of them in parallel across boards and configs.

Why LabWired is the substrate

Andrii Shylenko
Andrii Shylenko

Founder, LabWired.