agentusecasesAll 965 use cases
Content & Creative

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.

Done withChatGPTClaude

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 Claude Code

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.

Read the original ↗

Discussion on HN · Oct 2, 2026

Five of these in your inbox every morning

The best things people got an AI agent to do, each with the prompt to try it.

More like this