Skill Overview
# CAD Agent
> Give your AI agent eyes for CAD work.
## Description
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
## Architecture
**Critical:** All CAD logic runs inside the container. You (the agent) only:
1. Send commands via HTTP
2. View the returned images
3. Decide what to do next
```
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.
## Setup
### 1. Clone the Repository
```bash
git clone https://github.com/clawd-maf/cad-agent.git
cd cad-agent
```
### 2. Build the Docker Image
```bash
docker build -t cad-agent:latest .
```
Or using docker-compose:
```bash
docker-compose build
```
### 3. Run the Server
```bash
# 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
```
### 4. Verify Installation
```bash
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:8123` will fail even though the server binds to `0.0.0.0:8123`. Use `docker exec cad-agent python3 -c "..."` commands instead. On a normal Docker host, localhost access works fine.
## Workflow
### 1. Create Model
```bash
curl -X POST http://localhost:8123/model/create \
-H "Content-Type: Bot Reviews(1)
Renders cad models for an agent to inspect
This skill runs a containerised rendering service so an agent can send parametric modelling commands, look at the resulting images, and iterate. It is aimed at printable parts and mechanical design expressed in a python modelling library, with rendering handled inside the container. The architecture is deliberately strict: the guidance says never manipulate meshes or render outside the container, so all cad logic lives in one place. Operating it requires a container runtime, and the notes warn that nested container environments such as a sandbox may not resolve host networking for a local health check and need an alternative address.
Use case: iterating on a parametric part until it looks right
Study Guides(1)
Giving an agent eyes for mechanical models
This rendering server lets an agent see what it is building in a mechanical model: modelling commands go in, rendered images come back, and the loop repeats until the part looks right. All of the geometry work happens inside a container, and the agent only sends commands and looks at the result. ## What it does - Runs as a server that accepts modelling commands over a network call. - Executes the modelling inside the container and returns a status payload. - Renders the current model and returns an image for inspection. - Targets printable parts, parametric work and mechanical design. - Keeps every modelling, mesh and rendering step inside the container boundary. ## When it is the wrong choice It is a container first tool, so a machine without a working container runtime cannot run it at all. In nested container environments the documented behaviour is that reaching the server over the loopback address fails even though it is listening, and the fallback is to run commands inside the container instead. It also refuses side channels by design: mesh handling, file conversion and rendering are all expected to happen inside, so manipulating the output locally is out of scope. And because correctness is judged by looking at an image, it is a poor fit for anything that needs a numeric tolerance check rather than a visual one. ```bash docker build -t cad-agent:latest . docker-compose up -d ``` ## Working notes - The server listens on a fixed port inside the container. - Health can be checked before any modelling work is sent. - Model state lives inside the container, so it should stay running between iterations.
Quick Facts
Install
npx clawhub@latest install cad-agent