AI agents
Browser Agents and Web Navigation
Build agents that navigate websites through structured state, robust actions, and explicit trust boundaries.
By the end you can
- Define browser-agent navigation as an operational contract rather than a capability label
- Contrast DOM/API interaction with Accessibility-tree control in “A browser agent submitted a form after a page layout changed”
- Trace “A page can contain instructions designed to hijack the agent” through a concrete execution path
- Produce “Create a browser action protocol” with evidence for “Navigation succeeds across minor layout variation”
Example
GPT-4V could plan the task and still not click the right thing
GPT-4V was turned loose on live websites in 2024. It completed 51.1 percent of its tasks. It reached that figure only when its textual plans were grounded into actions by hand. Planning was not the bottleneck. Converting a plan into the right element on the page was. The experiment is called SeeAct.
The technique everyone reaches for did not rescue it. Set-of-mark prompting is the standard way to ground a model in a screenshot, and for web agents it turned out not to be effective. The best grounding strategy the authors could build used the HTML structure together with the visuals, not the picture alone. That is the failure this lesson is about. An agent reads the page, decides correctly, and still acts on the wrong element. It is a measured failure, not a story about a form that moved.
- Decision at stake: Build agents that navigate websites through structured state, robust actions, and explicit trust boundaries. SeeAct's 51.1 percent came with the grounding step performed by hand, which makes grounding a design decision rather than an implementation detail.
- Hidden assumption: Visible web text can be treated as instructions if it appears relevant. A 2023 paper attacked that assumption, and NIST later catalogued it as attack ID NISTAML.015.
- Primary control question: A page can contain instructions designed to hijack the agent. Brave demonstrated exactly that against a shipped consumer browser agent on 20 August 2025.
- Evidence to collect: Navigation succeeds across minor layout variation — measured the way SeeAct measured grounding, by holding the model fixed and changing only how actions are grounded.
Case
59.1, 14.41, 61: four benchmarks that do not agree
Mind2Web collected over 2,000 open-ended tasks from 137 websites spanning 31 domains. WebVoyager built real-world tasks on 15 popular websites and reported a 59.1 percent task success rate. Its automatic evaluation agreed with human judgment 85.3 percent of the time. Hold on to that second number.
WebArena went the other way and self-hosted the web. Four fully functional websites — e-commerce, social forum discussions, collaborative software development and content management — plus a self-hosted map, a calculator, a scratchpad and a Wikipedia mirror. “In total, we curated 241 templates and 812 instantiated intents.” Then it scored agents against people. The abstract does not soften the result: “our best GPT-4-based agent only achieves an end-to-end task success rate of 14.41%, significantly lower than the human performance of 78.24%”. 78.24 percent is what the tasks are worth doing at. 14.41 percent is what was delivered.
Then someone checked the graders. Online-Mind2Web rebuilt web-agent evaluation as 300 tasks on 136 live websites, with humans judging the runs. OpenAI's Operator reached 61 percent. Claude Computer Use 3.7 reached 56.3 percent. Most other agents landed near 30 percent, far below the numbers those same agents had self-reported on WebVoyager. “Even Operator only achieves a success rate of 61%, showing substantial room for improvement.” The 2025 paper behind those runs says in its abstract why the gap matters: “Our results depict a very different picture of the competency of current agents, suggesting over-optimism in previously reported results.” Their own auto-evaluator, WebJudge, reached 85.7 percent agreement with human judgment and a 3.8 percent average success-rate gap.
Read them together and the shape is clear. A success rate is a claim about an agent and a claim about the instrument that scored it. WebVoyager's 59.1 percent is quoted to a tenth of a point, through a grader that agrees with a person 85.3 percent of the time. Replace that grader with people on 136 live websites, and most agents come back near 30 percent.
Figure
Visual
Perception and grounding fail differently but get blamed together
Perception, grounding, interaction, verification. A browser agent repeats that cycle on every page, and any of the four can be the one that broke. Perception is what the page looks like to the agent. Grounding is deciding which element on the page the words refer to.
SeeAct is the experiment that pulls those two apart. It holds perception fixed — the same GPT-4V, the same live websites — and changes only the grounding step. That is how 51.1 percent of tasks got completed. The paper is blunt about which half stays open: “However, grounding still remains a major challenge. Existing LMM grounding strategies like set-of-mark prompting turns out to be not effective for web agents, and the best grounding strategy we develop in this paper leverages both the HTML structure and visuals.”
That is why the cycle is drawn as five owners and not one box marked “the agent”. A failure at perception and a failure at grounding produce the same screenshot of a wrong click. Verification belongs to one owner and trust control to another, with tests to match.
- 1
Perception
Capture DOM, accessibility, screenshot, URL, and page state.
- 2
Grounding
Map an intended action to a stable element or semantic target.
- 3
Interaction
Click, type, scroll, upload, navigate, or submit through bounded commands.
- 4
Verification
Check URL, selected values, page messages, and resulting state.
- 5
Trust control
Mark content origin and block page instructions from becoming agent policy.
Comparison
Contrasting implementations of browser-agent navigation
DOM and API interaction, accessibility-tree control, and screenshot coordinates read the same page at three different levels of meaning. The DOM names elements. The accessibility tree names roles. A screenshot names nothing, so a moved button is a different click. The more meaning the interface carries, the less often a cosmetic change breaks the run.
The third row is usually argued about with adjectives. SeeAct settles it with a result. Set-of-mark prompting, the standard screenshot-grounding technique, was not effective for web agents. The best grounding strategy in that paper leveraged both the HTML structure and the visuals. So screenshot coordinates are not the option that trades a little accuracy for universal coverage. In the published comparison they are the option that did not work on its own. The winner kept the page's structure alongside the picture.
None of the three tells the agent which words on the page are content and which are an instruction aimed at it. That question has to be settled elsewhere. The next section is where.
DOM/API interaction
Use structured elements or application endpoints.
- Precise semantics
- May be unavailable
- Can miss visual state
Accessibility-tree control
Act through roles, names, and hierarchy.
- Often robust
- Depends on accessibility quality
- Dynamic labels can drift
Screenshot coordinates
Use vision and pointer actions.
- Works across interfaces
- Fragile grounding
- High consequence risk
Every view of a page carries different semantics
Browser agents observe rendered pages, accessibility trees, DOM structures, network responses, or screenshots. Each of those views exposes different semantics. Each can change independently as the site evolves.
Web content is both data and potentially adversarial instruction. That is not a house convention; it is the thesis of a peer-reviewed paper. A 2023 paper named indirect prompt injection and taxonomised it: “We argue that LLM-Integrated Applications blur the line between data and instructions. We reveal new attack vectors, using Indirect Prompt Injection, that enable adversaries to remotely (without a direct interface) exploit LLM-integrated applications by strategically injecting prompts into data likely to be retrieved.” Its authors demonstrated working attacks against Bing's GPT-4-powered Chat and against code-completion engines. Named victims, in 2023, not a projection.
The runtime must therefore distinguish user intent, trusted policy, site controls, and untrusted page text. Everything the page says belongs in the last of those, including text that reads like a system message.
Screenshot, DOM and accessibility tree each show the same button differently, so an agent's page model is only as stable as its chosen view.
Example
Rerun yesterday’s task against today’s page
Layout moves constantly. So start by measuring whether navigation succeeds across minor layout variation: rerun yesterday's task against today's page and see how much of it still works. Sensitive submissions need a check of their own. A run can navigate perfectly and still send the wrong thing to the wrong place. Look at where the form posts, and what it carries, before it is submitted.
Then put the agent in front of a page written to mislead it, and give that test a number rather than a verdict. Anthropic did that before announcing its Claude for Chrome pilot on 25 August 2025: “We conducted extensive adversarial prompt injection testing, evaluating 123 test cases representing 29 different attack scenarios.” Unmitigated, the result was “Browser use without our safety mitigations showed a 23.6% attack success rate when deliberately targeted by malicious actors.” With the mitigations in place the figure fell to 11.2 percent in autonomous mode. Reduced, not removed. On a four-type browser-specific challenge set the same mitigations took the success rate from 35.7 percent to 0 percent. That is what a defence looks like when the attack space is narrow enough to enumerate.
Last, when an interaction fails in the same place twice, ask whether the execution trace holds enough state for someone to reproduce that failure without guessing.
- Signal 1: Navigation succeeds across minor layout variation — measured by changing only the page, as SeeAct changed only the grounding.
- Signal 2: Sensitive submissions require a verified destination and payload, checked before the submit and not inferred from a clean-looking trace.
- Signal 3: Untrusted page text cannot expand permissions or rewrite the task — stated as a rate, not a promise: 23.6 percent unmitigated and 11.2 percent mitigated in autonomous mode, across 123 test cases and 29 attack scenarios.
- Signal 4: Execution traces contain enough state to reproduce a failed interaction, including the URL, the target identity and the trust classification in force at the time.
Key idea
A page can contain instructions designed to hijack the agent
Indirect prompt injection embeds malicious text in documents, emails, or websites the agent must inspect. It is a catalogued attack class, not a worry. NIST's official adversarial-ML taxonomy gave it an attack ID on 24 March 2025: NISTAML.015. The gloss reads “A type of PROMPT INJECTION executed through RESOURCE CONTROL rather than through user-provided input as in a DIRECT PROMPT INJECTION”. Web-browsing agents are named among the exposed systems. The mechanism, in the taxonomy's own words: “Because GenAI models combine the data and instruction channels, attackers can leverage the data channel to affect system operations by manipulating resources with which the system interacts.”
The same attack has run against a shipped consumer product. Instructions hidden in a Reddit comment made Perplexity's Comet browser read the user's Perplexity account email, fetch a one-time password from their Gmail, and post both back as a reply. Two Brave security engineers, Artem Chaikin and Shivan Kaul Sahib, published it working on 20 August 2025. Their diagnosis of the cause is one sentence long: “Comet feeds a part of the webpage directly to its LLM without distinguishing between the user's instructions and untrusted content from the webpage”. Perplexity had shipped a fix on 27 July 2025. Brave found it incomplete on retest.
Treat page content as untrusted evidence. Isolate instruction channels, and require external checks before sensitive actions.
Anything the agent reads on the way to doing its job is a candidate instruction, and the ones that hurt you will look like ordinary page text.
Steps
Create a browser action protocol
Before a browser agent needs a better model it needs an action protocol: what it may click, what it must confirm, what it may never submit. Write one for a single workflow. The protocol exists because a page can contain instructions designed to hijack the agent, and the only defence that holds is a list the page itself cannot edit.
The last step, testing against hostile pages, is the one teams skip. Inventing hostile pages sounds like a project. It is not one any more. AgentDojo was built for exactly this question: “We populate the environment with 97 realistic tasks (e.g., managing an email client, navigating an e-banking website, or making travel bookings), 629 security test cases, and various attack and defense paradigms from the literature.” NIST's taxonomy lists it among the public AML benchmarks. 97 tasks and 629 security test cases is the size of the exam your protocol has to sit. One of those tasks is an agent navigating an e-banking website, which is the workflow most teams would rather not think about.
Then test the protocol by running the workflow again after the site has moved things around, and see whether it still describes what the agent is actually doing. Write those three lists down before the next site redesign, not after it.
- 1
Capture pre-action state
Record URL, target identity, visible values, and trust classification.
- 2
Prefer semantic targets
Use roles, labels, and stable identifiers before coordinates.
- 3
Preview sensitive submissions
Render the exact destination, payload, and consequence for approval.
- 4
Verify the result
Check the resulting URL, message, resource state, and duplicate risk.
- 5
Test hostile pages
Include hidden text, misleading buttons, overlays, and stale sessions.
Clicks are a workflow one redesign from breaking
Use direct APIs when they provide a safer and more stable interface. Browser automation is valuable when no structured integration exists, not because clicking looks more human.
The figures in this lesson are the argument. WebArena's best GPT-4-based agent finished 14.41 percent of 812 tasks end to end, where human annotators finished 78.24 percent. Scored by people rather than by a grader, on Online-Mind2Web's 300 tasks across 136 live websites, Operator reached 61 percent and most other agents sat near 30 percent. Grounding, the step between deciding and clicking, is still the open problem SeeAct described. And after adversarial testing across 123 cases and 29 scenarios, 11.2 percent of injection attempts still succeeded in autonomous mode.
When you do run an agent through a browser, treat each site redesign as a reason to reread the action protocol. The pages it visits now are not the pages it was tested against. Two questions never go away. Can it still find its way around a page that has shifted? Can it tell the page's content apart from an order aimed at it?
Every workflow left on clicks instead of a documented interface is one redesign away from breaking, and the breakage rarely announces itself.
Key takeaways
- Browser agents observe rendered pages, accessibility trees, DOM structures, network responses, or screenshots. The view they act through decides what a redesign breaks.
- The open problem is grounding, not planning. In SeeAct, GPT-4V completed 51.1 percent of live-website tasks only with its plans grounded into actions by hand, and set-of-mark prompting did not work for web agents.
- A success rate is only as readable as the instrument behind it. WebVoyager's 59.1 percent came with 85.3 percent grader-human agreement; under human evaluation on Online-Mind2Web's 300 tasks across 136 live websites, most agents landed near 30 percent.
- WebArena's 812 tasks from 241 templates put the best GPT-4-based agent at 14.41 percent end to end, against 78.24 percent for human annotators. That is the scale the other numbers should be read on.
- Web content is both data and potentially adversarial instruction — named by a 2023 paper, catalogued by NIST as NISTAML.015, and demonstrated in Perplexity's Comet browser by Brave on 20 August 2025.
- Mitigations reduce injection rather than remove it: 23.6 percent unmitigated, 11.2 percent mitigated in autonomous mode, across 123 test cases. So measure with a sized harness such as AgentDojo's 97 tasks and 629 security test cases.