Playwright
A browser automation framework that drives Chromium, Firefox, and WebKit with a single API for tests, scripts, and AI agents.
Quick decision
Use this profile in a stack
Open the browser workspace, search for Playwright, and add it to a saved stack or watchlist. The workspace is free, needs no sign-in, and stores stacks in your browser only.
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.
Capabilities on record
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@latestSource: https://github.com/microsoft/playwright. The example uses placeholders. Keep real credentials in your environment, not in shared configs, tickets, or repositories.
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 support with a source is listed. An absent framework is unverified by AgentsUse, not incompatible.
Health and maintenance
98,816
Checked 2026-10-29
6,734
Checked 2026-10-29
154,059,035
npm weekly downloads for the playwright package
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.
Agent tools can read data, write files, call APIs, and act through connected accounts. 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.
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
- GitHub repository: https://github.com/microsoft/playwright
- npm package: https://www.npmjs.com/package/playwright
- Documentation: https://playwright.dev
Checked 2026-10-29. Source-verified means the claims above trace to the listed sources; it does not mean AgentsUse ran the tool. Send corrections through the contact page. Back to the tools catalog.