Architecture
Tell the agent which parts belong together, what must stay put, and which connections matter most. EasyEDA Copilot turns those decisions into a placement you can inspect and a board you can keep editing.
From agent to editor
MCP setup ↗- AI clientReads the design and calls engineering tools over MCP stdio.
- MCP bridgeCoordinates the tools and talks to the extension over a local WebSocket at
127.0.0.1:8787. - Engineering enginesUse the board, footprints and rules to compute placement and routing.
- EasyEDA extensionApplies native components, tracks, vias and copper zones to the open document.
The bridge and placement computations run locally. Part resolution can use EasyEDA’s public APIs, and the configured model provider determines where inference runs.
Give the placer a few meaningful rules
For a decoupling capacitor, the instruction that matters is which supply pin it serves. The model names the pins. The placement engine resolves their positions within the two footprints and searches for an arrangement. Pad proximity is a preference the solver balances with other goals. A fixed position is a requirement.
The domain-specific language (DSL) uses familiar function calls and named options. It was designed so models trained on code could work from short examples and produce rules an engineer can read, check and revise. The model still needs the correct parts, pins and electrical priorities.
Placement DSL reference ↗board.auto();
block("mcu", ["U1", "C1"], "mcu");
veryNear(pin("C1", 1), pin("U1", 5));
Size a rectangular board from the footprints, group the MCU and capacitor, and strongly prefer keeping their specified pads close.
Specify exact positions where they matter
A small model can give AutoPlace a few groups and pin relationships and let it search the geometry. A larger model can describe more of the intended layout, from rough local arrangements to exact coordinates. Both use the same engine.
A position lock is useful when a connector must line up with a case opening. Locking ordinary support parts limits the solver’s ability to shorten loops or leave room for routing. Give the engine room wherever the design allows it.
Placement workflow and constraints ↗fixed("J1", { x: -15, y: 0, rotate: 90 })- Set a component’s exact position and angle. The board centre is the coordinate origin. Use
edgeMount()when the connector must face an edge and its footprint should determine how it sits there. preserve({ board: true, components: ["J1"] })- Keep the outline and J1’s current pose from the open PCB while placing other parts.
localLayoutin a block- Suggest approximate positions for selected parts relative to their block. The solver fits the parts around this arrangement, and the completed block can move and rotate as a unit.
fixedin a block- Solve the group internally, then lock the resulting arrangement to the board using one member’s exact position and angle.
Give the router a plan for copper
The routing DSL selects widths, clearances, layers and special cases such as differential pairs or ground planes. The MCP bridge sends the board and these rules to the open-source eda-copilot-router package, then converts the result into EasyEDA tracks and vias.
Existing copper is treated as fixed by default. A repair can explicitly select copper to replace. If parts leave no usable path around a dense pin field, revising the placement can open a route that the current geometry prevents.
Routing instructions ↗drc({ trackWidthMm: 0.2, clearanceMm: 0.15 });
powerNet("+5V", { trackWidthMm: 0.6, allowedLayers: "OUTER" });
plane({ net: "GND", layers: "BOTTOM" });
runAll();
Set baseline rules, request wider tracks for the 5 V supply on outer layers, and add a bottom ground plane. Real values depend on the board’s current, stackup and fabrication limits.
Check the rules, the preview and the board
Each check answers a different question. A valid pin reference, for example, can still lead to a capacitor that sits too far from its supply pin once the whole board is packed.
Read the complete workflow ↗- Validate the intent.
validate_pcb_dslevaluates the placement program, checks rule structure and references against the linked schematic and PCB, and reports conflicts and possible omissions. Engineering requirements outside the supplied design data still need to be stated. - Solve and inspect.
make_pcb_layoutresolves footprints, arranges parts within blocks and packs them on the board. Review clearance, connector access, pad-to-pad distance and space for copper. A focused mechanical or block preview is for review. The full placement provides an assembly ID. - Apply with recovery. Send the selected placement to the open PCB in a separate step. The extension saves a full-document checkpoint before changing the placement. Routing gets its own checkpoint before applying copper. An application exception triggers restoration. An applied partial route can stay in the editor for focused repair.
- Inspect the native result. Review tracks, filled copper and critical nets, and read EasyEDA’s design-rule check (DRC) on the current board. Use the findings to keep, repair or restore it. A clean DRC still leaves questions like current capacity, return paths and impedance to engineering review.
Changes stay editable
Native objects let you continue in the same document after an automated step. For unusual operations, the agent can also use the EasyEDA editor API directly. This gives precise control and calls for explicit object selection, checkpointing and verification.
See these decisions in real projects →