AI-Powered Engineering Design Tool
From problem description to production-ready blueprints, BOMs, and assembly guides -- driven by a multi-agent AI system with intelligent LLM routing.
Engineering design is iterative, multi-disciplinary, and time-consuming. A single product -- even something as simple as a sensor mount for a conveyor belt -- requires structural analysis, electrical design, wiring diagrams, firmware, a bill of materials, and assembly instructions.
Each discipline has its own tools, its own experts, and its own bottleneck.
ForgeAI replaces that fragmented process with a single guided workflow. Describe your engineering problem in plain language, and a team of specialized AI agents collaborates to produce a complete, validated design package.
Project creation, backend health monitoring, and orchestrator testing interface
Complete interface showing project management, active project selection, and the AI orchestrator test panel with SSE streaming
ForgeAI uses a multi-agent architecture with a 5-tier LLM routing system. Each agent is a specialized AI call with a domain-specific system prompt, coordinated by an Orchestrator.
graph TB
subgraph Frontend["Frontend (React + Vite)"]
UI[Project Dashboard]
WIZARD[9-Step Design Wizard]
SSE_HOOK[useDesignAgent Hook]
THREE[Three.js 3D Viewer]
WIRING_UI[D3.js Wiring Diagrams]
MONACO[Monaco Code Editor]
end
subgraph Backend["Backend (Express + TypeScript)"]
API[REST API + SSE Streaming]
ORCH[Orchestrator Agent]
DB[(SQLite Database)]
subgraph Agents["Specialized AI Agents"]
REQ[Requirements]
STRUCT[Structural]
ELEC[Electrical]
PHYS[Physics Validation]
WIRE[Wiring]
EMB[Embedded/Firmware]
CAD[CAD/3D Models]
BOM_A[Bill of Materials]
ASM[Assembly Guide]
end
subgraph LLM["5-Tier LLM Router"]
T1["Tier 1: Local Small<br/>(Ollama - fast tasks)"]
T2["Tier 2: Local Medium<br/>(LocalAI Gateway)"]
T3["Tier 3: Local Large<br/>(Heavy local models)"]
T4["Tier 4: Claude Standard<br/>(claude-sonnet-4)"]
T5["Tier 5: Claude Complex<br/>(Full reasoning)"]
end
end
UI --> API
SSE_HOOK -->|Server-Sent Events| API
API --> ORCH
ORCH --> Agents
Agents --> LLM
Agents --> DB
API --> DB
style Frontend fill:#1a1a2e,stroke:#16213e,color:#e0e0e0
style Backend fill:#0f3460,stroke:#16213e,color:#e0e0e0
style Agents fill:#533483,stroke:#16213e,color:#e0e0e0
style LLM fill:#e94560,stroke:#16213e,color:#e0e0e0
The design flows through 9 specialized agents in sequence. The Physics Agent acts as a validation gate -- designs must pass structural and thermal checks before proceeding to manufacturing phases.
flowchart LR
INPUT["User Input<br/>Problem Description"] --> ORCH["Orchestrator<br/>Design Plan"]
ORCH --> REQ["Requirements<br/>Analysis"]
REQ --> CONCEPT{"Concept<br/>Generation"}
CONCEPT --> STRUCT["Structural<br/>Agent"]
CONCEPT --> ELEC["Electrical<br/>Agent"]
STRUCT --> PHYS["Physics<br/>Validation Gate"]
ELEC --> PHYS
PHYS -->|Pass| WIRE["Wiring<br/>Agent"]
PHYS -->|Fail| CONCEPT
WIRE --> EMB["Embedded<br/>Agent"]
EMB --> CAD_A["CAD<br/>Agent"]
CAD_A --> BOM_A["BOM<br/>Agent"]
BOM_A --> ASM["Assembly<br/>Agent"]
ASM --> OUTPUT["Complete Design<br/>Package (ZIP)"]
style PHYS fill:#e94560,stroke:#333,color:#fff
style OUTPUT fill:#00C853,stroke:#333,color:#fff
style INPUT fill:#2196F3,stroke:#333,color:#fff
ForgeAI intelligently routes AI tasks across 5 tiers based on complexity, falling back gracefully when local models aren't available:
flowchart TD
TASK[Incoming Agent Task] --> ROUTER{LLM Router}
ROUTER -->|"Simple classification,<br/>formatting"| LOCAL_S["Local Small<br/>(Ollama Direct)"]
ROUTER -->|"Code generation,<br/>analysis"| LOCAL_M["Local Medium<br/>(LocalAI Gateway)"]
ROUTER -->|"Complex reasoning,<br/>multi-step"| LOCAL_L["Local Large<br/>(Heavy Local)"]
ROUTER -->|"Standard agent work"| CLAUDE_S["Claude Standard<br/>(SDK / CLI)"]
ROUTER -->|"Full design reasoning,<br/>validation"| CLAUDE_C["Claude Complex<br/>(Full Context)"]
LOCAL_S -->|Unavailable| LOCAL_M
LOCAL_M -->|Unavailable| CLAUDE_S
LOCAL_L -->|Unavailable| CLAUDE_S
style ROUTER fill:#e94560,stroke:#333,color:#fff
style LOCAL_S fill:#4CAF50,stroke:#333,color:#fff
style LOCAL_M fill:#8BC34A,stroke:#333,color:#fff
style LOCAL_L fill:#CDDC39,stroke:#333,color:#000
style CLAUDE_S fill:#7C4DFF,stroke:#333,color:#fff
style CLAUDE_C fill:#6200EA,stroke:#333,color:#fff
erDiagram
projects ||--o{ requirements : has
projects ||--o{ design_revisions : has
projects ||--o{ bom_items : has
projects ||--o{ wiring_connections : has
projects ||--o{ firmware_files : has
projects ||--o{ assembly_steps : has
projects {
text id PK
text name
text description
text environment
text industry
text urgency
text board_category
text board_type
text status
}
design_revisions {
text id PK
text project_id FK
integer version
text phase
text agent
text content_json
}
bom_items {
text id PK
text project_id FK
text part_number
text description
text material
integer quantity
text type
real cost
text supplier
}
wiring_connections {
text id PK
text project_id FK
text from_component
text to_component
text signal_type
text cable_spec
}
The agents don't just generate text -- they perform real engineering calculations. Below are the core formulas and algorithms used by the Structural, Physics, and Electrical agents.
Beam deflection under uniform load -- used to verify mounting brackets won't deform beyond tolerance:
where
Von Mises stress criterion -- determines whether a component will yield under combined loading:
The agent compares
Bolt preload calculation for connection design:
where
Steady-state heat conduction through enclosure walls -- validates that electronics won't overheat:
where
Junction temperature estimation for electronics:
The Physics agent flags
Natural frequency check to prevent resonance failures:
The validation gate ensures the natural frequency is sufficiently separated from known excitation frequencies (motor RPM, conveyor vibration, etc.).
Power budget calculation across all circuits:
where
Cable sizing based on voltage drop and thermal limits:
where
RC filter design for sensor signal conditioning:
The Physics agent runs all checks and produces a traffic-light report:
Algorithm: VALIDATION_GATE(design)
─────────────────────────────────────
results ← []
// Structural checks
FOR each component IN design.structural:
σ_vm ← vonMises(component.loads)
n ← component.material.σ_yield / σ_vm
δ_max ← deflection(component.geometry, component.loads)
results.push({
check: "Structural integrity",
status: n ≥ 2.0 ? GREEN : n ≥ 1.5 ? ORANGE : RED,
value: "Safety factor = {n:.2f}"
})
// Thermal checks
T_j ← junctionTemp(design.electrical, design.enclosure)
results.push({
check: "Thermal management",
status: T_j < 0.8·T_max ? GREEN : T_j < T_max ? ORANGE : RED,
value: "T_junction = {T_j:.1f}°C (max {T_max}°C)"
})
// Vibration checks
f_n ← naturalFreq(design.structural)
margin ← f_n / design.environment.f_excitation
results.push({
check: "Vibration isolation",
status: margin > 1.4 OR margin < 0.7 ? GREEN : ORANGE,
value: "f_n = {f_n:.1f} Hz, margin = {margin:.2f}"
})
// Gate decision
IF any result.status == RED:
RETURN { proceed: false, results }
ELSE:
RETURN { proceed: true, results }
flowchart TD
D[Design Input] --> S["Structural Analysis<br/>σ_vm, δ_max, safety factor"]
D --> T["Thermal Analysis<br/>T_junction, R_thermal"]
D --> V["Vibration Check<br/>f_natural vs f_excitation"]
S --> GATE{"Validation<br/>Gate"}
T --> GATE
V --> GATE
GATE -->|"All Green/Orange"| PASS["PASS<br/>Proceed to Wiring"]
GATE -->|"Any Red"| FAIL["FAIL<br/>Return to Concept"]
FAIL -->|"Auto-feedback"| REDESIGN["Structural/Electrical<br/>Agent Redesign"]
REDESIGN --> D
style PASS fill:#00C853,stroke:#333,color:#fff
style FAIL fill:#e94560,stroke:#333,color:#fff
style GATE fill:#FF9800,stroke:#333,color:#fff
ForgeAI guides users through a complete engineering design workflow:
| Step | Agent | Input | Output |
|---|---|---|---|
| 1 | Orchestrator | Problem description in plain language | Design plan, agent routing |
| 2 | Requirements | Context, environment, constraints | Functional, mechanical, electrical specs |
| 3 | Structural + Electrical | Requirements | 2-3 concept alternatives |
| 4 | Physics | Selected concept | Validation report (pass/warn/fail) |
| 5 | Wiring | Validated design | Interactive SVG schematics |
| 6 | Embedded | Wiring + board selection | Compilable firmware code |
| 7 | CAD | Full design | 3D models (Three.js + Blender) |
| 8 | BOM | All components | Parts list with costs and suppliers |
| 9 | Assembly | Everything | Step-by-step build instructions |
Every AI-generated output includes a disclaimer: "AI-generated design -- have it reviewed by a qualified engineer."
| Agent | Domain | System Prompt Language | Key Outputs |
|---|---|---|---|
| Orchestrator | Project coordination | Dutch | Design plan, agent routing, phase management |
| Requirements | Specification analysis | -- | Functional, mechanical, electrical specs; standards (CE, IP, ATEX) |
| Structural | Mechanical engineering | -- | Component geometry, materials, stress calculations, safety factors |
| Electrical | Controls engineering | -- | Circuit design, power budgets, cable specifications, EMC |
| Physics | Design validation | -- | Static/dynamic analysis, thermal simulation, safety reports |
| Wiring | Electrical diagrams | -- | Interactive SVG schematics, cable lists, pin mappings |
| Embedded | Firmware | -- | C++/Python code for Arduino, ESP32, RPi Pico, STM32, PLCs |
| CAD | 3D modeling | -- | Three.js geometry + Blender Python scripts for STEP/STL export |
| BOM | Procurement | -- | Parts lists with buy-vs-make, costs, suppliers |
| Assembly | Manufacturing | -- | Phased instructions, tool requirements, torque specs |
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React + Vite + TypeScript | SPA with fast HMR |
| Styling | Tailwind CSS | Utility-first styling |
| Backend | Express + TypeScript | REST API + SSE streaming |
| Database | SQLite (better-sqlite3) | Projects, revisions, BOMs, wiring, firmware |
| AI Engine | Claude API (claude-sonnet-4) | Primary agent reasoning with streaming |
| AI Routing | 5-tier LLM Router | Ollama / LocalAI / Claude SDK / Claude CLI |
| 3D Preview | Three.js + OrbitControls | In-browser 3D model interaction |
| 3D Production | Blender Python API | STEP/STL/OBJ export for manufacturing |
| Wiring | D3.js + SVG | Interactive clickable schematics |
| Code Editor | Monaco Editor | Syntax-highlighted firmware editing |
| PDF Export | Puppeteer / pdfkit | Technical drawings and assembly guides |
| Monorepo | pnpm workspaces | Frontend + backend in single repo |
- Node.js >= 20
- pnpm >= 8
- Blender >= 3.6 (optional -- falls back to Three.js-only mode)
- An Anthropic API key with access to claude-sonnet-4
git clone https://github.com/k1bot2026/ForgeAI.git
cd ForgeAI
pnpm install
cp .env.example .env
# Add your ANTHROPIC_API_KEY to .env
pnpm devFrontend: http://localhost:5173 | Backend: http://localhost:3001
| Variable | Description | Required |
|---|---|---|
ANTHROPIC_API_KEY |
Anthropic API key for Claude | Yes |
PORT |
Backend server port (default: 3001) |
No |
BLENDER_PATH |
Path to Blender binary | No |
LOCALAI_URL |
LocalAI gateway endpoint | No |
OLLAMA_URL |
Ollama endpoint (default: http://localhost:11434) |
No |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/health |
Backend status check |
GET |
/api/projects |
List all projects |
POST |
/api/projects |
Create a new project |
GET |
/api/projects/:id |
Get project details |
PUT |
/api/projects/:id |
Update project |
DELETE |
/api/projects/:id |
Delete project |
POST |
/api/projects/:id/design |
Start orchestrator (SSE stream) |
ForgeAI/
├── frontend/ # React + Vite application
│ └── src/
│ ├── App.tsx # Main UI with project CRUD + orchestrator
│ ├── hooks/
│ │ └── useDesignAgent.ts # SSE streaming hook for agent responses
│ └── main.tsx
├── backend/ # Express + TypeScript API
│ └── src/
│ ├── agents/
│ │ └── orchestrator.ts # Orchestrator with Dutch system prompt
│ ├── db/
│ │ ├── schema.ts # 7 tables: projects, requirements, etc.
│ │ └── index.ts # SQLite initialization
│ ├── routes/
│ │ ├── projects.ts # CRUD endpoints
│ │ └── design.ts # SSE streaming endpoint
│ ├── services/
│ │ ├── claude.ts # Claude API wrapper with retry logic
│ │ └── llm/
│ │ ├── router.ts # 5-tier LLM routing logic
│ │ ├── types.ts # Provider interfaces
│ │ └── providers/
│ │ ├── claude-sdk.ts
│ │ ├── claude-cli.ts
│ │ ├── localai-gateway.ts
│ │ └── ollama-direct.ts
│ └── index.ts # Express server entry
├── docs/
│ ├── DESIGN.md # Full design document (Dutch)
│ └── screenshots/ # UI screenshots
├── pnpm-workspace.yaml # Monorepo configuration
└── package.json # Root scripts (pnpm dev)
Codebase: 21 TypeScript files, ~2,250 lines of code
ForgeAI is built in 9 sequential phases. Each phase produces a working, testable increment.
gantt
title ForgeAI Development Phases
dateFormat X
axisFormat %s
section Foundation
Phase 1 - Scaffolding :done, p1, 0, 1
Phase 2 - AI Integration :done, p2, 1, 2
section Core Agents
Phase 3 - Requirements Wizard :active, p3, 2, 3
Phase 4 - Concept Design :p4, 3, 4
Phase 5 - Physics Validation :p5, 4, 5
section Manufacturing
Phase 6 - Wiring + Firmware :p6, 5, 6
Phase 7 - CAD + Export :p7, 6, 7
Phase 8 - BOM + Assembly :p8, 7, 8
section Polish
Phase 9 - Dashboard + Polish :p9, 8, 9
| Phase | Focus | Status | Key Deliverable |
|---|---|---|---|
| 1 | Project scaffolding | Done | Monorepo, database, CRUD API |
| 2 | AI integration | Done | Claude API, Orchestrator, SSE streaming, LLM router |
| 3 | Requirements wizard | Next | Requirements agent, Steps 1-2 of wizard UI |
| 4 | Concept design | -- | Structural + Electrical agents, concept cards |
| 5 | Detail + validation | -- | Physics agent, Three.js viewer, validation gate |
| 6 | Wiring + firmware | -- | Interactive diagrams, code editor |
| 7 | CAD + export | -- | Blender integration, PDF/STEP/STL downloads |
| 8 | BOM + assembly | -- | Procurement tables, build guides |
| 9 | Polish + dashboard | -- | Project management, responsive design, ZIP export |
- User stays in control. Every AI output is reviewed and approved before the next phase begins
- Structured JSON everywhere. All agent outputs are composable, validatable, and renderable
- Validation before fabrication. Physics agent must approve before advancing to manufacturing
- Graceful degradation. Works without Blender (Three.js fallback) or local models (Claude fallback)
- AI-generated means AI-disclosed. All exports carry an engineering review disclaimer
Built by k1bot2026