BetterWright/betterwright
A persistent, policy-guarded Playwright browser for AI agents — network policy, encrypted credential vault, proof screenshots, and CAPTCHA solving.
What it solves
BetterWright provides AI agents with a persistent, controllable browser environment. It solves the problem of agents needing to start a new browser session every time they perform a task, allowing them to maintain state, navigate pages, and interact with the web across multiple calls.
How it works
It uses a managed browser runtime (BetterChromium) based on Playwright JavaScript. The system operates as a background daemon that keeps tabs and page state alive between CLI calls. It can be integrated into existing agents via a CLI, an MCP (Model Context Protocol) server, or a JavaScript/TypeScript SDK. It also includes a built-in agent that can execute natural-language tasks using configured local or API-based models.
Who it’s for
Developers building AI agents that require web navigation, data extraction, and interaction with websites, as well as users who want to run a browser-controlling agent locally via a CLI.
Highlights
- Persistent Sessions: Maintains tabs and cookies across calls using named sessions and profiles.
- Flexible Integration: Supports CLI, MCP server, and SDK for easy addition of browser access to existing agents.
- Cerebras and Local AI Support: Built-in harness supports local models (via GPU acceleration) and Cerebras API.
- Human Handoff: Allows a person to take over the browser session to handle steps like MFA (Multi-Factor Authentication).
- Compact Observations: Provides optimized page snapshots, screenshots, and diffs to reduce the amount of data the agent observes.
- Credential Management: Includes a trusted vault for encrypted credential filling and redaction.
Related
- Project
- Project
- Project
- Project