Agentic AI and End-to-End PCB Understanding #112
Replies: 3 comments 1 reply
|
So I am working on similarly focused stuff. I think that we need to break the tools up into groups (tool boxes) and each toolbox should have an agent / skills to help guide the LLM for proper use. I have been playing with adding both to each toolbox i create. and in one experiment I have our tool context window use down from 15K tokens down to 2k. I will probably start a thread on this over here -- so people can see what I am talking about - https://forum.orchis.ai/ I am also training (trying to) local LLM models to use the tool as well. I am going to start a run this weekend with a Qwen VL model to see if I can create a 'schematic agent' -- i have had good luck with training one on KiCAD usage docs, troubleshooting guides, and my own tool calls to the KiCAD MCP server. A lot of what I have tried has worked, but i am still refining. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Agentic AI and End-to-End PCB Understanding
This document describes what KiCAD MCP Server exposes today, what is missing for agents to reason about a PCB from data alone, and a layered roadmap so autonomous or semi-autonomous agents can approach end-to-end comprehension of a design (schematic intent → physical copper → manufacturability → domain-specific checks such as RF).
It is intended for maintainers, contributors, and MCP client authors who want to extend the server or document limitations clearly on GitHub.
1. Terminology
.kicad_pcb/.kicad_schtext unless the protocol explicitly exposes that.2. What the project already provides (strengths)
KiCAD MCP Server is strong at the traditional KiCad automation surface:
2.1 Project and lifecycle
2.2 Schematic (logical design)
generate_netlist): references, values, footprints, net →(component, pin)membership.2.3 PCB (board-level operations)
2.4 Libraries and manufacturing
2.5 Execution backends
pcbnewwithout UI.These capabilities support workflow automation, documentation, DRC triage, and high-level reasoning about what is on the board and how nets are named and connected in the schematic.
3. What is still missing (gaps vs. end-to-end understanding)
The following gaps limit an agent that must rely only on MCP (no ad-hoc file parsing):
3.1 Spatial copper model
(start, end, width, layer)U1pin 5” to where on the board requires pad positions and net codes.Today, answering “minimum lateral distance between net A and net B on F.Cu” typically requires parsing
.kicad_pcboutside MCP or custom scripts.3.2 Spatial relationships (queries, not just lists)
3.3 Zone (pour) semantics beyond “add zone”
3.4 Schematic ↔ PCB physical graph
3.5 Stackup and controlled impedance
.kicad_pcb/ project settings but is not surfaced as a single MCP response designed for SI tools.3.6 3D / mechanical / thermal
3.7 Backend parity and truth source
\_backend/ capability flags so they know when a tool is authoritative.4. Agentic AI perspective: how an agent should reason end-to-end
Think in layers of representation. Each layer can be implemented as one or more MCP tools returning versioned JSON.
Layer 0 — Session and scope
Agent use: always establish scope before deep analysis.
Layer 1 — Logical design (already largely available)
Agent use: BOM-style questions, connectivity, naming, power domains at a logical level.
Layer 2 — Physical placement
Agent use: assembly, connector orientation, mechanical clearance to board edge.
Layer 3 — Conductive geometry (major gap today)
Agent use: length matching intuition, stub detection, “show me all copper on net X,” lateral spacing, layer usage.
Layer 4 — Spatial queries (built on Layer 3)
Agent use: NFC/critical pairs, creepage-like checks (not a substitute for certified high-voltage rules unless modeled).
Layer 5 — Zones and planes
Agent use: return path, shielding, thermal spokes, pour intrusion between sensitive traces.
Layer 6 — Design rules and DRC as structured facts
Agent use: triage, explain violations, suggest fixes (still needs Layer 3 for “why here”).
Layer 7 — Domain adapters (optional, pluggable)
Agent use: “Is this NFC loop likely detuned?” — only after Layers 3–5 + domain tool.
End-to-end for an agent means: it can traverse Layer 1 → 7 inside the MCP contract, without smuggling in unpublished side channels—except where you explicitly document an external tool as part of the workflow.
5. Roadmap: concrete upgrades (prioritized)
Phase A — Geometry export (highest leverage)
get_net_geometry(orlist_tracksfiltered by net name / code)list_vias_for_net/list_pads_for_componentwith nets and positions.Phase B — Spatial queries
min_clearance_between_nets(net_a, net_b, layers?)parallel_run_statsfor pair analysis (length of co-directional proximity).Phase C — Zones and pour summaries
list_zoneswith polygon vertices (or bbox + hole count).Phase D — Physical connectivity graph
get_physical_pathfrom(ref, pin)to(ref, pin)or to nearest net segment list.generate_netlistoutput.Phase E — Stackup and impedance (explicitly “assistant” tier)
get_stackupas structured JSON from the board file.Phase F — Agent ergonomics
schemaVersionfield per tool response.AGENT_PLAYBOOK.md: recommended tool order for “analyze net X,” “compare two nets,” “pre-fab checklist.”6. Context budget and MCP tuning (token-aware design)
Richer MCP data (geometry, large netlists, full DRC dumps) must be paired with mechanisms that keep LLM context and client tool lists sustainable. Without this, token usage and “tool overload” errors grow quickly—not an MCP flaw, but a product design requirement for any bridge.
6.1 Reduce what the client advertises
6.2 Reduce payload per tool call
limit/offsetor cursors on large lists (components, nets, tracks).net_name,layer,reference_prefix, or spatialbboxbefore returning geometry.detaillevelsminimal | standard | fullon new heavy tools.6.3 Offload bulk data from the chat transcript
6.4 Client and workflow discipline
6.5 Design contract for new tools (e.g.
get_net_geometry)When adding high-volume tools, specify from day one:
7. Non-goals (be explicit on GitHub)
To avoid scope creep:
8. Summary
9. Related documents
Contributions welcome: if you implement
get_net_geometryor similar, link the PR here and update the Tool Inventory.All reactions