LDraw-Nova Lets AI Agents Generate Buildable LEGO CAD Models in LDraw

✍️ OpenClawRadar📅 Published: October 3, 2026🔗 Source
Ad

LDraw-Nova is an open-source toolset that gives AI coding agents the primitives, prompts, and docs they need to generate .ldr and .mpd source files — the low-level assembly language that describes LEGO models one placement instruction at a time. Those files render as interactive CAD models in tools like LDView, LeoCAD, and Studio.

The author iterated for roughly a year through several prior attempts — ldbuilder-ai, py2bricks, and py4bricks — before arriving at two working conclusions:

  • There's a minimum resistance path to geometry math. Agents are far better at generating Python code that produces the math than at emitting rotations and positions themselves. So the tooling sidesteps direct LDraw geometry by having agents write Python that emits it.
  • Agents learn better from Python code that produces models than from the models themselves.

What you get at the end of a build

  • LDraw source for the model
  • 3D viewer, 3D player, and VR interactive output (Meta Quest 3)
  • Blender-editable glTF (.glb) with metainfo stored as Blender Custom Properties
  • Full chat history and the agent's thinking process
Ad

Setup

You'll need Git and Docker. The web app lives in a sibling repo, so clone both side by side at the same tag:

git clone --branch v0.6.0 https://github.com/anteloc/ldraw-nova.git
git clone --branch v0.6.0 https://github.com/anteloc/ldraw-nova-docker.git

Then build and start:

cd ldraw-nova-docker
docker compose build
docker compose up -d

First build takes a while and needs around 5 GB of disk space. The app exposes two ports:

  • https://localhost:8443 — required for VR on Quest 3. Self-signed certificate, so expect a browser warning the first time.
  • http://localhost:8765 — plain HTTP, no cert warning. VR won't work here.

Other devices on the same network reach it via your machine's IP, e.g. https://192.168.1.20:8443. There's no login — only run it on networks you trust. Stop with docker compose down.

Search and reranking

Agents use jev-rerank (also by the same author) for semantic search with re-ranking, backed by TypeSafe's Jev System One. If you set TYPESAFE_API_KEY in the app's Settings section, reranking works. Without it, agents fall back to full-text search, which the README warns may yield worse models.

Providers and models

The web app supports OpenAI, Claude, and OpenRouter as agent backends. The author credits GPT-6 Astra and Opus 5.5 for getting the pipeline working. Sample outputs are published at anteloc.github.io/index-samples.html. If you want to see what the agent was thinking while building a given model, open the .mpd file in a text editor and read the first line under the 0 FILE header.

Repo is at 157 stars, 32 commits, MIT-style licensing shown as CC-BY-SA-4.0 in the file tree. Worth a look if you're interested in getting agents to produce physically buildable output rather than text or images.

📖 Read the full source: HN AI Agents

Ad

👀 See Also