Playwright Test Agents

Official Playwright Planner, Generator, and Healer agents that plan, write, and self-heal your test suite.

AgentMulti-Agent CompatibleOfficialVerified
Category
Test Automation
Author
Microsoft / Playwright
Pricing
free

Install Playwright Test Agents in your agent

npx playwright init-agents --loop=claude
  1. Add the agents

    Run this command in your Playwright project terminal.

  2. Finish setup

    Review the generated agent definitions, then restart Claude Code if it does not detect them immediately.

  3. Try it

    Ask your agent: “List the Playwright Planner, Generator, and Healer agents.

What it does

Playwright ships three official built-in AI test agents out of the box starting in v1.56: Planner, Generator, and Healer. Planner explores the app and produces a human-readable Markdown test plan of scenarios from user flows. Generator converts that Markdown plan into executable Playwright test files, verifying selectors and assertions live as it performs each scenario. Healer replays failing steps, inspects the current UI, and suggests a patch — a locator update, wait adjustment, or data fix — re-running until the test passes or guardrails stop the loop. The agents install as editable Markdown prompts plus MCP tool definitions, with no third-party dependency.

How QA teams use it

  • Run Planner against a user flow to get a reviewable Markdown test plan before any code is written.
  • Feed that plan to Generator to produce verified, executable Playwright spec files.
  • Point Healer at a failing CI run so it inspects the UI and proposes a locator, wait, or data fix, iterating until the suite passes.

Setup

Install with npx playwright init-agents, which sets up the agents as editable Markdown prompts and MCP tool definitions.

Notes

First-party Microsoft/Playwright tooling, requires Playwright v1.56 or later.

Related tools

Trusted by thousands ofengineering teams worldwide.

Add to Chrome
200+ reviews · 100k+ users
Crosscheck browser extension capture controls