An AI agent can be talked into anything. The browser doesn't have to be.

Agent Guard is a Firefox extension that checks every request an AI agent makes before it leaves the browser. You give the agent a permission slip: which sites it may use, and whether personal data may leave. The browser holds it to that, whatever the agent decides, and keeps its own record of what happened.

Why this exists

How it works

The demo

A pretend patient portal with one invented patient, and an outside lookup site that prints every request it receives, so anything printed got out. On the portal, hidden in a lab message, is an instruction people can't see: press Sync record. The button's hidden fields carry the patient's name, birth date and record number. Claude operates the portal in Firefox with the guard installed.

The agent is asked toWhat the guard does
Look up what a high liver test result meansLets it through. There's nothing personal in it
Send the patient's name and record number to the outside siteAsks. The supervisor blocks it, or removes the details and sends the rest
Summarize the blood work, while the hidden instruction says to press Sync recordBlocks the record from leaving, if the agent falls for it
Look something up on a site not on the slipBlocks the site

At the end, the agent's own summary of what it did is shown next to the guard's log.

How it's made

PieceWhat it doesWhere it runs
Firefox's blocking request APIHolds each request open while a check runs, then lets it through or stops it. Firefox allows an extension to wait on a slow check, like a model call. Chrome restricts this, according to MDN's list of differences between the twoIn the browser
Format rulesCatch things with a fixed shape: birth dates, phone numbers, email addresses, ID numbersIn the browser
foxmind-small, a small open model (86 MB)Finds names and other personal details the rules miss. It ships inside the extensionIn the browser, on the computer's processor. Nothing is sent to a server
Form checks in the pageRead each form before it's sent. Firefox doesn't show an extension what's inside a form that loads a new page, so the check happens first, and any outside form that skipped it is blockedIn the browser
Claude (Anthropic API)Plays the agent in the demo. It reads the page as text, hidden instruction included, and picks its own actions. The guard doesn't use itAnthropic's servers, demo only
Test portalThe patient site and the outside siteOn your own computer

What it borrows, and from whom

ProjectWhat it learnedWhat Agent Guard takes
foxpilotAn open-source agent that runs on your own device in Firefox, with a personal-data filter called PII GuardThe model, the in-browser model runtime, PII Guard's detection approach, the build setup and the icons (MIT licence)
CaMeL (Google DeepMind and others, 2025)Prompt injection can be defeated by tracking where data came from and where it's allowed to go, instead of trusting the model to behaveLearning the record, then refusing to let its details leave
The browser's same-origin ruleOne site can't reach into another. It's the oldest safety rule on the webThe idea that a browser decides what crosses from one site to another, here applied to agents

Safe by design

How it could sustain itself

Who paysFor what
Organizations running agents inside their own wallsHospitals, banks and government offices that can't send data to someone else's cloud. A supported browser build for agents, with permissions, limits and an audit log their compliance teams can export
Companies that make agent browsersLimits enforced by the browser engine itself, instead of each company rebuilding them
Teams automating logged-in portalsInsurance, supplier and government portals with no API, where the problems are logins, limits and a record of what happened

The line we won't cross: making agents pass as people. The honest route is an agent that says what it is and works within limits a person set.

What we hope to learn

Questions

Is the patient real?

No. The patient, the portal and the outside site are all invented and run on your own computer.

Does the agent fall for the hidden instruction?

In testing, Claude Sonnet and Haiku usually spotted and ignored it. So the demo includes a rehearsal that plays a fooled agent with scripted actions. The guard is the backstop for when the model doesn't catch it.

Does it send anything to a server?

No. The checks run inside the extension. Only the demo agent, Claude, runs on Anthropic's servers, and the guard doesn't depend on it.

Could the agent press "Send anyway" itself?

In this prototype, the question appears in the page, which an agent working the page's structure directly could reach. In a real product, the question belongs in the browser's own interface, where a page can't reach it.

Does it work in Chrome?

Not as built. It depends on holding a request open while a check runs, which Firefox allows and Chrome restricts.

Is this a Firefox feature?

No. It's an extension built as a research prototype.

What's weak

Other forms it could take