Pan-Chera/Multi-Agent-CAD

MAC (Multi-Agent CAD): A decoupled multi-agent framework for text-to-CAD generation via constrained test-time compute

What it solves

MAC (Multi-Agent CAD) addresses the high cost and token inefficiency of LLM-based text-to-CAD generation. Traditional single-agent systems often repeatedly consume massive amounts of tokens by stuffing documentation, conversation history, and debugging traces into the context window across multiple iterations, leading to exponential cost growth.

How it works

MAC utilizes a LangGraph state machine to coordinate four specialized agents that pass compact, structured JSON states instead of raw conversation transcripts:

  1. Spec Planner: Converts a natural-language request into a structured CADBrief JSON.
  2. Geometric Architect: Transforms the CADBrief into an ArchitectPlan JSON containing sketches and geometric steps.
  3. Python Coder: Translates the ArchitectPlan into executable build123d Python code.
  4. Autonomous Skill Loop: Executes the code and uses a Dual-Engine QA report to trigger a repair loop (via Aider) until the model is correct.

Who it’s for

It is designed for users who want to generate printable 3D models from natural language prompts while minimizing API costs and token usage, as well as developers interested in multi-agent orchestration for geometric design.

Highlights

  • Extreme Token Efficiency: Reduces token usage by 116x and inference costs by 13x compared to single-agent baselines while improving the feature pass rate to 99.3%.
  • White-Box Transparency: Every intermediate step (briefs, plans, measurements, and diagnostics) is serialized to disk for human auditing or mid-run intervention.
  • Print-in-Place Capability: Capable of generating complex multi-body articulable models with precise clearance gaps (e.g., fidget toys, gyroscopes).
  • Hybrid Routing: Supports using different LLM providers or models for each of the four stages via an OpenAI-compatible endpoint.

Related

  • Project
  • Project
  • Project
  • Project
  • Project