What the source announced
On October 2, 2026, a first-time Hacker News poster named anteloc shared an open-source project called ldraw-nova: a toolchain that teaches AI agents to design Lego models. The experiment started around December 2025 with a simple question — could ChatGPT and Claude be made to write source code in the LDraw language? After months of iterations, the answer turned out to be yes.
LDraw is, in the author's words, literally an "assembly" language — a low-level language that describes how to assemble Lego pieces into models, one placement instruction at a time. When executed by tools like LDView, LeoCAD or Studio, those instructions become Lego CAD models that can be opened, inspected and modified. In other words, one LDraw source file (.mpd or .ldr) is equivalent to one complete Lego CAD model.
The core idea is disarmingly simple: if an agent can generate high-quality LDraw source files, then it is effectively generating high-quality Lego CAD models. Using GPT-6 Astra and Opus 5.5, the author built a Python toolset plus agent instructions and documentation, packed it all into a dockerized web app with a choice of providers — OpenAI, Claude and OpenRouter — and published a gallery of results at anteloc.github.io/index-samples.html, including starfighters, a pagoda garden and an An-225 cargo plane.

There is also a delightful "read the agent's mind" trick: open any generated .mpd file in a text editor and look at the first line under the lines starting with "0 FILE" — that is what the agent was picturing when it designed the model.

The project has since evolved past its original form. The current ldraw-nova no longer asks models to do raw geometry math; instead it gives agents a "minimum resistance path": they write ordinary JSON plans (or Python generators when loops and calculations help), while the tooling handles part lookup, geometry checks, preview rendering and parts-list comparison.

Try it: generate your first Lego model
- Get the code and the parts library: clone the ldraw-nova repository and install a full LDraw parts library, plus LeoCAD and Poppler (pdftotext) on your PATH — the previews and validation depend on them.
- Run the health check: execute ./setup.sh once, then ./ldraw-agent doctor to confirm Python 3.12+, the parts library, LeoCAD and Poppler are all found.
- Do a trial review first: run ./ldraw-agent review examples/bridge.plan.json --outdir output/bridge-review, then open the PNGs in output/bridge-review/previews/ to see what a finished validation package looks like (model, validation report, Python BOM, LeoCAD BOM comparison).
- Write your design brief: pick a recognizable subject and describe its silhouette, dimensions, palette, focal feature and build order in plain language — this becomes the prompt you hand to the agent along with instructions.md.
- Build the smallest useful module: give the agent your idea and instructions.md, let it write a JSON plan (or a Python generator for repetitive geometry), then run ./ldraw-agent build output/my-model.plan.json — the MPD is only written after source and geometry checks pass.
- Review, repair, repeat: run ./ldraw-agent review output/my-model.mpd, open the rendered previews, fix the source plan (not the generated output), and re-review until the checks pass and the thumbnails look right.
- Prefer the web app for experimenting: clone the sibling ldraw-nova-docker repository at the matching release tag, run docker compose build && docker compose up -d, then open http://localhost:8765 and pick OpenAI, Claude or OpenRouter as the provider — no local parts library wrangling needed.
Sources: [1]
The full story
The background document explains the real goal: getting agentic language models capable of designing buildable, physical things. LDraw was chosen because it is simple, low-level and executable — the same reasons assembly language appeals to programmers. The surprise was that, although LDraw is heavily focused on math (part rotations, positioning), which language models are usually bad at, the agents performed better than expected in early tests. Still, the results were never correct enough to trust.
Three attempts came before the current design: ldbuilder-ai for initial research, then py2bricks and py4bricks as successive agentic Python toolings. They produced two conclusions that shaped everything after. Conclusion one: there is a minimum-resistance path around geometry math — give the agents tooling so they sidestep the math entirely, because agents are far better at generating Python code that produces math than at producing the math themselves. Conclusion two: agents learn better from Python code that produces models than from the models themselves. So the remaining work was to build Python tooling with the right primitives, verbs and constructive vocabulary, letting agents learn by example — something that proved very hard to get right until GPT-6 Astra and Claude Opus 5.5 arrived.
The discussion on HN added useful texture. One commenter pointed to an Arxiv paper on driving model building through LDraw; the author replied that he had tried that constrained-parts approach too — geometry came out fine, but with too many constraints the agents built near-identical buildings every time, and with too few they drifted into unbuildable designs. Asked about token costs, he answered that it depends on how much thinking a model requires to get placements right, and that Technic models are usually the expensive ones. He also mentioned experimenting with FreeCAD plus freecad-mcp and Claude, but FreeCAD's solver bogs down when a model has many parts.
Several limitations are stated honestly. The agents currently verify placements, not physics or stability. Technic assemblies already work, but real moving mechanisms with cogs and transmissions are still a stated goal rather than a finished feature. And the validation pipeline's own documentation says physical_validity: not_proven — matching syntax, rendered previews and consistent BOMs are evidence, not proof that a design is physically buildable.
The community response ranged from practical to philosophical: builders with dusty Lego bins asked for a "parts I actually own" constraint mode, one commenter wanted a tool that photographs a bin of old bricks and catalogues the collection, and another admitted the whole idea of LLMs encroaching on the pure-imagination world of Lego gave them "a bit of the icks".
How to read this
The important move here is architectural, not cosmetic. Instead of forcing a language model to be good at spatial math, the project wraps the model in tooling that converts its strength — writing structured code from examples — into the domain's native representation. That "sidestep the math" lesson generalizes well beyond Lego: any time an agent is weak at a formal domain, consider giving it a generator and a checker rather than demanding direct mastery.
The second thing to notice is what the deliverable is: not a picture of a Lego model, but an editable .mpd source file that opens in real CAD tools. This is the difference between a demo and a workflow — the file carries authorship metadata, a parts list and a review trail, so a human can continue where the agent stopped.
Finally, the project's honesty is a feature. Stating up front that checks are evidence rather than proof, and that stability is not yet verified, is exactly what makes the tooling trustworthy enough to iterate on. The gallery renders look impressive, but the review loop — build, render, inspect, repair — is the actual product.
Key takeaways
LDraw is a low-level, executable "assembly language" for Lego: one placement instruction per line, and a .mpd/.ldr file that opens as a full CAD model in LDView, LeoCAD or Studio.
ldraw-nova's insight: agents are bad at geometry math but good at writing Python that produces math — so give them JSON plans, Python generators and a review pipeline instead of asking for raw LDraw.
The loop is: design brief → agent writes plan → build runs source and geometry checks → review renders previews and compares BOMs → human inspects images and repairs the source.
Two ways to run it: locally with Python 3.12+, a parts library, LeoCAD and Poppler; or the dockerized web app on localhost:8765 with OpenAI, Claude or OpenRouter as the provider.
Open the .mpd in a text editor and read the line under "0 FILE" to see what the agent was picturing — and remember the checks are evidence, not proof of physical buildability.

