Skip to content

Repository files navigation

DraftForge - AI Agents for CAD

Website Demo (Video)

DraftForge turns plain-English specs into CAD models, drawings, and export-ready files in minutes, not hours

DraftForge Studio Demo

https://draft-forge.vercel.app/ https://youtu.be/lD_LPi_k6Hw

Projects

This repo contains:

  • DraftForge site - Static DraftForge marketing and CAD Studio pages served with Vite for Vercel.
  • CAD Agent API in ./agent - The agent was built using OpenAI Agent SDK, FastAPI, and Python. This is a Git submodule.

(This project was created from my submission for AI Engineer hackathon 2026 in Singapore on May 9, 2026.)

Local Development

npm install
npm run dev

Open http://127.0.0.1:5173/.

The Studio page calls the CAD Agent API directly. By default it uses http://127.0.0.1:8000. Override it for deployed environments with:

VITE_CAD_AGENT_API_BASE=https://your-cad-agent.example.com

CAD Agent API

  1. Install Python and uv.
  2. Install dependencies:
$ cd agent

$ uv sync --extra dev --python 3.12
$ npm --prefix vendor/text-to-cad/.agents/skills/cad/explorer install
  1. Set OPENAI_API_KEY before running the agent.

  2. Optional local Studio CORS configuration:

$ export CAD_AGENT_CORS_ORIGINS="http://127.0.0.1:8080,http://localhost:8080"
  1. Run the CAD Agent API with:
$ uv run uvicorn cad_agent.api:app --host 127.0.0.1 --port 8000

Build

npm run build

The production files are written to dist/.

CAD Agent Sandbox

The CAD Agent API is not deployed as a Vercel Serverless Function because it starts a long-lived CAD Explorer subprocess. For demo/runtime sessions, start it inside a Vercel Sandbox:

OPENAI_API_KEY=sk-... GITHUB_TOKEN=ghp_... npm run backend:sandbox

The command prints:

  • the public CAD Agent API URL for port 8000
  • the public CAD Explorer URL for port 4178

Set the frontend Vercel environment variable to the printed API URL and redeploy the frontend:

VITE_CAD_AGENT_API_BASE=https://your-sandbox-api-url.vercel.run

Sandbox runtimes are ephemeral. When the sandbox stops, launch a new one and update VITE_CAD_AGENT_API_BASE to the new API URL.

GITHUB_TOKEN may be omitted only if both draft_forge and its agent/vendor/text-to-cad submodule are publicly cloneable.

Vercel

Vercel should detect the Vite framework from package.json.

  • Build command: npm run build
  • Output directory: dist
  • Development command: npm run dev

vercel.json keeps /studio routed to the Studio page.

About

You describe the part. DraftForge AI agent ship the CAD drawing.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages