Libretto PR Agents
Automatically investigate failing Playwright tests and open pull requests with fixes
Gallery
About Libretto PR Agents
Libretto PR Agents provides automated repair capabilities for Playwright test scripts that fail due to frontend changes. When a browser automation breaks because a selector, attribute, or page structure changed, the system investigates the live page and opens a GitHub pull request proposing a code fix. This addresses a persistent pain point in end-to-end testing that every frontend team encounters: maintaining selectors and assertions as applications evolve. Frontends change constantly through regular development work, design updates, dependency upgrades, and framework migrations. Each change can break tests that were working yesterday. Instead of manually tracking down why a test broke and hunting through DOM inspector to find the new correct selector, Libretto does the detective work automatically and proposes the solution directly in your repository where you can review and merge it.
The integration approach is deliberately non-intrusive, designed to drop into existing test suites without restructuring anything. Libretto works with your existing Playwright scripts without requiring modifications to fixtures, retries, logging, or deployment structure. It doesn't wrap your tests or change how they execute. Instead, it activates only after failures occur, operating as a repair loop that responds to problems rather than a layer around your entire test suite. You add a single debugFailure() call to your error handling code, passing the Playwright Page object, and Libretto takes over from there. This incremental adoption means you can start with your most brittle tests without committing to a wholesale infrastructure change.
The debugging and repair process happens in a clear sequence that preserves your existing error handling. When a test fails, the debugFailure() function receives the live Playwright Page object while the page is still loaded. The PR agent analyzes the current page state, comparing what's actually in the DOM against what the test expected to find. If a login field's HTML attribute changed from name="username" to name="login", Libretto detects this discrepancy between the test's selector and the current page reality. It then creates a pull request suggesting the updated selector, showing exactly what changed and why. Your original error handling in the catch block still manages the current test run normally. Libretto's job is fixing the underlying code for future runs.
Infrastructure flexibility is a core design principle that keeps you in control of where and how tests run. Libretto works with local browsers running on developer machines, self-hosted environments like Selenium Grid or Moon, and hosted cloud providers like BrowserStack or Sauce Labs. The only requirement during debugFailure() execution is a live Playwright Page object. There's no dependency on Libretto Cloud for browser sessions or test execution. You bring your own browser infrastructure, keeping your test execution environment exactly as you've configured it, with whatever security, network, and performance characteristics your organization requires. This also means there's no vendor lock-in on the infrastructure side.
The system uses a bring-your-own-model approach for the AI analysis that powers fix suggestions. You supply your own LLM provider API key, whether that's OpenAI, Anthropic, or another supported provider. This keeps costs transparent and controllable because you see exactly what you're spending on your model provider's dashboard. There's no opaque pricing based on test complexity, analysis time, or number of fixes generated. This transparency extends to the codebase itself. Libretto is open source under the MIT license, available on GitHub. You can inspect exactly how it analyzes pages, generates fix suggestions, and creates pull requests.
Current limitations are worth knowing before adopting Libretto for your test suite. The tool supports Playwright exclusively right now, which covers a large portion of modern browser automation but not everything. Selenium and Puppeteer compatibility is under investigation according to the team, but not yet available. For teams standardized on Playwright this isn't a limitation at all, but organizations with mixed testing frameworks would need to use Libretto selectively. The project maintains active community channels through GitHub discussions and a Discord server where you can ask questions, report issues, and see what other teams are doing.
The cost model is straightforward and unusual for a developer tool of this capability. Libretto itself is free to use with no subscription, no per-test pricing, and no hidden fees. Your expenses come entirely from third parties: your model provider charges for analysis based on their token pricing, and your browser infrastructure charges whatever you're already paying for test execution. For teams spending significant engineering hours maintaining flaky Playwright tests, particularly those with rapidly evolving frontends where selectors change frequently, the automation can reclaim substantial time that would otherwise go toward repetitive manual selector maintenance.
Key Features
- Automatic failure investigation on live pages
- GitHub pull request generation with fixes
- Works with existing Playwright setup
- Bring-your-own LLM provider keys
- Local and cloud browser support
- Open source Playwright debugger under MIT
Pros & Cons
What we like
- Automates the full loop from failure to fix PR
- No changes required to existing test fixtures or retries
- Works with any browser provider, local or cloud
- Open source core package under MIT license
Room for improvement
- Playwright only, no Selenium or Puppeteer yet
- LLM provider and browser infrastructure costs are yours
- Proposed fixes still need human review
- Newer product with smaller community
Frequently Asked Questions
What is Libretto PR Agents?
Is Libretto PR Agents free?
Does it work with Selenium or Puppeteer?
Does it change my existing test setup?
Best For
Featured in
Alternatives to Libretto PR Agents
View allPlaywright
Microsofts open-source end-to-end browser testing framework for Chromium, Firefox, and WebKit with one API.

Buildkite
Hybrid CI/CD where the control plane is hosted but the build agents run on your own infrastructure.
Storybook
Open-source workshop for building UI components in isolation. Preview, document, and test them outside the app.

Postman
API client and collaboration platform that started as a Chrome extension and now covers design, testing, and mocking.
Reviews (11)
Genuinely impressed
Libretto PR Agents solves a real problem for me without making a fuss about it. The core workflow is smooth once you are set up. Easy yes for anyone weighing the same trade offs.
Exactly what I needed
Hadn't planned on switching, but Libretto PR Agents was hard to ignore. Got real value out of open source core package under mit license. The interface stays out of my way, which I appreciate. Found it works best for fixing broken playwright selectors after ui changes.
Recommended without reservation
Libretto PR Agents solves a real problem for me without making a fuss about it. Where it really wins is no changes required to existing test fixtures or retries. The core workflow is smooth once you are set up. Hard to imagine going back to my old setup.
Solid daily driver
Came to Libretto PR Agents after getting frustrated with what I had before. Their take on works with any browser provider, local or cloud is genuinely good. Hard to imagine going back to my old setup.
Genuinely impressed
Libretto PR Agents solves a real problem for me without making a fuss about it. Where it really wins is automates the full loop from failure to fix pr.
Pulled its weight from week one
Picked Libretto PR Agents for the price, stayed for the quality. It just works, day after day, without surprises. It earns its place in my stack.
Two months in, no regrets
Libretto PR Agents has quietly become part of my daily flow. Got real value out of open source core package under mit license. Found it works best for keeping large test suites current with evolving uis.
Recommended without reservation
Hadn't planned on switching, but Libretto PR Agents was hard to ignore. The local and cloud browser support is more useful than I expected. Found it works best for automating test maintenance for qa teams. Recommending it to people in a similar spot.
Genuinely impressed
Three months of Libretto PR Agents later, here is what holds up. The github pull request generation with fixes is more useful than I expected. Would sign up again without thinking twice.
Exactly what I needed
Started using Libretto PR Agents casually, now it is pinned in my dock. It has shaved real time off my week. Found it works best for reducing manual triage time on test failures. Hard to imagine going back to my old setup.
Worth a look
Picked Libretto PR Agents for the price, stayed for the quality. Their take on local and cloud browser support is genuinely good. The defaults are sensible, so I was not fighting settings on day one. It earns its place in my stack.
Badge builder
Add Libretto PR Agents to your website
Choose a badge style and size, preview it here, then copy the generated HTML. Badge images are self-contained SVGs and do not require an external script.
<a href="https://toolindex.net/tools/libretto-pr-agents?ref=badge" target="_blank" rel="noopener">
<img src="https://toolindex.net/badge/libretto-pr-agents/medium.svg" alt="Libretto PR Agents - Listed on Tool Index" width="180" height="50" />
</a> How to use the badge
- 1. Pick the style, size, and theme that fit your layout.
- 2. Copy the generated HTML from the code block.
- 3. Paste it into your footer, homepage, or press page.
Score badge available
Libretto PR Agents qualifies for the score and circle badges based on its current top-10 positionin Testing.
Badge clicks return visitors to this profile with a referral tag so the source remains identifiable.
Related Tools
DeviceKit
Free Screen & Device Tests Online | Private Browser Diagnostics

Chromatic
Visual regression testing and review platform built by the Storybook team, with cloud-rendered snapshots and PR integration.
Playwright
Microsofts open-source end-to-end browser testing framework for Chromium, Firefox, and WebKit with one API.

Tests.ws
WebSocket testing tools, protocol guides, and a Chrome extension for developers
Work on Libretto PR Agents? Request listing access or correction