Content & CreativeDone with ChatGPT, Claude Oct 2, 2026
Generate LEGO CAD models in LDraw with AI agents
A toolset and docs let ChatGPT and Claude agents write LDraw source files that become LEGO CAD models, packaged as a dockerized web app.
- What They Did
- The agent takes a prompt, reads the repo's instruction docs, and plans the parts and submodels. It does not place bricks directly. It writes a plan file, then Python generator scripts that output the LDraw file. It uses tools for part search, collision and gap detection, and headless rendering, and loops render, inspect and adjust until it judges the model finished.
- How It Went
- It produces LDraw source, several viewers, and a Blender-editable glb file. The author says only expensive high-end models can build large, correct models. Generation is slow, spaceships are weak, and VR on Meta Quest 3 has many issues.
- Worth Knowing
- The Docker build needs about 5 GB of disk. Without a TypeSafe API key, part search falls back to full-text search, which may give worse models.
Try it yourself with ChatGPT
Write an LDraw file (.ldr) for a LEGO model of [object, e.g. a small red sports car] using real LDraw part numbers and colors, and place the parts so they connect properly. Then validate the file, render a preview image if you can, and fix any floating or overlapping parts. Finish by giving me the final .ldr file and a parts list.