Natural-language CAD automation for FreeCAD using a multi-agent LLM pipeline (Planner → Generator → Validator → Executor), exposed as a production FastAPI service.
- Multi-agent design pipeline with retry and validation loops
- Headless FreeCAD script execution with AST sandboxing
- Redis-backed state cache and audit trail
- WebSocket progress streaming
- Prometheus metrics and structured logging
- Docker-based deployment (dev and prod profiles)
cp .env.example .env
# Set OPPER_API_KEY (https://platform.opper.ai/)
docker compose --profile dev up
curl http://localhost:8000/healthSubmit a design request:
curl -X POST http://localhost:8000/api/v1/design \
-H "Content-Type: application/json" \
-d '{"prompt": "Create a 20mm cube with a 5mm hole through the center"}'freecad-llm-automation/
├── src/ai_designer/ # Python package
│ ├── api/ # FastAPI gateway (production entry)
│ ├── agents/ # Planner, Generator, Validator, Executor
│ ├── orchestration/ # Pipeline graph
│ ├── runtime/ # Pipeline factory / startup wiring
│ ├── freecad/ # Headless runner, state I/O
│ ├── llm/ # Unified LLM provider (Opper)
│ ├── sandbox/ # AST validation + safe execution
│ ├── schemas/ # Pydantic contracts
│ └── redis_utils/ # Cache, audit, pubsub
├── config/ # config.yaml, redis, prometheus
├── docker/ # Dockerfile.dev, Dockerfile.production
├── tests/ # unit, integration, benchmarks, load
├── tools/ # Dev-only utilities (not production API)
├── docs/ # Architecture and entrypoint docs
└── AGENTS.md # Agent instructions (see per-folder AGENTS.md)
- docs/ARCHITECTURE.md — system design
- docs/ENTRYPOINTS.md — runtime entry points (API-only)
- CONTRIBUTING.md — development workflow
- Per-module guidance in
**/AGENTS.md
make install-dev
make test-unit
make test-integration # Redis required
make ciLocal API without Docker:
pip install -e ".[dev]"
uvicorn ai_designer.api.app:app --reload --port 8000| Variable | Required | Description |
|---|---|---|
OPPER_API_KEY |
Yes | Opper platform API key |
REDIS_URL / REDIS_HOST |
Yes (integration) | Redis connection |
FREECAD_PATH |
No | FreeCAD AppImage or binary path |
FREECAD_ROOT |
No (Docker) | Host path mounted as /opt/freecad in dev compose |
MIT — see LICENSE.