// PLAYWRIGHT PR AGENTS --

Keep the browser automations you already run. When one fails, Libretto investigates the live page and opens a GitHub pull request with a proposed code fix.

OpenLibretto autofix for Playwright failure

libretto-agent

wants to merge 1 commit into

main

workflows/book-appointment.ts

- await page.locator('input[name="username"]').fill(login);

+ await page.locator('input[name="login"]').fill(login);

The sign-in field is name="login", confirmed by inspecting the live page.

// ONE FAILURE CALL --

Keep your scripts. Add the repair loop.

Your existing Playwright script runs normally. The PR agent starts only after a failure, when it can investigate what changed and propose a fix.

// FAQ --

Frequently asked questions

What happens to the workflow after a failure?

The PR agent focuses on diagnosing the failure and proposing a code fix for future runs. Your existing catch, retry, fallback, and error handling remain responsible for the current run, while the agent opens a pull request when it finds a fix.

Do I need to use the Libretto runtime?

No. Add libretto-playwright-debugger to an existing Playwright project, initialize the debugger once, and call debugFailure() from the failure path. Your current runtime, browser provider, deployment, and workflow structure stay in place.

Does it work with Selenium or Puppeteer?

Not yet. The current package accepts a Playwright Page, so the failed automation must run through Playwright. Selenium and Puppeteer would require separate adapters.

Does it work with any browser or cloud browser provider?

Yes. The PR agent works with local, self-hosted, and hosted browsers as long as your automation has a live Playwright Page and keeps it open while debugFailure() runs. You do not need to use Libretto Cloud for the browser session.

Is the PR agent free?

Libretto does not charge for the PR agent. You bring your own model provider API key and browser infrastructure, so your model or browser provider may still charge for their usage.

Is it open source?

Yes. The Playwright debugger package is open source under the MIT license in the Libretto repository.