May 30, 2026 · 13 min read

Microsoft Webwright vs Browser Use vs Human Browser

Three browser windows on pedestals — Webwright vs Browser Use vs Human Browser illustration

What Microsoft Webwright Actually Is

Microsoft Webwright is a research project from Microsoft that turns browser automation into a code-generation problem. Instead of choosing from a fixed set of high-level actions (click, type, wait_for, etc.), the LLM writes raw Playwright Python code on every step.

The repo is on github.com/microsoft/Webwright and, as of 2026, it has a few thousand stars and a fast-moving community kicking the tires. It’s not a product; it’s a research-grade toolkit that explores a different way to do browser agents: “code-as-action.”

Why Webwright Exists: The Element Instability Problem

Classic browser agents using structured actions usually bind to DOM elements via IDs like backend_node_id or other internal handles exposed by Chrome DevTools. These IDs are unstable:

Webwright sidesteps that. Instead of saying “click element 42,” the LLM writes Playwright selectors using the same strategies humans do:

Because the agent is literally writing code per step, it can adapt to markup changes at runtime. That’s the core innovation: let the model do what developers do when the DOM changes instead of freezing behaviour into a brittle set of pre-defined actions and opaque node IDs.

Webwright in the Browser-Agent Landscape

Webwright doesn’t live in a vacuum. It sits next to two other patterns that engineers are using in 2026:

If you’re not fully up to speed on browser agents in general, the high-level patterns are covered in more detail in this deep dive on AI-agent browser automation.

Three abstract logos on a triangle — Webwright, Browser Use, Human Browser
Microsoft built Webwright for the AzureML demo. Production is a different sport.

Architecture: Webwright vs Browser Use vs Human Browser

All three systems automate a real Chromium instance. The difference is:

AspectMicrosoft WebwrightBrowser UseHuman Browser
Action modelLLM writes Playwright Python code per step (code-as-action).LLM chooses from a predefined structured action set.LLM / API tasks mapped to internal actions on managed browsers.
Execution environmentYour infra; runs vanilla Playwright locally or in your cloud.Your infra; typical local or server Playwright/Chrome setup.Remote managed cloud; you hit an API (A2A endpoint).
Stealth / anti-botNo built-in stealth; standard Playwright fingerprint.Some community patterns; still standard browser fingerprint.Stealth-hardened Playwright + residential proxies across 75 countries.
CAPTCHANo solving; you handle it manually or give up.No native solving; you integrate a solver.Built-in solving at $0.005 per CAPTCHA.
Multi-session orchestrationYou write your own job queue & process manager.You build orchestration on top of the lib.First-class multi-tab, multi-session orchestration via API.
Best fitResearch, internal tools, agent pattern exploration.LLM-driven automations needing predictable structured output.Production workloads that must survive real-world defenses.

Microsoft Webwright Architecture

Webwright is essentially a loop:

  1. Navigate page.
  2. Summarize state + relevant DOM snippets.
  3. Feed that into an LLM prompt.
  4. LLM returns a chunk of Python code using the Playwright API.
  5. Execute the code in a sandbox, capture outcome.
  6. Repeat until the task is done or an error occurs.

Critical details:

You’re getting something close to an AI pair-programmer that writes incremental Playwright scripts rather than a bot picking from a finite menu.

Browser Use Architecture

Browser Use takes the “action schema” route. The model never writes arbitrary code, it chooses actions:

Pros:

Cons:

Human Browser Architecture

Human Browser exposes an API that runs headless browsers for you. Under the hood:

You don’t ship Chrome or Playwright yourself. You hit the API, pass a task description or structured steps, and Human Browser executes it remotely. Pricing is pay-as-you-go: $0.10/hr browser time, $4/GB residential proxy, $0.005 per CAPTCHA solved, and $0.02 per agent step with the AI included. No subscription and unused balance never expires. The homepage has details: Human Browser — pay as you go, no subscription.

From a developer’s perspective, the main decision is: “Do I own and operate the browsers, or do I call out to a managed system?”

What Webwright Gets Right

For engineers, Webwright has some genuinely nice properties.

1. Code-as-Action Matches How Devs Think

If you write Playwright by hand, Webwright is effectively automating the part where you tinker with selectors and small control-flow tweaks. For example:

These are natural in Python but painful to express in a rigid action schema. Code generation lets the model use the full expressiveness of the underlying automation library.

2. Robustness to DOM Churn

By not depending on opaque DevTools node IDs, Webwright can adapt when markup changes. It can inspect the DOM, choose different selectors, and keep going. In practice you still hit edge cases, but you’re closer to how humans debug front-end breakage.

3. Great for Research and Prototyping

The project is tailor-made for researchers exploring:

You can plug in different models, shaping how verbose or conservative their code is, and measure behaviour. For prototyping new ideas, it’s much faster than re-compiling action schemas.

Where Webwright Hurts in Production

None of this means Webwright is ready to run a gray-area scraping operation or a high-volume B2B integration on the open internet. There are some structural limitations for production use.

No Built-In Stealth or Anti-Bot Handling

Out of the box, Webwright runs on vanilla Playwright. Large sites instrument a long list of signals to spot automation:

Cloudflare, PerimeterX, and similar services flag naive Playwright setups quickly. You can bolt on stealth plugins, proxies, and other mitigations, but you’ll be hand-rolling infrastructure that a managed platform already gives you.

No CAPTCHA Solving or HITL

CAPTCHAs are a fact of life. Webwright itself doesn’t know what to do when the page is a ReCAPTCHA puzzle. You’d have to:

If the site escalates to more sophisticated challenges, you might need a real human in the loop. Webwright doesn’t ship any of this out of the box.

No Multi-Session Orchestration

Need 500 parallel sessions running tasks with retries, per-IP quotas, and backoff behaviour? That’s on you. With Webwright (and Browser Use), you’re operating the fleet:

It’s fine for small internal tooling; it becomes a serious engineering project at scale.

When Webwright Is the Right Pick

You don’t use a research toolkit as a drop-in replacement for hardened production infra. Webwright shines in specific scenarios.

1. Research and Agent Design Experiments

If you’re working on new architectures for web agents, Webwright gives you a clear playground:

It’s ideal for papers, internal prototypes, and benchmarks.

2. Controlled Internal Tools

On intranet apps, admin panels, or QA staging environments, you don’t care about stealth or CAPTCHAs. What you want:

Webwright is a good match: internal domains are stable, defenses are minimal, and you control both ends.

3. Prototyping Agent Patterns Before Hardening

Code-as-action lets you sketch behaviours quickly. Once you know what works:

This “explore with Webwright, stabilize elsewhere” pattern is pragmatic and keeps research and production concerns cleanly separated.

Desk setup with headset and monitor — an agent driving a browser

When Browser Use Wins

Browser Use trades some flexibility for guardrails and a more mature ecosystem.

Structured Output and Easier Observability

Because the LLM must choose from a fixed action schema, you get structured logs automatically:

For production LLM agents plugged into backends, structured actions are often easier to manage than free-form code.

Ecosystem and Community Patterns

Browser Use has an ecosystem of recipes and example flows. Webwright is still early; you’ll write more from scratch:

That doesn’t mean Browser Use is a managed platform; it still runs on your infra and inherits the same stealth/anti-bot challenges as any other self-hosted Playwright solution. But for teams that want a “batteries-included” developer library instead of a research kit, it’s more approachable.

When You Need Managed & Stealth: Human Browser

If your workflows hit real-world websites with active anti-bot systems, you eventually confront the operational overhead Webwright and Browser Use push onto you:

Human Browser is explicitly designed to take that off your plate. Pricing is transparent and pay-as-you-go: $0.10 per hour of browser time, $4 per GB of residential proxy bandwidth, $0.005 per CAPTCHA, and $0.02 per agent step with the AI included. You can try it for $1, and there’s no subscription; unused balance doesn’t expire.

For tasks where uptime and success rates matter more than fine-grained control over Playwright code, you:

For a broader review of where managed browser APIs make sense compared to self-hosted stacks, see the breakdown in this browser automation API guide.

Try It Yourself: Minimal Examples

Let’s look at realistic, minimal snippets for all three approaches using Node.js for Browser Use and Human Browser, and Python for the Microsoft Webwright style.

1. Microsoft Webwright-Style Loop (Python + Playwright)

This is not a full recreation of Webwright, but it captures the core loop: summarize page state, ask an LLM for the next chunk of Playwright code, execute it.

import asyncio
import json
from playwright.async_api import async_playwright
import openai  # or your preferred LLM client

openai.api_key = "YOUR_API_KEY"

SYSTEM_PROMPT = """
You are a Python assistant that controls a web browser using Playwright.
You can only use the provided `page` object. Write one async function
`async def step(page): ...` that performs the NEXT small step toward the
goal and then returns.

Constraints:
- Do not import modules.
- Do not access the filesystem or network directly.
- Use robust selectors (get_by_role, get_by_text, etc.).
""".strip()

async def llm_next_step(goal: str, obs: str) -> str:
    messages = [
        {"role": "system", "content": SYSTEM_PROMPT},
        {"role": "user", "content": json.dumps({
            "goal": goal,
            "observation": obs,
        })},
    ]
    resp = openai.ChatCompletion.create(
        model="gpt-4.1-mini",
        messages=messages,
        temperature=0.2,
    )
    return resp["choices"][0]["message"]["content"]

async def main():
    goal = "Search for 'microsoft webwright github' and open the repo."

    async with async_playwright() as p:
        browser = await p.chromium.launch(headless=False)
        page = await browser.new_page()
        await page.goto("https://www.bing.com")

        for i in range(10):  # max 10 steps
            # Simple observation: URL and title; in Webwright you'd add DOM excerpts
            obs = json.dumps({
                "url": page.url,
                "title": await page.title(),
            })

            code = await llm_next_step(goal, obs)
            print(f"\n[step {i}] LLM code:\n{code}\n")

            # Execute the generated `step(page)` in a restricted namespace
            local_ns = {}
            try:
                exec(code, {"__builtins__": {}}, local_ns)
                step_fn = local_ns.get("step")
                if not step_fn:
                    raise RuntimeError("LLM did not define step(page)")
                await step_fn(page)
            except Exception as e:
                print("Execution error:", e)
                break

        await browser.close()

if __name__ == "__main__":
    asyncio.run(main())

This is roughly what Microsoft Webwright formalizes and hardens: the contract between page state, prompt, generated code, and the sandbox executor.

2. Browser Use Example (Node.js)

Browser Use hides most of the browser wiring and gives you a “browser agent” driven by structured actions. Actual APIs may change, but conceptually it looks like this:

import { BrowserUse } from "browser-use";

async function run() {
  const agent = await BrowserUse.launch({ headless: true });

  const result = await agent.run({
    goal: "Open the Microsoft Webwright GitHub repo and read the README header.",
    maxSteps: 12,
  });

  console.log("Final result:", result.summary);
  await agent.close();
}

run().catch(console.error);

Under the hood, the LLM picks from an action set; you get structured logs for every step rather than arbitrary code snippets.

3. Human Browser A2A Example (Node.js)

With Human Browser, you don’t launch Chromium yourself. You send a JSON task to the A2A endpoint and let the platform handle navigation, stealth, and CAPTCHAs.

import fetch from "node-fetch";

const API_URL = "https://agent.humanbrowser.cloud/a2a";
const API_KEY = process.env.HUMAN_BROWSER_API_KEY;

async function main() {
  const task = {
    goal: "Open the Microsoft Webwright GitHub repo and return the README title.",
    steps: [
      {
        type: "navigate",
        url: "https://github.com/microsoft/Webwright",
      },
      {
        type: "extract",
        selector: "article.markdown-body h1, article.markdown-body h2",
        label: "readme_title",
      },
    ],
  };

  const resp = await fetch(API_URL, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${API_KEY}`,
    },
    body: JSON.stringify(task),
  });

  if (!resp.ok) {
    console.error("Request failed", resp.status, await resp.text());
    return;
  }

  const data = await resp.json();
  console.log("Task result:", data.outputs.readme_title);
}

main().catch(console.error);

This moves you from “host and protect browsers yourself” to “treat browsers as an API.” Install instructions and SDKs are at /install, and cost breakdowns are on /pricing.

How to Choose for 2026 Projects

Given the tradeoffs, the choice is usually straightforward:

If you’re designing an agent-heavy system from scratch, it’s worth spending time understanding how these browser agents behave in the wild. The broader patterns and pitfalls are covered in the open-claw style analysis at /blog/ai-agent-browser-automation-openclaw.

Frequently asked questions

What is Microsoft Webwright?

Microsoft Webwright is a research project where an LLM writes Playwright Python code step-by-step to control a browser instead of choosing from a fixed action list.

How is Webwright different from Browser Use?

Webwright lets the model generate raw Playwright code per step, while Browser Use forces the model to pick from a predefined structured action set, making behaviour easier to validate.

Is Microsoft Webwright production-ready for large-scale scraping?

Not by itself. It lacks built-in stealth, CAPTCHA solving, and multi-session orchestration, so you must engineer that infrastructure if you want to run it at scale on the open web.

When should I use a managed browser API like Human Browser?

Use Human Browser when you need stealth-hardened browsers, residential proxies across many countries, automatic CAPTCHA solving, and managed orchestration instead of running Playwright clusters yourself.

Can I combine Webwright with Human Browser?

Yes. You can prototype agent logic with Webwright locally, then move stable flows to Human Browser by calling its A2A API so production workloads benefit from managed browsers and stealth.

Top up — $20

Loading secure checkout…

More coins →