Skip to content

isayahc/AgentCAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentCAD

A web application for using AI agents to quickly generate 3D CAD models. Describe what you want in natural language and AgentCAD produces a STEP file you can open in any CAD software.

Example – robot arm generated by AgentCAD


Prerequisites

  • Python 3.12+
  • Node.js 18+ and npm
  • An API key for your chosen LLM provider (e.g. ANTHROPIC_API_KEY)

Quick Start

1. Clone the repository

git clone https://github.com/isayahc/AgentCAD.git
cd AgentCAD

2. Set up the backend

cd backend

# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate      # Linux / macOS
# .venv\Scripts\activate       # Windows

# Install dependencies
pip install -r ../requirements.txt

# Configure environment variables
cp example.env .env
# Edit .env and fill in your API key(s):
#   ANTHROPIC_API_KEY=sk-...
#   STEP_OUTPUT_FILE=          (optional)

Start the backend server:

cd src
uvicorn app:app --reload --host 0.0.0.0 --port 8000

The API will be available at http://localhost:8000.

3. Set up the frontend

Open a new terminal and navigate to the frontend directory:

cd frontend

# Install dependencies (use --legacy-peer-deps if you encounter peer dependency issues)
npm install --legacy-peer-deps

# Start the development server
npm run dev

The frontend will be available at http://localhost:3000. It automatically proxies API requests to the backend.


Usage

  1. Open http://localhost:3000 in your browser.
  2. Type a natural-language prompt describing the 3D model you want (e.g. "make a simple robot arm").
  3. Optionally attach a reference image.
  4. AgentCAD generates a STEP file, which you can view in the browser or download and open in any CAD software.

Project Structure

AgentCAD/
├── assets/          # Static assets (example images)
├── backend/         # FastAPI backend + CAD-generation agent
│   ├── src/
│   │   ├── app.py                   # FastAPI application
│   │   └── step_generating_agent.py # LLM agent that generates STEP files
│   ├── example.env
│   └── pyproject.toml
├── data/            # Generated STEP files (created at runtime)
├── frontend/        # Next.js frontend with 3D viewer
│   ├── app/
│   ├── components/
│   └── package.json
└── requirements.txt # Python dependencies

Environment Variables

Variable Description Default
ANTHROPIC_API_KEY API key for Anthropic (or the LLM provider you use)
STEP_OUTPUT_FILE Custom filename for the generated STEP file auto-generated
STEP_DATA_DIR Directory where STEP files are stored data/
BACKEND_URL Backend URL used by the Next.js proxy http://localhost:8000

License

See LICENSE for details.

About

integrating Agentic workflow for quickly developing CAD models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors