Fragua

An AI-native PCB design tool. The agent drives the schematic, the placement, the auto-router and the rule checks; you watch the board form on screen and steer when you need to. One desktop binary, no kicad-cli, no freerouting.jar.

The agent talks to a small, deterministic API.

Fragua exposes a local HTTP endpoint on 127.0.0.1:7878. The agent posts line-oriented commands; fragua mutates the project, runs the router and the rule checks, and streams the new state back to the UI in real time. The same in-memory project is what you see and what you can drag.

agent → POST /script
# start a project, pull a library, drop symbols
lib std
sym U1 std:ATmega328P
sym Y1 std:Crystal_16MHz
sym C1 std:Cap_0805 22pF
sym C2 std:Cap_0805 22pF

# declare nets, attach a class so the router knows the rules
class power width=0.30 clearance=0.20
net VCC class=power
net GND class=power
net XTAL1 U1.XTAL1 Y1.1 C1.1
net XTAL2 U1.XTAL2 Y1.2 C2.1

# let fragua place it, route it, check it, pack it
auto-place
route
drc           → 0 violations
pack fab=jlcpcb
              → out/jlcpcb-rev1.zip  ready to upload
One loop, one binary. The script reference is printed at app launch and served at GET /. The agent reads it once and drives every step from there — no plugin system, no out-of-band tooling.

From a sentence to a fab-ready zip.

The agent owns the workflow. You watch each step happen on the canvas and step in to redirect, mark up, or correct.

01
intake
Natural-language prompt or code description in. The agent restates the requirements.
02
clarify
Missing decisions surface as questions — target voltage, connector, dimensions, mechanical constraints.
03
schematic
Symbols, nets, classes. ERC validates as it grows. Live on the canvas.
04
advise
Decoupling caps, ESD, pull-ups, test points — proposed; you accept or reject each.
05
size
Outline derived from footprints, connectors and mechanical constraints — or set explicitly.
06
place
Simulated annealing on movable parts. Drag any component; the agent re-plans around fixed positions.
07
route
A* on a 2-layer grid + rip-up-and-reroute + negotiated congestion. You watch the traces land.
08
check
DRC + manufacturing-DRC run continuously. Violations highlighted; agent proposes fixes; you approve.
09
pour
Ground / power pours on both layers with thermal reliefs. Auto-recomputed on every change.
10
pack
Gerbers + drill + BOM + CPL + README in one zip, ready to upload to JLCPCB, PCBWay or generic.

Everything in one Rust process.

No external CAD binaries. No kicad-cli, no java -jar freerouting.jar, no wrapper crates. Every file format is implemented from scratch so the agent loop never shells out and never blocks.

pcb-script
Line-oriented agent DSL: lib, sym, net, class, place, route, erc, drc, auto-pour, pack. Reference served at GET /.
pcb-router
A* on a 2-layer grid + rip-up-and-reroute + negotiated congestion + Steiner-style multi-source. Per-net width and clearance from NetClass.
pcb-placer
Simulated annealing on HPWL + soft gap penalty + rasterised pad-bbox congestion proxy. Respects fixed positions.
pcb-drc
Pad/trace clearance, drill, edge clearance, narrow-trace and routing-efficiency checks. Per-net overrides supported.
pcb-erc
Floating pin, duplicate pin, orphan symbol, phantom net; role-based: multiple drivers, unpowered power net, undriven input.
pcb-fab
Provider { Jlcpcb, Pcbway, Generic } with manufacturing-DRC and per-provider BOM + CPL formats. pack(...) ships a ready-to-upload zip.
pcb-gerber
RS-274X writer (rounded outlines emit arcs), Excellon drills, BOM and pick-and-place CSV. From scratch.
pcb-render
Board → SVG. Substrate with rounded corners, copper, silkscreen with Hershey strokes, DRC marker overlay.
tauri shell
Local HTTP API on 127.0.0.1:7878. Frontend pans, zooms and annotates the live SVG; surfaces the activity log.

One curl, one binary.

macOS arm64/x64 and Linux x64 are built and released on every tag. Windows users grab the zip from the releases page.

shell
$ curl -fsSL https://raw.githubusercontent.com/mentasystems/fragua/master/scripts/install.sh | sh
# drops fragua into /usr/local/bin (or ~/.local/bin)

$ fragua                          # opens the window, starts the API on :7878
$ fragua path/to/project.fragua   # or open an existing project
Then tell your AI to design the hardware. The window stays open, the script reference is served on GET /, and the agent drives the rest.