Inspiration
Electronic design is naturally visual, but agents are usually forced to guess their way through pixels or work in a separate text-only model. That creates two competing versions of the circuit. Circuit Sim explores a better model: one authoritative circuit that a person can see and edit while an agent can inspect, change, simulate, and explain through structured browser-native tools.
What it does
Circuit Sim is a collaborative schematic workbench for people and agents. A user works in the visual editor while an agent uses four WebMCP tools exposed directly by the live page:
inspect_circuitdiscovers instructions, the component catalog, exact terminal keys, project state, ERC findings, and simulation freshness.author_circuitapplies a validated complete circuit graph using an optimistic project hash.highlight_componentsfocuses the same objects in the human-visible schematic for explanation and review.simulate_circuitruns the selected SPICE engine and returns measurements tied to the exact circuit snapshot.
The demo shows Codex designing a beta-100 NPN bias stage from a natural-language target, creating the complete connected schematic, highlighting the bias network, running ngspice, and reporting node voltages and branch currents. It then changes the emitter resistor from 1 kΩ to 2 kΩ and simulates again to explain the stability-versus-headroom tradeoff using measured evidence.
Why WebMCP is the right fit
Without WebMCP, an agent would have to click through a dense CAD interface, infer component geometry, and scrape results from pixels. With WebMCP, the page advertises its capabilities and schemas directly. The agent can make precise, validated edits while every result remains visible to the user in the same workbench.
This creates a workflow that was previously difficult: a person can describe design intent, watch an agent turn it into a real schematic, inspect exactly what changed, and challenge the design with another simulation—all without copying netlists between tools or maintaining a hidden agent-only circuit.
How we built it
The browser editor is React and TypeScript. Effect Schema defines and validates the canonical CircuitProject, edit operations, WebMCP inputs, and simulation responses. The page registers tools through document.modelContext.registerTool. Agent edits cross the same domain validation used by the human interface. Connectivity and the SPICE netlist are derived from the saved project; the server runs ngspice in an isolated process and returns a validated simulation run associated with the project snapshot hash. IndexedDB persists validated projects and runs. The app is containerized and deployed on Render.
The project is intentionally human-in-the-loop: hashes prevent stale agent writes, ERC findings stay visible, simulation evidence is inspectable, and component highlighting connects the agent’s explanation to the schematic.
Challenges and learning
The hardest part was keeping a visual editor, structured agent tools, connectivity extraction, and SPICE results consistent without creating a second source of truth. We learned that WebMCP is most valuable when tools expose domain operations and evidence—not a thin wrapper around UI clicks.
Accomplishments
Circuit Sim delivers a working deployed product rather than a mockup: four live WebMCP tools, validated authoring, shared human/agent state, ERC feedback, ngspice simulation, snapshot identity, undo/redo, persistence, and an end-to-end demonstration inside the Codex in-app browser.
Built With
- codex
- docker
- effect
- ngspice
- react
- render
- typescript
- webmcp
Log in or sign up for Devpost to join the conversation.