Skip to main content

Breadbox

Desktop Arduino workbench — real AVR emulation, SPICE transient solver, 3D breadboard, AI circuit agent, MCP-native.

React 19TypeScriptBunavr8jsspicey (SPICE)three.jsarduino-cliAI SDKMCPTauri
current — active development
Active Development

Breadbox_

Describe the circuit. Get the board, the code, and the physics.

An Arduino workbench where you describe a circuit in plain language and an AI agent wires it on the breadboard and writes the sketch. arduino-cli compiles real Arduino C++, the resulting .hex runs cycle-accurately on avr8js, and a patched SPICE solver works out the volts and amps behind it — so the LED dims because the maths says so, not because a renderer faked it. Inspect the build flat in 2D or on a 3D breadboard with real part models, then flash it to hardware over USB. Ships as a single-file binary and a native desktop app, and speaks MCP, so Claude Desktop or Cursor can drive the board directly.

React 19TypeScriptBunavr8jsrp2040jsspicey (SPICE)three.jsarduino-cliVercel AI SDKMCPTauri 2
3d_breadboard
The 3D breadboard: an Arduino Uno wired to a 16×2 LCD, which is displaying Hello, World! and a running seconds counter from the emulated sketch

Not a mockup — the LCD is showing the character buffer the emulated ATmega328P is writing to, one frame behind the sketch that wrote it.

// Overview

A complete Arduino workbench, simulated for real.

Most Arduino simulators fake one half of the problem: they either string-match your code instead of executing it, or they animate the circuit instead of solving it. Breadbox does neither. arduino-cli produces a real .hex from your sketch, avr8js runs it instruction-by-instruction, a SPICE solver handles the volts and amps, and an agent can design the surrounding circuit for you. The same tools ship as a CLI binary, a desktop app, and an MCP server.

BOARD01

Breadboard in 2D and 3D

A 30-row breadboard with power rails, targeting Uno, Nano, Mega 2560, and RPi Pico. Around 30 built-in parts snap to the grid and connect through the internal bus strips. The same board renders as a flat schematic-style canvas or as a 3D scene built from real GLB part models — and you can author entirely new parts in a declarative DSL.

SIM02

Real Bytecode, Real Circuit

arduino-cli compiles your sketch into the exact .hex an Uno would run, and avr8js executes it cycle-by-cycle — every #include, interrupt, and library just works. Underneath, a patched SPICE engine solves the surrounding circuit as a transient system, with capacitors, inductors, BJTs and MOSFETs integrated over time rather than approximated.

AI03

Agent-Driven Workbench

A Claude-powered agent designs circuits as a typed DSL — validate_design dry-runs the diagram before apply_design commits it — and a separate fix agent diagnoses a board that misbehaves. Reachable from the chat panel, the breadbox CLI, or any MCP client.

overview_demo
// Walkthrough

Prompt to circuit, circuit to silicon.

describe.webm
01Describe

Say what you want

An agent turns the sentence into a typed circuit diagram, validates it, then commits it to the board — placing parts, routing wires, and writing the sketch in one pass.

wire.jpg
The breadboard, sketch editor, and generated schematic side by side
02Wire

Or build it yourself

Around 30 parts snap to the grid and connect through the breadboard's real bus strips. Every edit re-derives the schematic beside it — the same board, drawn two ways.

run.webm
03Run

Real toolchain, real bytecode

arduino-cli compiles the sketch against avr-gcc and avr8js executes the resulting .hex cycle-by-cycle. The compiler's transcript streams in line by line — this is the same binary a physical Uno would run.

observe.jpg
An ultrasonic sensor streaming distance readings to the serial monitor
04Observe

Sensors that answer

An emulated HC-SR04 echoes back a real pulse width, pulseIn() times it, and the distance lands in the serial monitor — while a SPICE solver works out the volts and amps behind every net.

three-d.jpg
A servo and power module on the 3D breadboard
053D

The same board, in space

Flip the workspace and the circuit rebuilds as a three.js scene from real GLB part models, with jumper wires routed around the parts they pass over.

live.jpg
A 28BYJ-48 stepper and ULN2003 driver on the 3D breadboard
06Live

Driven by the running sketch

The 3D scene is not a still life. Stepper shafts and servo horns turn on the pulses the sketch emits, and LCD, OLED, and seven-segment screens are painted from the display buffer the emulated MCU is actually writing to.

// Features

What powers Breadbox

Six systems under the surface.

RUN

arduino-cli → avr8js

The real avr-gcc toolchain compiles the sketch; avr8js runs the .hex cycle-by-cycle. Interrupts, timers, USART, I2C, SPI, EEPROM — emulated, not shimmed. Pico sketches run on rp2040js.

avr8jsrp2040jsarduino-cli
SPICE

Transient circuit solver

The board compiles to a SPICE netlist and is solved over time by a patched spicey: trapezoidal integration, real C and L, Ebers-Moll BJTs, level-1 MOSFETs. Runs in a Web Worker, cross-checked against ngspice in CI.

spiceyTransient MNAngspice
3D

Three.js breadboard

GLB part models, wires routed around the parts they cross, a transform gizmo, and an assembly editor for mounting your own models onto a servo horn or stepper shaft. Rapier physics sits behind an experimental flag.

three.jsreact-three-fiberRapier (experimental)
AGT

DSL-first circuit agent

Circuits are written as a typed diagram: validate_design dry-runs it, apply_design commits it atomically. A fix agent diagnoses a misbehaving board, and a policy engine can block a design that would over-draw a rail.

Claude Haiku 4.5AI SDKPolicy Engine
MCP

MCP server

20 tools over stdio, so Claude Desktop or Cursor can build circuits without opening the app. Edits hit disk, the app file-watches, and the open canvas redraws about half a second later — no reload.

MCP SDKstdioLive Canvas
REG

Part registry + custom DSL

One schema per type drives the footprint, both renderers, the pin resolver, the agent's tool schema, and the power model. ~30 built-ins — and a declarative DSL whose behavior signals make a part you invent drivable from sketch code.

Zod v4Registry PatternCustom-Part DSL
// Stack
Runtime
BunTypeScript strict
Monorepo
packages/apppackages/apipackages/clipackages/desktoppackages/schemaspackages/config
Frontend
React 19ViteTailwind v4Base UIDockviewCodeMirror 6XState v5
3D
three.jsreact-three-fiberdreiGLB part modelsRapier (experimental)
Backend
ElysiaBun.serve
Emulation
arduino-cliavr-gccavr8js (AVR-8)rp2040js (RP2040)
Circuit
spicey (patched SPICE)Transient MNAWeb Worker solverngspice cross-checks
Analysis
Disjoint-set net resolverPower budgetPolicy engineRay-cast sensors
AI
Vercel AI SDK@ai-sdk/anthropicClaude Haiku 4.5Build + fix agents
Agent surface
Chat UIbreadbox CLIMCP server (stdio)
Hardware
arduino-cli flashWeb Serial APIWeb Audio API
Distribution
Single-file binaryTauri 2 desktopSigned auto-updater
Schemas
Zod v4Diagram DSLCustom-part DSLBoardOp union
// Conclusion

A real Arduino workbench,
with an AI agent at every layer.

Breadbox started as a transpiler-based toy and grew up twice. First the execution got real: arduino-cli compiles your sketch and avr8js runs the resulting .hex cycle-by-cycle — interrupts, timers, USART, I2C, PWM, EEPROM. Then the circuit got real: the board is compiled to a SPICE netlist and solved as a transient system, so capacitors charge, inductors ring, and a transistor is a transistor rather than an if-statement.

The architecture centres on a single diagram DSL and a component registry. The same schema drives the agent's tool inputs, the CLI's headless diagram commands, the MCP server's tool surface, the 2D and 3D renderers, and the persistence layer — so the agent, a human in Claude Desktop, and a scripted pipeline all speak the same dialect. A custom-part DSL extends that to parts nobody has built yet: describe the electrics, bind an SVG to a few behavior signals, and it simulates and animates like a built-in.

It ships as a single-file binary and a Tauri desktop app for macOS and Windows, with the whole web UI embedded in the executable and a signed auto-updater. There is no cloud to sign into: the board, the sketch, and the parts you author are files on your disk — which is also what lets an MCP client edit them and have the open canvas redraw a half-second later.

agent.png
Breadbox AI circuit agent
breadbox_doc.png
Breadbox documentation overview
> breadbox — desktop + CLI + MCP, one codebase — built by zelong_