agentcad
CAD tool for AI agents. Give your coding agent the ability to design 3D models.
Your agent writes build123d Python scripts by default. agentcad handles execution, STEP export, PNG rendering, mesh export (STL/GLB/OBJ), geometric metrics, validation, diffing, and browser preview. CadQuery remains available as an explicit compatibility mode. Each command's final response is structured JSON on stdout.
Reading the output: the JSON response is written to stdout; human-readable progress and diagnostics go to stderr. Parse stdout as JSON and treat stderr as plain text — don't merge the streams with
2>&1before a JSON parser, or the progress lines will break parsing. If you need both, capture them separately.
agentcad is open source under the Apache License 2.0. It runs locally and requires no signup.
Demo
A coding agent designing in agentcad, live. See more at agentcad.dev.
Introducing parts
Parts let an agent build CAD as named, color-coded pieces and groups, then hand back a viewer a human can inspect. Watch the demo on YouTube or read the story at agentcad.dev/parts.
Quick start
Install agentcad, then paste this into Claude Code, Cursor, or any coding agent:
Create a Python 3.12 virtual environment, then:
pip install agentcad
agentcad skill install
agentcad instructions install
agentcad --help
agentcad init --name phone-stand
Read the --help output — it's your guide to creating, checking, and sharing a model.
Use the default build123d runtime unless the task explicitly requires
CadQuery compatibility.
Then design me a phone stand: a simple angled cradle that holds a phone
at 60 degrees. About 80mm wide, 50mm deep, with a 5mm lip at the bottom
to keep the phone from sliding. Show me a preview when you're done.
What it does
agentcad run script.py --output label— execute a build123d script, producing a versioned STEP file + geometric metrics (volume, dimensions, validity, face/edge counts)- Automatic review viewer — successful runs open
viewer.html; from v2, A=previous and B=current are preloaded for A/B, side-by-side, overlay, and Parts-tab change review (--no-viewopts out) agentcad run ... --preview— four-view PNG for visual verification; the browser viewer can export an on-demand turntable GIFagentcad run ... --render iso,front— high-quality PNG viewsagentcad run ... --export stl,glb— mesh export for 3D printing or web viewersagentcad measure output.step— dimensional report (overall metrics, edge lengths, face areas, circular/cylindrical diameters)agentcad check-spec output.step spec.json— compare measured cylindrical features against an explicit checklistagentcad inspect output.step— topology deep-dive (shells, free edges, validity)agentcad parts list REF— list named/captured parts for a versionagentcad parts show REF ID— show one versioned part by stable idagentcad parts view REF— hand off an isolated, focused, or grouped part review vieweragentcad diff 1 2— compare versions, including actual shared/reference-only/candidate-only source-frame volume for valid closed solidsagentcad view old.step new.step— open a synchronized A/B comparison with separate centered projection and source-frame 3D volume artifactsagentcad docs [section]— runtime-aware built-in documentation and worked examples
No boilerplate
Scripts need zero imports. By default, build123d primitives, show_object, and agentcad edit helpers are pre-injected:
box = Box(10, 20, 5)
show_object(box)
agentcad init records build123d as the project runtime. That keeps the
script API, built-in docs, and subsequent runs on one clear default.
CadQuery compatibility
CadQuery remains supported for existing scripts and projects, but it is not the default authoring path.
For a CadQuery project:
agentcad init --name legacy-model --runtime cadquery
agentcad docs quickstart --runtime cadquery
agentcad run script.py --output first
For a one-off CadQuery script inside a build123d project:
agentcad docs preamble --runtime cadquery
agentcad run legacy.py --output legacy --runtime cadquery
Keep each script on one CAD API. If a script clearly targets the other engine,
agentcad reports the mismatch and the exact one-off override. Run
agentcad docs runtimes for the complete dispatch contract.
MCP integration
For native tool integration with Claude Code, Cursor, or Windsurf:
pip install agentcad[mcp]
Add to .mcp.json:
{"agentcad": {"command": "python", "args": ["-m", "agentcad.mcp"]}}
Requirements
- Python 3.10–3.12 (OpenCascade bindings do not support 3.13+)
License
Apache License 2.0. See LICENSE.
Feedback
If your agent struggles, run agentcad feedback "what happened" to capture a friction log.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentcad-0.4.1.tar.gz.
File metadata
- Download URL: agentcad-0.4.1.tar.gz
- Upload date:
- Size: 361.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
958b8937a76929119fba190f9d7ead9d311ab1538abd76bcc65a68aab529a4c6
|
|
| MD5 |
32c277e757a5f45334b80dfeed004e0e
|
|
| BLAKE2b-256 |
36b8405e4f0f1f2d58456e2aab8a4df9dd8652f785f48f2f20bf4594e948a0fe
|
Provenance
The following attestation bundles were made for agentcad-0.4.1.tar.gz:
Publisher:
publish.yml on jdilla1277/agentcad
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentcad-0.4.1.tar.gz -
Subject digest:
958b8937a76929119fba190f9d7ead9d311ab1538abd76bcc65a68aab529a4c6 - Sigstore transparency entry: 2497782635
- Sigstore integration time:
-
Permalink:
jdilla1277/agentcad@64d73533d3762cc8c2146e2336a8aba3e89a9285 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/jdilla1277
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@64d73533d3762cc8c2146e2336a8aba3e89a9285 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agentcad-0.4.1-py3-none-any.whl.
File metadata
- Download URL: agentcad-0.4.1-py3-none-any.whl
- Upload date:
- Size: 233.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6857d7da8e970c9afeb6863ce03127ec31169a6fd774d155b4879dd41509b144
|
|
| MD5 |
72a07230af522309b1ed64fa2f6874ec
|
|
| BLAKE2b-256 |
ad3561fa983bdaba6a42e79d9e19d3d54b5bf5e40f7321031e46a91e5563a8cc
|
Provenance
The following attestation bundles were made for agentcad-0.4.1-py3-none-any.whl:
Publisher:
publish.yml on jdilla1277/agentcad
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentcad-0.4.1-py3-none-any.whl -
Subject digest:
6857d7da8e970c9afeb6863ce03127ec31169a6fd774d155b4879dd41509b144 - Sigstore transparency entry: 2497782669
- Sigstore integration time:
-
Permalink:
jdilla1277/agentcad@64d73533d3762cc8c2146e2336a8aba3e89a9285 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/jdilla1277
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@64d73533d3762cc8c2146e2336a8aba3e89a9285 -
Trigger Event:
release
-
Statement type: