cad-agentSend build123d CAD commands via HTTP to render images, allowing visual iteration on 3D models entirely within a containerized CAD environment.
Install via ClawdBot CLI:
clawdbot install clawd-maf/cad-agentGive your AI agent eyes for CAD work.
CAD Agent is a rendering server that lets AI agents see what they're building. Send modeling commands β receive rendered images β iterate visually.
Use when: designing 3D-printable parts, parametric CAD, mechanical design, build123d modeling
Critical: All CAD logic runs inside the container. You (the agent) only:
YOU (agent) CAD AGENT CONTAINER
βββββββββββββ βββββββββββββββββββ
Send build123d code β Executes modeling
β Returns JSON status
Request render β VTK renders the model
β Returns PNG image
*Look at the image*
Decide: iterate or done
Never do STL manipulation, mesh processing, or rendering outside the container. The container handles everything β you just command and observe.
git clone https://github.com/clawd-maf/cad-agent.git
cd cad-agent
docker build -t cad-agent:latest .
Or using docker-compose:
docker-compose build
# Using docker-compose (recommended)
docker-compose up -d
# Or using docker directly
docker run -d --name cad-agent -p 8123:8123 cad-agent:latest serve
curl http://localhost:8123/health
# Should return: {"status": "healthy", ...}
Docker-in-Docker caveat: In nested container environments (e.g., Clawdbot sandbox), host networking may not workβcurl localhost:8123will fail even though the server binds to0.0.0.0:8123. Usedocker exec cad-agent python3 -c "..."commands instead. On a normal Docker host, localhost access works fine.
curl -X POST http://localhost:8123/model/create \
-H "Content-Type: application/json" \
-d '{
"name": "my_part",
"code": "from build123d import *\nresult = Box(60, 40, 30)"
}'
# Get multi-view (front/right/top/iso)
curl -X POST http://localhost:8123/render/multiview \
-d '{"model_name": "my_part"}' -o views.png
# Or 3D isometric
curl -X POST http://localhost:8123/render/3d \
-d '{"model_name": "my_part", "view": "isometric"}' -o iso.png
Look at the image. Does it look right? If not, modify and re-render.
curl -X POST http://localhost:8123/model/modify \
-d '{
"name": "my_part",
"code": "result = result - Cylinder(5, 50).locate(Pos(20, 10, 0))"
}'
# Re-render to check
curl -X POST http://localhost:8123/render/3d \
-d '{"model_name": "my_part"}' -o updated.png
curl -X POST http://localhost:8123/export \
-d '{"model_name": "my_part", "format": "stl"}' -o part.stl
| Endpoint | What it does |
|----------|--------------|
| POST /model/create | Run build123d code, create model |
| POST /model/modify | Modify existing model |
| GET /model/list | List models in session |
| GET /model/{name}/measure | Get dimensions |
| POST /render/3d | 3D shaded render (VTK) |
| POST /render/2d | 2D technical drawing |
| POST /render/multiview | 4-view composite |
| POST /export | Export STL/STEP/3MF |
| POST /analyze/printability | Check if printable |
from build123d import *
# Primitives
Box(width, depth, height)
Cylinder(radius, height)
Sphere(radius)
# Boolean
a + b # union
a - b # subtract
a & b # intersect
# Position
part.locate(Pos(x, y, z))
part.rotate(Axis.Z, 45)
# Edges
fillet(part.edges(), radius)
chamfer(part.edges(), length)
The project has safeguards against accidentally committing CAD outputs:
.gitignore blocks .stl, .step, *.3mf, etc.Generated Mar 1, 2026
An AI agent designs custom mechanical parts like brackets or enclosures, iterating visually through CAD commands and renders to ensure fit and printability before exporting STL files for 3D printing. This accelerates prototyping cycles in small-scale manufacturing or hobbyist projects.
The agent automates the creation of parametric CAD models, such as adjustable gears or furniture components, by modifying build123d code based on user inputs and verifying changes with rendered images. This reduces manual design time in engineering and product development.
Students or trainees use the agent to learn CAD principles by sending modeling commands and receiving visual feedback through renders, enabling hands-on practice without installing complex software. This supports vocational training in technical schools or online courses.
An AI designs and assembles multiple parts, like in a robotic arm, using the agent to create, modify, and render components to check for interferences and alignment before exporting for simulation or production. This ensures design integrity in robotics and automotive sectors.
An e-commerce platform integrates the agent to generate personalized CAD models, such as phone cases or jewelry, based on customer specifications, with renders provided for approval before manufacturing. This enables on-demand production in retail and customization services.
Offer tiered monthly subscriptions for access to the CAD Agent API, with limits on render requests and model storage, targeting small businesses and freelancers who need affordable CAD automation. Revenue comes from recurring fees scaled by usage and features.
Charge users per render or export operation, ideal for occasional users like hobbyists or educators who don't need continuous access. This model minimizes upfront costs and generates revenue based on actual consumption of computational resources.
Sell annual licenses to large companies for integrating the CAD Agent into their internal workflows, such as in manufacturing or design firms, with custom support, SLA guarantees, and volume discounts. Revenue is driven by high-value contracts and maintenance fees.
π¬ Integration Tip
Ensure the agent runs in a Docker environment with proper networking, and use the provided endpoints sequentiallyβcreate, render, iterateβto maintain visual feedback loops without bypassing the container.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection