BrickWright Teaches Coding Agents to Build with LEGO: 100% Valid Builds vs. 9–69%
Researchers have introduced BrickWright, a framework in which off-the-shelf coding agents build LEGO models from a text or image prompt. The agent writes code with BrickLayer, a Python toolkit, and a built-in validator checks that no pieces float in midair, overlap, or fall apart. On 512 prompts, the share of physically valid builds reached 100%. Without the framework, agents scored between 9% (GPT-6 Luna) and 69% (GPT-6 Astra). • The BrickLayer API cuts inference cost in half compared with raw LDraw • Prompt alignment improved for lightweight agents and did not drop for strong ones • The method outperformed specialized text-to-brick models
AI-processed from Hugging Face Daily Papers; edited by Hamidun News
The BrickWright framework makes off-the-shelf coding agents build LEGO models that can actually be assembled by hand. On a set of 512 prompts, agents running under its control produced 100% physically valid builds. The same models without it did noticeably worse: GPT-6 Luna managed only 9%, and the best baseline agent, GPT-6 Astra, reached 69%.
Why agents build out of thin air
Modern coding agents handle 3D modeling with confidence, but the physical world is less forgiving. A virtual object can be drawn so that some parts hang with no support, others pass straight through their neighbors, and still others end up as a separate island. On screen this is sometimes hard to spot; in a box of bricks it becomes a defect.
The authors define physical feasibility strictly. A build is valid if it contains only real parts, has no overlapping or "floating" elements, and forms a single connected structure whenever that is possible at all. Their thesis: to get such builds, an agent does not need fine-tuning. It is enough to give it tools that assemble the model and check its physics.
BrickLayer: a convenient API and a validator in the loop
BrickWright controls the agent through code. The agent writes programs in BrickLayer, a Python toolkit with two main parts.
The first is an ergonomic API for building from bricks. It cuts inference cost in half compared with working in raw LDraw format, where the agent manually handles a low-level description of the parts. Fewer tokens spent on routine work means each attempt is cheaper.
The second part is a validator. It checks the build and returns feedback to the agent: what is hanging, what overlaps, what is not connected to the rest. The agent sees the errors as text and fixes its code until the structure is valid.
Key figures from the paper:
- 100% physical validity on a set of 512 prompts for agents using BrickWright
- 9% for GPT-6 Luna in the baseline configuration
- 69% for GPT-6 Astra in the baseline configuration
- 2× inference cost savings from the BrickLayer API versus raw LDraw
- input: a text or image prompt, running on pretrained agents with no separate training
Validity did not eat into quality
Reliability is easy to buy at the price of boring results: an agent could build only flat plates, and they would pass any check. That is why the second half of the result matters. For lightweight agents, prompt alignment improved; for strong agents, it stayed at the same level. In other words, the physical constraints did not force the models to simplify their designs.
Separately, the authors compared the method with specialized text-to-brick models, which are trained specifically to generate brick builds. The BrickWright agents outperformed them. A general-purpose model with good tools turned out to be stronger than a narrow solution.
Where this approach is useful
The direct application is clear: generating LEGO instructions and sets from a description or photo, where the output cannot be a structure that collapses on the table. The project code is open, so you can take it and plug it into your own agent.
The broader value lies in the pattern itself: a domain-specific API plus a validator that feeds errors back into the loop. It suits any task where the result must obey strict rules: CAD parts, equipment layout, assembly from standard components. The takeaway for agent developers is simple. Before improving the model, check whether it has a proper ruler at hand for self-checking. Here, that ruler lifted the worst result from 9% to 100% and also cut token costs in half.
- Oct 24, 2026GPT-6 Sol Daybreak Blue Tops Cyber Index: +32 Points and $1.77 per Task
- Oct 24, 2026Harvey LAB-AA v1.1: Grok 4.7 Leads With 9.4% After Hallucination Check
- Oct 24, 2026Anthropic's agents submitted 20 visa applications on a US State Department website
- Oct 24, 2026Artificial Analysis launches AA-3D: Claude Sonnet 5.5 leads with 1194 Elo
Key Questions Answered
Why agents build out of thin air?
Modern coding agents handle 3D modeling with confidence, but the physical world is less forgiving. A virtual object can be drawn so that some parts hang with no support, others pass straight through their neighbors, and still others end up as a separate island. On screen this is sometimes hard to spot; in a box of bricks it becomes a defect. The authors define physical feasibility strictly. A build is valid if it contains only real parts, has no overlapping or "floating" elements, and forms a single connected structure whenever that is possible at all. Their thesis: to get
What are the key details on BrickLayer: a convenient API and a validator in the loop?
BrickWright controls the agent through code. The agent writes programs in BrickLayer, a Python toolkit with two main parts. The first is an ergonomic API for building from bricks. It cuts inference cost in half compared with working in raw LDraw format, where the agent manually handles a low-level description of the parts. Fewer tokens spent on routine work means each attempt is cheaper. The second part is a validator. It checks the build and returns feedback to the agent: what is hanging, what overlaps, what is not connected to the rest. The agent sees the errors as text a
What are the key details on Validity did not eat into quality?
Reliability is easy to buy at the price of boring results: an agent could build only flat plates, and they would pass any check. That is why the second half of the result matters. For lightweight agents, prompt alignment improved; for strong agents, it stayed at the same level. In other words, the physical constraints did not force the models to simplify their designs. Separately, the authors compared the method with specialized text-to-brick models, which are trained specifically to generate brick builds. The BrickWright agents outperformed them. A general-purpose model wi
Delegate Deep Research, Coding & Workflows to an AI Agent
Deploy autonomous multi-step execution with NomadNet Agent (agent.nomadnet.ai) — automated web research, data synthesis, code generation, and complex task orchestration.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.