AI News Feed
Market watch
Products & Applications

Open-Source Lego AI Generator Uses LLMs to Create LDraw Models

A developer has released an open-source Lego AI generator as a dockerized web app that uses OpenAI, Claude and OpenRouter to generate LDraw CAD models, according to a Hacker News Show HN post.

The developer said the work began around December of last year, when they started experimenting with making ChatGPT and Claude generate source code in LDraw. LDraw is described in the post as an assembly language, a low-level programming language that describes how to assemble Lego pieces into models one placement instruction at a time. When executed by tools such as LDView, LeoCAD or Studio, those instructions become Lego CAD models that can be interacted with and modified.

One LDraw source file in .mpd or .ldr format is equivalent to one Lego CAD model, according to the post. The developer's idea was straightforward: if ChatGPT or Claude could generate high-quality LDraw source files, then the models would also be high quality. After months of iterations and trying one approach after another, the developer wrote that it worked.

Using GPT-6 Astra and Opus 5.5, the developer created a Python toolset, instructions and documentation for agents. The materials are designed to let agents generate LDraw models. The developer then packaged the project as a dockerized web app for others to try and experiment with. The app offers several providers and agents to choose from: OpenAI, Claude and OpenRouter.

LDraw files are text-based and low-level, with each instruction placing a piece in a specific position. The developer compared the language to an assembly language. The resulting models can be opened in Lego CAD programs and modified after generation. The project is aimed at agents as well as human users, with instructions and documentation included for agent use.

The post identifies the submission as the developer's first on Hacker News. The developer asked for feedback and comments to see where the project goes. At the time of the post, it had received 9 points and 2 comments. The comments thread is linked at https://news.ycombinator.com/item?id=49937916.