Inspiration
Learning robotics as a beginner is hard. Before anything moves, you have to pick parts from thousands of listings, match voltages and current, assign pins, wire it all up, and write code. Getting good at all of that takes years. Most people close the parts site and never come back.
But most of us already learned to build once, as kids, with LEGO. LEGO removes the expert decisions: the bricks always fit, the instruction book shows one step per page, and you can always ask someone when a step is confusing.
Prebuilt robot kits try to do the same, but they only let you build whatever kit you can find online. We wanted the LEGO experience for real robots, with no limit on what you build. So we built brick: describe what you want, see it, and actually build it.
What it does
You type a task in plain English, such as "build a robot to water my plants", and set a budget (for example, $240). brick then:
- Designs the robot with a team of 10 Gemini agents. Each agent has one job. Some pick wheels, arms or sensors. Others work out power and wiring. Two orchestrator agents plan the final design and fact-check each other to cut down on hallucinations.
- Uses only real parts. Every part comes from a catalog of real, priced products with vendor links. Gemini may only pick from it.
- Shows it in 3D. You can orbit the robot, toggle the shell, parts, wiring and frame layers, and extend the arm.
- Checks it. Code computes pins, power, battery life, payload, reach and budget, and shows any failure in plain English. Nothing is hidden.
- Simulates it doing the task in a sample apartment, with each stop marked pass or fail.
- Lists what to buy: vendor links, prices, a reason for each part, verified badges and a CSV export.
- Writes the instruction books. Build mode is a shelf of manuals with one step per page, a parts box on every page, wiring diagrams and fix-it pages.
- Answers questions. A chat helper knows your exact design. Ask "Why this arm?" or say "Make it cheaper", and it changes the design through Gemini function calling.
- Exports a build kit: a zip with the buy list, wiring, Raspberry Pi Python code, a self-test and a printable manual.
| LEGO | brick |
|---|---|
| A box of bricks that always fit | A catalog of real, priced parts. Code checks that they work together. |
| "Build me a fire truck" | "Build a robot to water my plants" |
| The picture on the box | A 3D robot you can orbit, take apart by layer, and watch extend its arm |
| The instruction books | Build mode: a shelf of manuals, one step per page |
| Asking a friend | The chat helper: "Why this arm?", "Make it cheaper" |
| It snaps together or it doesn't | Code checks pins, power, payload, reach and budget |
How we built it
Stack: Next.js 16 and TypeScript, React 19, three.js with react-three-fiber and drei for the 3D robot, Zod for shared contracts, and Gemini through @google/genai (server-side only).
The design team. POST /api/generate runs the agents in waves:
- An interpreter agent reads the task and works out what it physically needs: reach, grip, lift, liquid, camera. Code turns that into numbers, such as required lift height and object mass.
- Mobility, arm and tool, and sensing agents pick parts in parallel. Each sees only its own slice of the catalog, and enums lock it to those part IDs.
- Power and brain and routine agents follow, using the motor channels, pins and watts that code computed from step 2.
- A budgeter, written in code, picks one option per agent that fits the budget. If nothing fits, it returns the closest design and shows the failed check.
- Two orchestrators finish the design. The master agent combines the parts and resolves conflicts. The fact-checker agent rewrites any claim the catalog data does not support.
- Deterministic checks run. Each failure goes back to the agent that owns it, with at most 2 repair rounds.
The loading screen shows what each agent is doing in real time.
Gemini decides, code verifies. Gemini output is schema-locked to catalog IDs. Every price, total, pin number and reach value is computed by code, never by the model.
The instruction books. POST /api/manual builds the manuals:
- Code lays out the pages, wires and parts from the checked pin map.
- Gemini writer agents, one per book, write the words. A fact-checker agent reviews them.
- Gemini vision agents pull part images from the product listings and confirm each photo shows the right part. Photos are cached locally.
- Wiring diagrams are coded vector drawings rendered from the wire list. Gemini never draws a wire, so the booklet cannot show a hallucinated connection.
The chat helper uses Gemini function calling (set_budget, swap_part, regenerate). Code re-checks every change before it reaches the screen.
Reliability. Requests race through fallback Gemini models when the primary model is slow or overloaded. A DEMO_MODE serves cached designs when the network is unreliable.
Gemini features used: structured output, function calling, Google Search grounding, vision, thinking levels, and multi-agent orchestration.
Challenges we ran into
- Hallucinated parts. Early designs invented parts and prices. We locked Gemini to catalog IDs through the response schema, rejected anything else, and fed failures back for repair.
- Silent passes. "Grab books from the shelf" matched none of our room targets, so every check passed and the robot did nothing. We added a requirements step: Gemini estimates what the task physically needs, and code checks the design against those needs.
- Knowing when to stop. When no catalog part can meet a need, brick says so instead of repairing forever.
- Latency. A full design once took up to a minute. Parallel specialist agents and a model fallback race brought it down, and live agent progress makes the wait readable.
- Trustworthy manuals. A booklet with one wrong pin can burn a board. We split the work so Gemini writes the words, while code supplies every pin number, wire colour and diagram.
Accomplishments that we're proud of
- Gemini never computes a number. The design you see is the design you can buy.
- Failed checks are never hidden. A beginner sees why a design won't work, in plain English.
- One sentence becomes real parts, a 3D model, a simulation, step-by-step manuals, Pi code and a buy list.
- Gemini checks Gemini: a fact-checker audits the design and the manuals, and a vision check audits the photos.
- You are not limited to a kit someone else designed. You can build whatever you can describe.
What we learned
- LLMs are great at choosing and explaining, and unreliable at arithmetic. "Gemini decides, code verifies" made the output trustworthy.
- Several small agents with narrow jobs beat one giant prompt, for both quality and speed.
- Schema-locked output plus a repair loop is far more reliable than prompting alone.
- Two orchestrators that check each other catch claims a single agent would let through.
What's next for brick
- More than wheeled robots. Legged walkers, tracked robots for rough ground, stationary arms for a desk or workbench, and drones. Each needs its own catalog slice, specialist agent, checks (balance, gait, thrust-to-weight) and manual books.
- Hardware-tested kits. Build our designs on a bench and mark the parts and kits we've verified.
- Scan your own room. Use a LiDAR phone scan instead of the sample apartment, so the simulation and reach checks match your space.
- Scratch-built frames. Generate plywood, acrylic and 3D-printed parts, with cut lists and STL files in the manual.
- Live shopping agents. Check stock and live prices across vendors, and swap in an equivalent part when one sells out.
- A bigger catalog. Grow beyond our current parts, with community-submitted parts that a human verifies.
- Microcontroller choice. Support Arduino and ESP32 alongside Raspberry Pi, and generate code for each.
- Program it in steps. A block-based editor, Scratch style, that runs the same routine as the generated Python, so beginners learn code the same way they learn the build.
- Upgrade path. "Add a camera to my robot" reuses what you already own and adds a new book to the shelf.
- Classrooms. Teacher mode with a fixed budget per team, progress tracking per page, and shared builds.
Built With
- gemini
- gemini-api
- google-genai
- next.js
- node.js
- raspberry-pi
- react
- react-three-fiber
- three.js
- typescript
- zod
Log in or sign up for Devpost to join the conversation.