Oct 2026 – present
Trust and safety in Vibr
Product design, security and engineering · Beneficialmedia
Vibr runs code a model wrote, with the designer's own model key, in their browser. I designed its trust model so that keys, files, other software and the model's own output are each handled as a stranger, and every safeguard is something the designer can see and understand: a key that stays put, an Allow before an agent connects, and a plain Nope.
Case study
Vibr is a design agent that lives in the browser. A designer brings their own model key, describes a screen, and Vibr plans it, builds it with a real design system, and runs the result. That means three things most products never do at once: it holds a secret that costs money, it runs code nobody reviewed, and it lets other software ask it to work.
I designed Vibr and build it with Claude Code. This is the part of the work that decides whom Vibr trusts, and how the designer can tell.
The problem
An agent builds what it's asked, for whoever asks, and assumes good faith. Vibr inherits that. Without a deliberate trust model, a shared design system could reach the designer's key, a draft could wander off to another site, a file could carry instructions the designer never saw, and a page elsewhere on the computer could drive Vibr without asking.
The constraint made it harder: Vibr has no accounts and no backend that holds anyone's work. Every safeguard had to run in the designer's browser, and every one had to be explainable in a sentence.
Principles
- Treat every input as a stranger. That includes the model's own output.
- Say it where it happens. A promise about the key belongs in the key dialog, not only in a policy.
- Ask before anything acts for the designer. And say when it's safe to answer yes.
- Fail toward the designer. A safeguard that's down shouldn't stop the work, and one that misfires should be fixed the same day.
The key never moves
A key is kept in the browser, one per model provider, and is sent only to that provider. Clearing Remember on this device keeps it for one tab, and the dialog works with password managers. Remove this key takes out one provider's key without touching the others.
Pasting a key is the hardest ask in Vibr, so there's a way around it: Sign in with OpenRouter uses OAuth with PKCE and creates a key the designer can see, limit and revoke on OpenRouter. And since a lot of people won't hand over a key to try something new, finished samples open with no key at all.
If a provider echoes a key back in an error, Vibr hides it before showing the message. Usage events and error reports carry no prompts, code or files, and anything key-shaped is taken out.
Code from a stranger
Every draft is code a model wrote, so it runs like code from a stranger. It renders in a sandboxed frame on its own origin, with a strict content policy and no way to reach the page around it, the key, or the top window. I then designed what each blocked action looks like, so containment reads as a feature rather than a bug:
- A link that would leave the canvas shows a notice instead of navigating. An exported app follows it for real.
- An alert or confirm shows its text as a notice instead of freezing the canvas.
- A loop that stays busy for more than a second stops, so a bad draft can't hang the tab.
- Images load only from the designer's library and a few known hosts. A blocked image says to add the picture to the library.
- Every message the frame sends back is checked for shape before Vibr acts on it.
Packages get the same suspicion. Before a custom npm package loads, Vibr pins it to a version that has been out at least two weeks, refuses known malware, and flags advisories, deprecations and lookalike names.
Files and words that hide things
People bring their own images, fonts, documents and Figma files, so each upload is checked for what it really is, not what it says it is. SVGs are stripped of scripts and outside references. Photos and videos a designer uploads lose their metadata, location included, before they're stored. Unsplash images keep theirs, because their credits have to stay intact.
Text can hide things too. Characters that don't show on screen can carry instructions a model will read and a person won't, so Vibr strips them from prompts, annotations and imported files. In live tests on production with models from Anthropic, Google and OpenAI, hidden instructions were removed before they reached the model, and each model built only what the visible request asked for.
Allow, before an agent connects
Vibr MCP lets a coding agent build prototypes through Vibr. Any page on the same computer could try to do the same, so a new connection waits in the tab with one question: allow it only if you just selected Open Vibr. Behind the question, the connection carries a random token, accepts work only from the exact page that opened the tab, and is forgotten when the tab closes.
The Allow step started as a browser fix: Safari blocked the first version and Chrome showed a warning most people wouldn't understand. Turning the connection around fixed both, and gave the designer one clear question in place of a browser warning.
A clear no
Vibr won't build sexual content involving minors, pornography, or gore. A short list of unambiguous words answers Nope. on the device, before a model sees the request or a key is spent. The planning step screens again with the designer's own model.
A word list has false positives, and the person who hits one did nothing wrong. When it refused "gore-free art" and a label for "XXX hot habanero" sauce, I fixed both the same day.
A word list also misses requests that never use its words. So I wrote 123 test requests, 90 that should build and 33 that shouldn't, and compared the word list with Jev, a fast content classifier from TypeSafe. The word list built all 90 and refused 18 of the 33. Jev got all 123 right, with a median time of about a tenth of a second.
That second opinion meant a second company would read each request. So it runs through one small route on Vibr's server that keeps the TypeSafe key, logs nothing it reads, and steps aside after a second and a half so the planning step can screen as before. The key dialog and the privacy page now say so, in all 12 languages.
The site around it
Vibr shares a server with this portfolio, so an attack on one could take down the other. A security round closed an open image proxy and an API key that could be drained with a forged header, and added security headers. Every server route Vibr uses now checks where a request comes from, has a rate limit, and sits behind Vercel's bot protection.
Outcome
- In per-model tests with simulated providers, all 9 models passed 18 checks each, including that the key can't be reached from a draft and that navigation, pop-ups and dialogs stay contained.
- Live tests on production with Anthropic, Google and OpenAI models removed every hidden instruction before it reached the model.
- The content check combines a word list on the device, Jev on the server and the plan step. Jev classified all 123 test requests correctly.
- Each safeguard has a visible moment in the product: the key dialog, the Allow question, a notice in the canvas, or a Nope. The privacy page explains each one in 12 languages.
I wrote about why this work still takes a person, however fast an agent builds, in AI Trusts the User.
The moments where trust is decided
Screenshots of a local development build of Vibr, November 19, 2026. The text and behavior match production on vibr.art.
Where Vibr asks, explains, or says no