curiosityos/betterwright — explained in plain English
Analysis updated 2026-05-18
Give a coding agent a persistent browser session that survives across turns
Cut token usage on browser automation tasks with compressed page snapshots
Let an agent log into a site without ever seeing the raw password
Automate a multi-step browser flow like a login, cart, and checkout
| curiosityos/betterwright | adindazu/fextractor | anonymousraid/osint-mapping-tool | |
|---|---|---|---|
| Stars | 15 | 15 | 15 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | moderate | hard | easy |
| Complexity | 3/5 | 1/5 | 2/5 |
| Audience | developer | general | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires Node.js 22+ and a one-time ~200MB browser download during setup.
BetterWright is a browser tool built specifically for AI agents rather than for human developers writing test scripts. It wraps Playwright, the browser automation library, but changes how the agent sees each page so that every observation costs as few tokens as possible, since burning thousands of tokens on a raw HTML dump or a full accessibility tree is one of the main ways an agent's context window runs out. Instead of returning the whole page every time, BetterWright returns a compressed, distilled view of what is on screen, with short reference markers the agent can act on directly. After an action, it can return just what changed rather than the full page again, and it keeps one browser session alive across many turns so the agent does not have to log back in or navigate back to where it was. The README reports a benchmark where this approach solved 14 of 15 tasks correctly against 12 of 15 for a comparable setup, while using noticeably fewer turns to reach the same answer. Other pieces round out the tool. An encrypted credential vault fills in login forms without ever putting the actual password into the conversation the model sees. A network policy layer checks every outgoing request and always blocks requests to cloud metadata endpoints, a common target in security exploits. It can take tagged proof screenshots the agent can point to as evidence a task was completed, and it includes local solvers for common CAPTCHA types like checkboxes and sliders, handing harder image based CAPTCHAs off to the agent's own vision. It installs as an npm package on Node.js 22 or newer, downloads its own browser on first setup, and can be wired into Claude Code, Codex, or any MCP compatible agent with a single command, or driven directly through its own JavaScript API for custom integrations.
A persistent, token-efficient browser toolkit built for AI agents, with compressed page snapshots, an encrypted credential vault, and CAPTCHA solving.
Mainly JavaScript. The stack also includes JavaScript, Node.js, Playwright.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.