How Mercury Built Builder Mode for Prototyping with Coding Agents
Built by Lauren LoPrete · · Source: X
Result: According to Lauren LoPrete, designers and PMs have built over 300 prototypes with Builder Mode, and one designer took Mercury Agent Controls from first idea to launch in three weeks.
What they built
Lauren LoPrete says Mercury built its own prototyping tool, called Builder Mode. Designers and PMs work with a coding agent inside Mercury's real product code, so a prototype looks and behaves like the product customers use. From a panel in the browser they can switch between versions, user states and feature flags, collect feedback on the prototype, and send that feedback to the agent to act on. When an idea is ready, engineers build from the same code.
LoPrete says Mercury looked at off the shelf tools first. Most of them build a new app or hand the agent a UI kit, with no context on how the product works.
How it works
According to LoPrete, the team started by having agents play designers and run a standard set of prototyping tasks to see where they got stuck. Hundreds of eval runs shaped three pieces:
- A toolkit of agent instructions and skills. It lets Claude Code, Codex or Cursor set up Mercury's frontend on mock data, switch versions and states, and run the same checks every time. Prototypes live in GitHub as draft PRs, so teammates can branch from each other's work.
- States, flags and mock data. States and flags cover known screens and mock data covers the rest. Ask for a freshly approved company and every page shows what a new customer would see. The team is starting to connect this to a mock database.
- Tapes. A tape is a saved conversation with Mercury's AI agent that plays back in the product. Anyone can open a link to any point in it, and errors and timeouts can be tapes too.
LoPrete says the evals showed agents picked Mercury's components when given targeted guidance, and a visual self check caught bugs the agents missed when reading only the code.
The result
LoPrete says designers and PMs have built over 300 prototypes, and PMMs, data scientists and engineers now use Builder Mode too. In a redesign of the accounts pages, one designer had roughly 200 views in one prototype within two days, each with its own link. For Mercury Agent Controls, LoPrete says one designer worked as designer, PM and engineer and shipped it three weeks after the first idea. Before Builder Mode, they say setup for a designer took two to three hours on a good day.
How to build something similar
- Write agent instructions and skills that set up your frontend on mock data, so a non engineer can get a working copy of the real app without a full backend.
- Define the account states and feature flags you care about as named presets the agent can switch between, and give each one a shareable URL.
- Run an agent through a fixed list of prototyping tasks, note where it fails, fix the instructions, and repeat.
- Keep prototypes as draft pull requests in your main repo so engineers can pick up the same code.
The original post
We've been having a lot of fun building our own prototyping tools @mercury that help us ship fast without compromising quality. https://x.com/i/article/2122486883846631424 In November we launched Mercury Agent Controls, which give our customers clear visibility into and control over what their AI agents do in their Mercury account. What’s not obvious from the announcement is that one designer carried most of the work from idea to launch in just three weeks. A big reason she could move that fast is Builder Mode, the prototyping tool we built in house. Builder Mode lets designers and PMs work with their coding agent right in Mercury’s product code, so their prototypes look and behave like the product our customers use. From a panel in the browser, they can switch between versions, user states, and feature flags; collect feedback right on the prototype; and send it to the agent to act on. When an idea is ready, engineers build from the same code instead of starting over. That means anyone at Mercury can turn an idea into a working prototype in minutes and share it with a link. The challenge of building for hundreds of states Before Builder Mode, we didn’t have a golden path for prototyping close to production. What we had was a sandbox that looked like our app without being the real thing. It helped us move fast, but it cost us in quality and made it hard to go from prototype to shippable work. On the other side of the spectrum, a designer who wanted to prototype closer to production had to find an engineer, ask a favor, and then spend hours setting up a full stack dev environment. That left them with a massive system running on their machine and a slow workflow to ideate with. Getting set up took two to three hours on a good day, and plenty of attempts ended in failure. Neither path let designers see the product the way customers do, in all the states it can be in. Every enterprise product holds more states than a design canvas can carry. An account can be new, frozen, under review, over a limit, or waiting on someone else’s approval, and even a mature design system won’t know about any of that. The sandbox couldn’t show those states, and the full dev setup was too slow to explore them. We knew we needed a better way for designers to prototype. How we built Builder Mode Builder Mode started as a feedback problem. We wanted designers prototyping in our product code, but setup kept failing them and we couldn’t always see what went wrong. So we had agents play designers, run a standard set of prototyping tasks, and show us where they got stuck. Setup was our first challenge, then other friction points kept coming up, and each round of evals shaped the next version. Hundreds of eval runs showed where context helps. Agents picked Mercury’s components when they had targeted guidance, and a visual self check caught bugs they’d miss reading just the code. What came out of those runs is three pieces that sit on top of the coding agents designers already use. A toolkit of agent instructions and skills The toolkit lets Claude Code, Codex, or Cursor set up Mercury’s frontend on mock data, switch versions and states, and run checks the same way every time. Versions and variants sit side by side in one prototype, so designers can compare directions without switching branches. Because prototypes live in GitHub as draft PRs, teammates can branch from each other’s work or from an engineer’s. States, flags, and mock data States and flags cover the screens we already know about, and mock data covers everything else. We’re starting to connect that mock data to a mock database so the product acts the way it does for a customer. Ask for a freshly approved company and you get one, with every page showing what a new customer would see, empty states included, without anyone designing them screen by screen. Ask for an employee who’s halfway through onboarding, switch to the admin view, and come back, and their progress is still there. Teams will be
Want to build something like this?
Join the Shipping Skool community free. Paid members get live bootcamp calls every week.
Join Shipping Skool — Free