Build Hardware with AI

Checks, tools and skills that let an AI agent research, design, verify and order real hardware

Patrick O'Brien

Open source · MIT · v0.2.1 ·

Motion sweep. A tray slides into a case. At every step the kit measures the exact gap, or the exact overlap volume, between the moving part and everything else. The tray clears the front slot by 1.00 mm, then hits a screw boss that was drawn too far forward. The agent gets the position and the overlap, not a picture to guess from.

Abstract

AI agents can now draw a circuit board or a 3D-printed case in minutes. The hard part is knowing whether it will work when it arrives: whether the walls are thick enough for the printer, whether the lid fits, whether the screw is long enough, whether the Gerber files the factory receives really match the schematic. Each mistake costs an order and two weeks.

build-hardware-with-ai gives an agent the checks an experienced engineer runs before ordering. It ships as a Python command-line tool (hwkit), an MCP server with 40 tools that any MCP client can call (Claude Code, Codex, Cursor and others), and a Claude Code plugin with seven guides covering PCBs, printed parts, hand assembly, sourcing, simulation and optical instruments. Each check reports PASS, WARN or FAIL with the numbers behind it, and each limit cites the manufacturer's published rule. The rules came from building real hardware with an agent and writing down every mistake made along the way.

What it checks

  • 3D printing: measured wall thickness against JLC3DP's limit for the part's size, trapped resin or powder, build volume, supports, tolerance and mass, for SLA, MJF, SLS, SLM metal and FDM.
  • Mechanics: exact overlap and gap between parts, sweeps of moving parts over their whole travel, a straight tool path to every screw, and screw stacks with ISO length tolerances.
  • Circuit boards: KiCad's design-rule check with JLCPCB's limits, Gerber files rebuilt into copper and compared with the schematic, BOM and placement files, stencil area ratios, a review by kicad-happy and routing by KiCadRoutingTools.
  • Research and parts: paper search (OpenAlex, arXiv), datasheet download and search, and live prices from LCSC, Mouser and DigiKey with the source and date on every number.
  • Optics: Gaussian beams through lens trains, objective back apertures and fill, focal spots, drag near a wall, Mie scattering, and stiffness calibration from thermal motion.
  • Heavy jobs: simulations and routing run in a queue, one at a time, with a memory cap.

Results

A printed bracket coloured by measured wall thickness: the 0.6 mm rib is red, the 1.6 mm rib yellow, the rest green.
Wall thickness, measured. Rays cast inward from every point of the surface measure the wall. For MJF nylon at this size the limit is 2.0 mm, so the check fails the 0.6 mm rib and flags the 1.6 mm one.
Copper rebuilt from Gerber files, coloured by net; with a planted bridge the two nets turn red.
Gerbers against the schematic. The kit rebuilds the copper from the files the factory receives and joins layers through the plated holes. To prove it can see a fault, it plants a 0.1 mm bridge and checks that it reports a short.
Before and now sheet of a case: sharp box on top, rounded box below, from four views.
Before and now, from the same views. When a form changes, one labelled sheet at the same scale settles whether the new version is better. A long run of single renders tends to read as the design getting worse.
Gaussian beam radius along a 4x telescope and a 4f relay ending at an objective's 8 mm back aperture.
Beam path. A 1 mm beam at 1064 nm through a 4× telescope and a 4f relay, ending at the back aperture of a 60×/1.2 water objective (8.0 mm). The fill ratio is 1.0, so 86.5 % of the power passes.
Power spectrum of a simulated position record with the fitted spectrum and the corner frequency.
Stiffness from thermal motion. The kit fits the exact spectrum of a sampled record, with aliasing included, by maximum likelihood (Berg-Sørensen & Flyvbjerg 2004). On a simulated 0.5 µm-radius sphere held at 0.0200 pN/nm, it recovers 0.0204 pN/nm.

Every check is tested against a known answer: a 0.3 mm gap measures 0.300 mm, a removed via is reported as an open, and a lens focuses a beam to λf/πw. The tests run on macOS and Ubuntu with Python 3.11 to 3.13.

The acoustic replicator

A simulation study, designed with an AI agent in the same way. The simulation says the idea is physically sound and worth a bench prototype. Nothing has been built yet.

The acoustic replicator is a 3D printer that carries droplets of UV resin through the air with a 40 kHz ultrasonic phased array and cures them one at a time onto a part hanging on a pin. The study covers the physics, the full hardware design (printed frame, every bought part, screw and wire) and a routed transducer board ready for JLCPCB.

The whole 4-hour print, simulated, seen from an in-machine camera at about 1000× speed, with UV cure flashes.
The replicator's full hardware model inside its enclosure.
The machine. 1,197 solids with no overlaps, 224 wires terminated, and six service motions with no collisions.
The transducer cage: green boards on a rhombicuboctahedron with wiring.
The array cage. 18 boards carrying 450 transducers on a rhombicuboctahedron.
Three simulated Benchy prints made of droplets.
Simulated prints of 3DBenchy (by Creative Tools): one droplet size, a fine shell, and landing errors measured on Benchy flights. Mean surface error 0.05 to 0.09 mm.
Four copper layers of the TB-25 transducer board.
TB-25 transducer board: four layers, routed and checked from its Gerber files.

Repositories

Install

In Claude Code, add kicad-happy's marketplace first (the plugin depends on it), then this one:

/plugin marketplace add aklofas/kicad-happy
/plugin marketplace add cforcomputer/build-hardware-with-ai
/plugin install build-hardware-with-ai@build-hardware-with-ai

For any other MCP client, the server's command is:

uvx --from git+https://github.com/cforcomputer/build-hardware-with-ai hwkit mcp

For the command-line tool alone:

uv tool install git+https://github.com/cforcomputer/build-hardware-with-ai

Cite

@software{obrien2026buildhardware,
  author  = {O'Brien, Patrick},
  title   = {build-hardware-with-ai: checks, tools and skills
             for AI agents that build hardware},
  year    = {2026},
  version = {0.2.1},
  license = {MIT},
  url     = {https://github.com/cforcomputer/build-hardware-with-ai}
}