Dreamer
Browser-based Arduino workbench — real AVR emulation, AI circuit agent, MCP-native.
A complete Arduino workbench, in the browser.
Most Arduino simulators either fake the execution (string-matching pseudo-interpreters) or force a desktop install. Dreamer does neither: arduino-cli produces a real .hex from your sketch, avr8js runs it instruction-by-instruction in the browser, and an agent can design the surrounding circuit for you. The same tools are exposed as a CLI binary and as an MCP server.
Virtual Breadboard
30-row breadboard with power rails, supporting Uno, Nano, Mega 2560, and RPi Pico. Components snap to grid, connect via internal bus strips. Drag to reposition, R to rotate. Environment layer drives ray-cast sensors (HC-SR04) against draggable obstacles.
Real Bytecode Emulation
Sketches are compiled by arduino-cli into the exact .hex an Uno would run, then executed cycle-by-cycle in-browser by avr8js. No transpiler, no approximation — every #include, interrupt, and library just works.
Agent-Driven Workbench
A Claude-powered agent (Sonnet + Haiku, routed by complexity) designs circuits via a typed DSL — validate_design dry-runs diagrams before apply_design commits. Reachable from the web UI, the dreamer CLI, or any MCP client.
What powers Dreamer
Six core systems, each with distinct technical requirements.
arduino-cli → avr8js Pipeline
Sketches are compiled by arduino-cli against the real avr-gcc toolchain and the resulting .hex is executed cycle-accurately in-browser by avr8js. Interrupts, timers, USART, ADC, PWM, and EEPROM all run on the emulated AVR — not a JS shim.
DSL-First Circuit Agent
A Claude-powered agent writes circuits as a typed DreamerDiagram DSL (v1.3.x). validate_design dry-runs the diagram and apply_design commits it atomically. Request routing picks Sonnet for complex builds, Haiku for simple ones, with snapshot-pinned behavior per run.
Peripheral Bus + Electrical DRC
Peripherals (servo, LCD, OLED, HC-SR04, DHT, IR) talk to avr8js via a typed peripheral bus. A static electrical analyzer (disjoint-set net resolver) runs on every edit to flag shorts, missing grounds, non-rail-distributed fanout, and overloaded supplies — a design-rule check, not SPICE.
Model Context Protocol Server
The `dreamer mcp` subcommand speaks MCP over stdio so any MCP client — Claude Desktop, Cursor, IDE plugins — can call validate_design / apply_design / update_sketch / analyze_power_budget and read project resources without routing through the chat UI.
Audio, Serial, Hardware Bridge
tone() emits real Web Audio square waves. The Serial Monitor supports bidirectional I/O, baud selection, line endings, timestamps — and can attach to a real Arduino via the Web Serial API to flash and watch output from the browser.
Component + Pin Registry
One schema per type drives the whole stack: footprint, renderer, pin-resolver, inspector, agent tool schema, power model, palette icon. 22+ component types and 4 board targets (Uno, Nano, Mega 2560, RPi Pico). Adding a part is a schemas-edit, not a refactor.
Five core workflows
Breadboard & Wiring
Place components from the palette, snap to grid, draw wires. The breadboard simulates internal bus connections — 5 holes per row, center gap, power rails. R to rotate, drag to reposition.
Sketch Editor & Execution
CodeMirror 6 with VS Code Dark+ highlighting, autocomplete, bracket matching, inline linting. Hit Run and arduino-cli compiles the sketch against the real avr-gcc toolchain; the resulting .hex runs cycle-accurately in-browser via avr8js, with setup() + loop() behaving exactly as they would on a physical Uno.
Electrical DRC + Live Visuals
Every board edit triggers a static electrical analyzer that walks the disjoint-set of nets to flag missing grounds, non-rail-distributed fanout, pin-mode mismatches, and over-drawn rails. Peripherals react to avr8js pin events in real time — LEDs glow with PWM duty cycle, LCDs render CGRAM, OLEDs rasterize framebuffers. Probe any node with the multimeter.
Serial Monitor & Web Serial Bridge
Bidirectional serial communication against the emulated USART. Serial.print() streams live. Flip a switch and attach a real Arduino over USB via the Web Serial API — baud selector, line endings, autoscroll, timestamps all carry over.
AI Circuit Agent + MCP
Describe a circuit in natural language and the agent emits a DreamerDiagram, validates it, then commits atomically via apply_design — all through streaming tool calls. Toggle DSL vs auto-layout in the prompt bar. The same tools are exposed as an MCP server: Claude Desktop / Cursor / any MCP client can drive the board without opening the web UI.
A real Arduino workbench,
with an AI agent at every layer.
Dreamer started as a transpiler-based toy and grew up. Today it compiles your sketch with the real arduino-cli toolchain and runs the resulting .hex in-browser via avr8js — interrupts, timers, USART, PWM, EEPROM, all cycle-accurate. Web Serial bridges the simulator to physical hardware when you want to flash for real.
The architecture centres on a single DreamerDiagram DSL (zod-schema v1) 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, and the web UI's persistence layer — so the agent, a human in Claude Desktop, and a scripted pipeline all speak the same dialect.
The agent itself is versioned (snapshot-pinned per run), routes between Sonnet and Haiku by prompt complexity, and exposes a DSL-first / auto-layout toggle in the UI so you can A/B how different build strategies fare against the same prompt.




