AgentsUse

Browser Automation

Playwright

A browser automation framework that drives Chromium, Firefox, and WebKit with a single API for tests, scripts, and AI agents.

Quick decision

Best for
Teams that need one API across Chromium, Firefox, and WebKit, with a test runner and an MCP server from the same project.
Not ideal for
Work that needs a hosted browser fleet, proxies, or CAPTCHA handling out of the box. Playwright gives you the browser driver, not the infrastructure around it.
Pricing model
Open source under Apache-2.0. The library, test runner, CLI, and MCP server are free to use. Browser infrastructure and any LLM calls are separate costs you arrange yourself.
Deployment
Self-hosted library. Local browser.
Authentication
No account needed for the library. Pages you automate may need their own sign-in, and Playwright can save and reuse authentication state.
Review state
Source verified. Facts checked 2026-10-03. Not locally tested by AgentsUse.

What it does

Playwright is a framework for web automation and testing maintained by Microsoft. It drives Chromium, Firefox, and WebKit with a single API, so the same script can open pages, fill forms, and read results across the three browser engines.

For agent work, the project ships three paths: Playwright Test for end-to-end checks, a CLI aimed at coding agents, and Playwright MCP, a Model Context Protocol server that gives an LLM structured accessibility snapshots of the page instead of screenshots. Agents interact through element references, which keeps actions deterministic.

Playwright runs headless by default and supports headed execution, device emulation, network interception, screenshots, and PDF generation from the library API.

Verified capabilities

Browser control

  • Cross-browser automation Source verified

    Drive Chromium, Firefox, and WebKit with a single API.

  • Resilient locators Source verified

    Find elements by role, label, placeholder, text, or test id, mirroring how users see the page.

  • Auto-wait and web-first assertions Source verified

    Actions wait for elements to be actionable and assertions retry until conditions are met.

  • Network interception Source verified

    Route, mock, or block network requests during automation.

Data access

  • Screenshots and PDF capture Source verified

    Save page screenshots and generate PDFs from a page.

Agent integration

  • MCP server for agents Source verified

    Expose browser control to MCP clients through the @playwright/mcp package with accessibility snapshots.

Quick start

Install the library

The shortest path from the official README. The MCP server uses the same npx pattern with the @playwright/mcp package.

npm i playwright
# or start a test project:
# npm init playwright@latest

Source: https://github.com/microsoft/playwright. Examples use placeholders only. Never paste a real key into a profile, config file you share, or a ticket.

MCP support: Yes. The Playwright MCP server (@playwright/mcp) gives MCP clients browser control through accessibility snapshots. Config checked against the project README on 2026-10-03.

Works with

MCP

Official MCP server via @playwright/mcp (npx).

Packages

npm: playwright, @playwright/test, @playwright/mcp. Also published for Python, .NET, and Java.

Browsers

Chromium, Firefox, and WebKit on Linux, macOS, and Windows.

Deployment

Self-hosted library. You run the browsers.

Only sourced support is listed. A missing framework means AgentsUse has not verified it yet, not that it cannot work.

Health and maintenance

GitHub stars
97,058 (checked 2026-10-03)
GitHub forks
6,537 (checked 2026-10-03)
Package
npm: playwright, version 1.55.0
Downloads
16,927,641 weekly downloads (npm weekly downloads for the playwright package)
License
Open source, Apache-2.0
Maintainer
Microsoft

Stars and forks from the GitHub repository page; version and weekly downloads from the npm package page. Maintenance signals only, not a quality rating.

Pricing and license

Open source under Apache-2.0. The library, test runner, CLI, and MCP server are free to use. Browser infrastructure and any LLM calls are separate costs you arrange yourself.

Limitations and safety

  • You operate the browsers yourself. Scaling, proxies, and anti-bot handling are your responsibility.
  • The MCP server returns accessibility snapshots. Pages with poor accessibility markup give the agent less to work with.
  • No independently checked benchmark is published for this tool yet. The maintenance and setup facts above are source checked, but they do not measure task quality or speed.

Browser and data tools can read pages, fill forms, and download files. Start with a test account or read-only access, keep credentials in environment variables, and review agent actions before connecting anything that can spend money, send messages, or delete data.

Alternatives to Playwright

Puppeteer

Choose Puppeteer when you want a JavaScript API focused on Chrome and Firefox through the DevTools Protocol.

Tradeoff: No WebKit engine and no built-in test runner. Browser coverage is narrower than Playwright.

Browser Use

Choose Browser Use when you want an LLM-driven agent that decides clicks and typing from a task description.

Tradeoff: You give up deterministic scripts. Results depend on the model, and hosted runs need an API key.

Stagehand

Choose Stagehand when you want natural-language act, observe, and extract calls on top of browser automation.

Tradeoff: Smaller project with a different API surface. Extraction quality depends on the model you connect.

Related tools

Common questions

What does Playwright do for an AI agent?

A browser automation framework that drives Chromium, Firefox, and WebKit with a single API for tests, scripts, and AI agents.

Is Playwright open source?

Yes. This profile records the license as Apache-2.0 from the official repository.

Does Playwright support MCP?

Yes. The Playwright MCP server (@playwright/mcp) gives MCP clients browser control through accessibility snapshots. Config checked against the project README on 2026-10-03.

Sources and freshness

Last checked 2026-10-03. Verification label: source verified, which means public claims trace to the sources above. It does not mean AgentsUse ran the tool. Spotted an error? Send a correction. Back to the tools directory.