klayout-tools
Standalone Python tools that let AI agents parse, analyze and manipulate chip layouts (GDSII/OASIS, DRC decks, LVS) headless with machine-readable JSON, built on the KLayout Python API.
What it does and how it connects
klayout-tools is a set of standalone Python tools that let AI agents parse, analyze and manipulate chip layouts (GDSII/OASIS streams, DRC decks, LVS) headless, with machine-readable JSON everywhere. It is built on KLayout's Python API, and the heavy lifting stays in that proven engine. The target capability stated in the README is an agent taking a spec through analog, digital or mixed-signal paths on an open PDK, unaided, with every step headless and JSON-contracted.
The klt CLI covers structured layout access, machine-readable output with --format json on every command, programmatic layout writing (klt gen, gen-compose, draw), and an MCP server (klt mcp serve) exposing every verb over stdio, generated from the CLI registry. Status is early alpha: v0.5.0 shipped on PyPI with 44 verbs, and the build order lives in ROADMAP.md.
Install is uv tool install klayout-tools or pip install klayout-tools, which provides the klayout Python module only; klt drc with the KLayout engine additionally needs a system KLayout application on PATH. The project is built in the open by 2AM Logic, and its site is klayout-tools.org.
Alternatives
Compare side by side- OpenROAD
The unified RTL-to-GDS application for synthesis, floorplanning, placement, clock-tree synthesis, routing and sign-off, rather than agent tools for parsing and manipulating layouts.
- vibe-ic
A Claude Code plugin that drives a full IC flow from natural-language intent, rather than standalone CLI tools for layout work.
- IHP-Open-PDK
A 130 nm BiCMOS open-source PDK for analog, mixed-signal and RF design, rather than tools that operate on layouts.
Recurring errors it addresses
Error Index entries this tool is built to reduce or work around.
- A klt DRC report from a sky130 run records the PDK as gf180mcuA in its provenance block while the deck field in the same block says sky130, so any gate keyed on provenance.pdk would reject good sky130 evidence or accept it as gf180mcu.Error Index
- klt drc on a PDK-drawn nfet_10v0_asym reports clean while layers 210/0 and 226/0 show up under layers_in_stream_without_rules; the PDK ships 35 ldnmos and 38 ldpmos rule outputs and the curated deck has none of them, so a clean report says nothing about coverage.Error Index
- The synthesis check re-hashes RTL and liberty but records no hash of the netlist it produced, so it cannot catch a committed gate-level netlist that was hand-edited or went stale after resynthesis. It also needs the PDK on the checking host, so signoff CI skips it.Error Index
- A KLayout-PEX run succeeded while a device dropped out of the extracted netlist, because the PEX and LVS decks had drifted apart and unrecognized device shapes extracted as plain wiring.Error Index
Sources
Not verified
- Pricing: none stated on the repo.
- No independent user voice found: recent repo activity is bot-filed fleet issues and pull requests.
- The README calls the project early alpha; v0.5.0 is the latest release.
Last verified November 6, 2026. Listings are informational. The evidence score measures public, verifiable evidence and is not an endorsement or a compatibility claim.