browser-use: agents that browse the web
Table of contents
- Key takeaways
- What is browser-use?
- How does it control the browser?
- How do you write an agent that fills in a form?
- Which models work best?
- browser-use or the models' "computer use"?
- Frequently asked questions
- Does browser-use still use Playwright?
- Is browser-use free?
- How reliable is it on real tasks?
- Conclusion
- Sources
browser-use is an open-source Python library that lets an AI agent drive a web browser the way you do: it opens pages, reads the DOM, clicks and fills in forms. It was born on Playwright and in 2025 switched to speaking Chrome's CDP protocol directly for speed. This guide explains how it works and when to use it.
browser-use is an open-source Python library that gives an AI agent a real browser: it opens pages, reads the interactive elements, clicks, types and fills in forms to complete a task you describe in plain language. The project was born on Playwright and in 2025 made an important technical turn by dropping it to talk to Chrome directly through the CDP protocol. In this guide you will see what browser-use is, how it controls the browser, an agent that fills in a form in a handful of lines, which models get the most out of it and how it differs from the "computer use" of the big models. The same explanation is available in Spanish.
Key takeaways
- browser-use is a Python library under the MIT licence that turns a language model into an agent that drives a browser; it passes 105,000 stars on GitHub, one of the highest counts in the whole agent ecosystem.
- The current version is 0.13.4 and it requires Python 3.11 or newer. It installs with a single command:
pip install browser-use. - The project started on Playwright and in 2025 migrated to raw CDP (Chrome’s debugging protocol) to remove an intermediate network hop and speed up element extraction and screenshots.
- In its own report it claims an 89.1% success rate on the WebVoyager benchmark with GPT-4o, and it tops the Odysseys leaderboard with an 87.4% average, ahead of the computer-use agents from OpenAI, Anthropic, Google and Microsoft.
- It works with almost any model (OpenAI, Anthropic, Google, local models via Ollama) and ships its own faster
ChatBrowserUsemodel, plus an open-weight model in preview.
What is browser-use?
browser-use is a Python library that gives a language model the ability to drive a browser to complete tasks. Its tagline sums it up well: "make websites accessible for AI agents". You describe a goal in a sentence ("find the cheapest flight to Lisbon on Friday", "fill in this contact form") and the agent opens the browser, looks at the page, decides which action to take, executes it and repeats the cycle until it finishes.
The repository was created in October 2024 and has grown at an unusual pace: it passes 105,000 stars on GitHub and 11,000 forks, under the MIT licence. The library is on version 0.13.4 and needs Python 3.11 at a minimum. Behind it is a company that also offers a managed cloud and an API, but the heart of the project is open and you can run it on your own machine at no cost.
The difference from classic browser automation (the Selenium or Playwright scripts you write by hand) is that here you do not program each click. You describe the result you want and it is the model that translates that goal into a sequence of actions on the page, adapting if the site changes. That makes it a natural building block for an AI agent that needs to interact with services that only have a web interface, with no API.
How does it control the browser?
Here is the project’s most interesting technical change. In its early versions, browser-use relied on Playwright, Microsoft’s well-known automation library, to launch Chrome and run clicks and keystrokes. It worked, but the team hit a limit: Playwright adds an extra network hop, because the commands pass through a Node.js server before reaching the browser. When an agent makes thousands of calls per session, that latency adds up, and on top of that the Playwright layer hid browser details the agent needed.
So in 2025 they made a drastic decision, which they explain in their article "Closer to the Metal": drop Playwright and speak the browser’s native language directly, the Chrome DevTools Protocol (CDP). It is the same protocol Chrome’s developer tools use. By removing the middleman (today through the cdp-use package), browser-use gained speed in element extraction and screenshots, added asynchronous agent reactions and achieved support for cross-origin iframes, something that used to be a headache.
The work cycle is this: browser-use parses the page and extracts the interactive elements (buttons, links, fields), optionally with a screenshot for vision models; it passes them to the model along with the task; the model responds with the next action (click element 12, type "hello" into 7); browser-use executes it over CDP and looks at the page again. The loop repeats until the task is solved or the steps run out.
How do you write an agent that fills in a form?
Installation is a single command, with Python 3.11 or newer. The first time, browser-use downloads its own Chromium if you do not have one.
pip install browser-use
With your provider’s API key in an environment variable (for example OPENAI_API_KEY), an agent that opens a website and fills in its contact form fits in a handful of lines. Notice that the task is plain text: no CSS selectors, no coordinates, just a description of what you want.
import asyncio
from browser_use import Agent, ChatOpenAI
async def main():
agent = Agent(
task=(
"Go to https://example.com/contact, "
"fill the name with 'Ada Lovelace' and the email "
"with 'ada@example.com', write 'I want a demo' "
"in the message and click the send button."
),
llm=ChatOpenAI(model="gpt-4o"),
)
history = await agent.run()
print(history.final_result())
asyncio.run(main())
When you run it, you see the browser open, locate the fields by their label, type each value and click the button, narrating every step it takes in the console. The history object stores everything the agent did, useful for debugging or auditing. If you want to give it capabilities beyond browsing (reading a file, querying a database), you can connect it to external tools through an MCP server, the standard that is becoming the norm for giving tools to agents.
Which models work best?
browser-use is model-agnostic: you import the class for whichever provider you want (ChatOpenAI, ChatAnthropic, ChatGoogle) and pass it to the agent. It also works with local models through Ollama, if you would rather not send the content of the pages to a cloud; in that case it helps to serve the model on your own machine with enough context.
That said, not all models perform equally on this task. Driving a browser requires reasoning over structures (the DOM) and, often, vision to interpret screenshots, so large multimodal models (GPT-4o, Claude, Gemini) lead the pack. The project itself offers two shortcuts: ChatBrowserUse, a model tuned for navigation tasks that they advertise as three to five times faster than the alternatives, and an open-weight model in preview, aimed at anyone who wants to run the whole system without depending on an external API. The practical advice: start with a powerful model to validate the task, then try dropping down to a cheaper or local one, measuring the success rate.
browser-use or the models’ "computer use"?
This is the inevitable comparison. OpenAI and Anthropic offer "computer use": models that receive a screenshot of the whole computer and return clicks and keystrokes by pixel coordinates. browser-use plays in a different league: it works inside the browser and preferentially over the DOM, not over pixels.
That difference shapes the outcome. By reading the structure of the page, browser-use tends to be faster and cheaper (fewer image tokens) and more reliable at forms and navigation, because it identifies elements by their role, not by where they land on the screen. Computer use, on the other hand, is more general: it can drive any desktop application, not just websites, and it does not break when a website uses canvases or odd embeds that expose no clean DOM. If your task lives in the browser, browser-use is almost always the more efficient option; if you need to control a full desktop program, that is where computer use comes in, which we cover in detail in our guide to computer use in production.
Frequently asked questions
Does browser-use still use Playwright?
No, not any more. The early versions were built on Playwright, but in 2025 the project migrated to controlling Chrome directly with the Chrome DevTools Protocol (CDP), through the cdp-use package. The reason was performance: Playwright introduced a network hop through a Node.js server that penalised the thousands of calls in an agent session. Speaking CDP directly sped up element extraction and screenshots and added support for cross-origin iframes.
Is browser-use free?
The library is open source under the MIT licence, so you can install it and run it on your own machine at no cost. What you pay, if anything, is for the use of the language model (the OpenAI, Anthropic or Google API) or, if you prefer, nothing at all using a local model with Ollama. Separately there is a paid managed cloud from the company behind the project, aimed at running agents at scale without standing up the infrastructure yourself, but it is not needed to get started.
How reliable is it on real tasks?
In its own report, browser-use claims an 89.1% success rate on the WebVoyager benchmark with GPT-4o and leads the Odysseys leaderboard with an 87.4% average. It is worth taking these figures with caution: some independent evaluations obtain lower rates (around 72-78%) depending on the model and methodology. The practical lesson is that it works very well on well-scoped, well-described flows, and that you should always measure the success rate on your own tasks before trusting it with anything critical.
Conclusion
browser-use solves a very specific problem: giving an AI agent a real browser, without you having to program each click. Its technical history (born on Playwright and jumping to raw CDP in 2025) explains why it is fast, and its ecosystem (over 105,000 stars, MIT licence, compatible with any model) explains why it has become the entry point for so many web-agent projects. The next step is to install version 0.13.4 with pip install browser-use, write a task in plain language and watch the browser move on its own; from there, measure the success rate and decide which model suits you.
Sources
Source code
Access all the source code for this post on GitHub.
View on GitHub