A browser agent is a program that uses a large language model to operate a web browser on its own. You give it a goal, such as "find the cheapest flight on this site and fill in the booking form", and it works through the site step by step, the way a person would.
How does a browser agent work?
A browser agent works in a loop of observe, decide, act and check.
- Observe. The agent captures the current state of the page.
- Decide. It sends that state, the goal and the history of earlier steps to a language model, which returns the next action.
- Act. A browser automation library, such as Playwright or Puppeteer, carries the action out in the browser.
- Check. The agent captures the page again and decides whether the goal is met, whether to continue or whether to stop.
The loop repeats until the agent reports success, reports that the task is impossible, or reaches a step limit. Research benchmarks formalise the same loop. The WebArena and OSWorld papers model a task as a partially observable decision process, in which the agent does not see the full state of the website or computer, only what the page shows it (OSWorld paper, section 2.1, read 2026-11-24).
How does a browser agent see the page?
A browser agent sees the page through one or more text or image views that the harness builds from the browser. The common ones are:
Table: How browser agents observe a page
| View | What the model receives | Good for |
|---|---|---|
| Accessibility tree | A text outline of roles, names and states of page elements | Forms, buttons and links with clear labels |
| Cleaned HTML or DOM | A trimmed copy of the page markup | Pages with poor accessibility labels |
| Screenshot | An image of the viewport | Canvas, charts and visual layouts |
| Set-of-marks screenshot | A screenshot with a numbered box on each clickable element | Letting the model pick an element by number |
The OSWorld benchmark offers four of these settings for desktop agents: a screenshot, the accessibility tree, both together, and a set-of-mark screenshot (OSWorld paper, read 2026-11-24). Browser benchmarks such as WebArena and VisualWebArena offer similar choices.
What actions can a browser agent take?
A browser agent's actions are the ones a person uses: click an element, type text, press a key, scroll, select an option, go back, open a URL, switch tabs and stop. The model names the action and its target, for example "click element 14" or "type 'London' into the search box". The harness translates that into a Playwright or Puppeteer call, or into a raw Chrome DevTools Protocol message.
How is a browser agent different from a scraper or a test script?
A browser agent chooses its steps at run time; a scraper or test script follows steps written in advance.
Table: Browser agent compared with scripted automation
| Scripted automation | Browser agent | |
|---|---|---|
| Who writes the steps | A developer, ahead of time | A language model, during the run |
| New or changed pages | Breaks until the script is fixed | Often adapts |
| Speed per step | Milliseconds | Seconds, because each step waits for a model call |
| Cost per run | Compute only | Compute plus model tokens |
| Repeatability | Same result each run | Can differ between runs |
| Best for | Known, stable flows | Varied or unfamiliar sites, one-off tasks |
A common pattern is to use both: a script for the stable parts of a flow, such as logging in, and an agent for the part that changes.
What does a browser agent need to run?
A browser agent needs four things: a browser, a driver, a model and a place to run.
- A browser. Usually Chromium. Headless mode is common, and headed mode is used when the agent works from screenshots of a real desktop or when a site behaves differently without a visible window.
- A driver. Playwright, Puppeteer or a direct Chrome DevTools Protocol connection.
- A model. Any model that can read the chosen page view and return structured actions.
- An isolated environment. A container or virtual machine for each session, so the agent's cookies, downloads and network access stay apart from everything else.
The last point is the one teams most often add late. An agent reads pages it does not control. The OWASP Top 10 for LLM applications names this risk: indirect prompt injection happens "when an LLM accepts input from external sources, such as websites or files" (OWASP LLM01:2025, read 2026-11-24). Running each session in its own disposable environment limits what a manipulated agent can reach.
Why do browser agents fail?
Browser agents fail for reasons that fall into three groups.
- Model errors. The model misreads the page, clicks the wrong element, or forgets an earlier step. The OSWorld authors report that the best model in their study completed 12.24% of tasks against 72.36% for people, "primarily struggling with GUI grounding and operational knowledge" (OSWorld abstract, read 2026-11-24).
- Environment problems. Pages load slowly, pop-ups appear, a site blocks automated traffic or a session expires. These are not the model's fault but still end the task.
- Attacks. A page carries text meant to redirect the agent. Researchers who placed pop-ups in OSWorld and VisualWebArena found agents clicked them in "86% on average" of cases, which cut task success by 47% (Attacking Vision-Language Computer Agents via Pop-ups, read 2026-11-24).
Telling these groups apart matters when you measure an agent. A score that mixes environment failures with model failures says little about either.
What are browser agents used for?
Browser agents are used where a task lives in a website without a usable API. Common uses are:
- filling in forms across many sites, such as supplier portals;
- collecting information that needs clicks, filters or logins to reach;
- testing a web app by describing the test in plain language;
- research tasks that browse many pages and summarise them;
- internal tools that only have a web interface.
Is a web browsing agent the same thing as a browser agent?
A web browsing agent is the same thing as a browser agent; the research literature mostly says "web agent". WebArena's paper is about "Building Autonomous Agents" for "A Realistic Web Environment" (arXiv 2307.13854, read 2026-11-26), and BrowseComp calls the agents it tests "Browsing Agents" (arXiv 2504.12516, read 2026-11-26). The term to keep apart is the agentic browser, a browser a person uses with an agent built in; see what an agentic browser is.
How are browser agents measured?
Browser agents are measured with benchmarks that give a task, run the agent, and check the result with a script. WebArena hosts its own copies of shopping, forum, code-hosting and content-management sites so every run starts from the same state (WebArena paper, read 2026-11-24). Mind2Web collects tasks from real websites. BrowserGym wraps several of these benchmarks behind one interface (BrowserGym repository, read 2026-11-24).
What we read for this article
- OSWorld paper (arXiv 2404.07972), read 2026-11-24
- WebArena paper (arXiv 2307.13854), read 2026-11-24
- OWASP LLM01:2025 Prompt Injection, read 2026-11-24
- Attacking Vision-Language Computer Agents via Pop-ups (arXiv 2411.02391), read 2026-11-24
- BrowserGym repository, read 2026-11-24
- BrowseComp paper (arXiv 2504.12516), read 2026-11-26
Frequently asked
What is the difference between a browser agent and a web scraper?
A scraper runs fixed steps written in advance for known pages. A browser agent decides each step at run time from what it sees, so it can handle pages it has never met, at the cost of speed and predictability.
How does a browser agent see a web page?
Usually through the accessibility tree, a screenshot, a cleaned-up copy of the HTML, or a screenshot with numbered boxes drawn on clickable elements. Many agents combine two of these.
Can a browser agent log in to websites?
Yes, but the login is best handled by the harness, not the model. A saved login state or a secret filled in by code keeps passwords out of the prompt and the logs.
Is a web browsing agent the same as a browser agent?
Yes, in most usage. Papers say web agent, browsing agent or web browsing agent for the same kind of system. An agentic browser is different, a browser with an agent built in that works in the user's own session.
How are browser agents tested?
With benchmarks such as WebArena, which hosts its own copies of real websites, and Mind2Web, which records tasks on real sites. Each task has a scripted check of whether the goal was reached.