Guide
AI PCB routing explained
How an AI agent actually routes a PCB — the commands it issues, how collisions are handled, why it never rewrites copper it was not asked to touch, and where it hands back to you.
Last updated
Autorouting has a bad reputation among people who have used it, and mostly a deserved one: a router that rearranges your careful work to solve its own problem is worse than routing by hand. Agent-driven routing is a different proposition, and the difference is worth being precise about.
This page explains what happens when an agent routes copper in Schema — the commands, the collision behaviour, and the guarantees that make it safe to let it work on a board you have already put effort into.
This is not an autorouter
A classic autorouter takes the whole board and solves it globally, which means it can and will move anything. The agent here routes named connections one at a time, using the same commands you would.
The guarantee that matters
The commands
The simple case is a single call:
route_trace U1 12 R4 1 F.Cu 0.25Layer and width are optional — omitting the width uses the net class width, which is usually what you want. For a route that needs to take a particular path, there is an interactive form:
begin_route U1 12 F.Cu
add_waypoint 42.5 31.0
add_waypoint 48.2 31.0
commit_route R4 1Nothing is committed until commit_route, and cancel_route abandons the attempt — so a route that turns out badly costs nothing.
How collisions are handled
There are two strategies, and which one is in effect changes the meaning of the result:
- WalkAround (the default) routes the new trace around obstacles and never edits existing copper. If it cannot find a path, it says so.
- HighlightCollisions draws the direct path and flags the clashes without resolving them — useful when you want to see what is in the way rather than have it avoided.
set_routing_mode WalkAroundBend angles are constrained separately. The default is HV45 — horizontal, vertical and 45° segments — with HV for orthogonal-only and Free for unconstrained.
set_angle_mode HV45How the agent decides what to route
- 1list_unrouted returns the ratsnest — the connections that exist electrically but have no copper yet. This is the work queue.
- 2describe_pcb returns the board as JSON: footprints, pads, traces, vias and unrouted connections, each with a stable uuid.
- 3route_trace attempts one connection. The result says whether it succeeded and what it did.
- 4render_board draws the board from the document, with a labelled millimetre grid, so the agent can look at what it produced rather than assume.
- 5Design rules are checked, and a route that violates clearance can be deleted and attempted differently.
Rendered, not screenshotted
Where it hands back to you
- Anything with an impedance or length requirement. The agent routes connections; it does not tune them.
- Board-level placement strategy. Where the connectors and the regulator go is a decision about the product, not about copper.
- Nets where the path is the design — a sense line, a return path under a switching node, a shield.
- Any net it reports it could not route. That report is the useful output, and usually means placement needs to change rather than routing.
The pattern that works is the same one that works with the schematic: let it do the connections whose correct answer is uncontroversial, and spend your attention on the ones where it is not.
Frequently asked questions
Is AI PCB routing better than autorouting?
They solve different problems. A classic autorouter optimises the whole board at once and may rearrange work you did deliberately. An agent routes named connections one at a time and never edits copper it was not asked to touch, so it can be used on a board that is already partly routed by hand.
Will the agent move traces I routed myself?
No. The router detours around existing copper or reports that it cannot, and never rewrites a trace it was not asked to route. That guarantee is what makes it usable on real work.
Can AI route high-speed signals?
It can route them in the sense of making the connection, but length tuning, impedance control and differential-pair matching are not things to delegate. Route those yourself, and let the agent take the connections where the path does not carry design intent.
What happens if a net cannot be routed?
The command reports the failure rather than forcing a path or moving something else out of the way. In practice an unroutable net usually means the placement needs to change, and knowing that is more useful than a route that only exists because something else got wrecked.
More guides
Try it on your own board
Free to start on macOS, Windows and Linux. Reads your existing KiCad and Altium libraries.
