Introduction
Autowright makes Playwright browser automation self-healing. You change one import line in your script; from that moment every run is invisibly observed. When the script fails — a selector broke, a page changed, a login stopped working — Autowright captures the evidence, diagnoses the failure, and hands it to an AI agent that opens a pull request with the fix.
The problem
Browser automation breaks constantly, and never because your code was wrong. Sites redesign, selectors get renamed, flows change. Every break means a human reproducing the failure, digging through logs, finding the new selector, and shipping a one-line fix. Autowright automates exactly that loop.
What you get
- Zero-rewrite integration. Your script is plain Playwright. Autowright
wraps the browser with a transparent proxy —
browser.newPage()still returns a real PlaywrightPage. - Evidence, always. Actions, screenshots, DOM snapshots, network requests, and console logs are captured on every run and bundled when something fails.
- Fixes as pull requests. A Claude-powered agent clones your repo, reasons over the captured evidence, and opens a PR you review before merging.
- Never blocked, never silent. Errors are re-thrown to your script, never
swallowed. Every failure ends in one of two visible outcomes:
- Fix proposed — a confident fix, delivered as a PR to verify against the live site.
- Needs attention — no confident fix; you get the diagnosis and the evidence bundle instead.
The three layers
┌─────────────────┐ error + ┌─────────────────┐ pending ┌─────────────────┐│ Browser Proxy │ evidence │ Service │ jobs │ Fixer ││ (your script) │ ───────────▶ │ (coordinator) │ ───────────▶ │ (AI agent) ││ │ │ │ │ ││ capture actions │ │ dedup by hash │ │ clone repo ││ classify errors │ │ track failures │ │ analyze DOM ││ bundle to S3 │ │ queue fixes │ │ open PR + Slack │└─────────────────┘ └─────────────────┘ └─────────────────┘- Browser (
@autowright/browser) lives in your script and captures everything through a JS proxy around Playwright. - Service (
@autowright/service) receives lightweight failure metadata, deduplicates repeat incidents, and queues fix jobs. - Fixer (
@autowright/fixer) runs the Claude Agent SDK in a sandbox, produces the fix, opens the PR, and notifies Slack — with the real dollar cost of every fix attached.
Read How It Works for the full data flow, or jump straight to the Quick Start.