Webwright Browser Coding Agent
Turn coding models into browser agents that solve and preserve long-horizon web tasks as rerunnable Python.
The README makes the principal flows among the browser, terminal, local workspace, screenshots, logs, trajectories, and model backends reasonably visible, and retained artifacts support inspection. Credits, citation metadata, the MIT copyright notice, and verified Microsoft organization provenance provide strong source attribution. Deductions apply because free-form Playwright scripts have broad web-action authority without demonstrated domain- or action-level least-privilege controls; ordinary runs show no general confirmation gate before submissions, purchases, messages, or account changes, apart from narrower Skill Factory assume-yes and draft-review behavior; API keys are merely supplied through environment variables, with no demonstrated redaction, log filtering, retention policy, or secret-leak controls; dependencies use open-ended minimum versions with no lockfile, vulnerability scan, or update policy shown; and external-effect, undo, and recovery semantics are not systematically defined. Saved scripts and artifacts provide auditability and reruns, but only limited rollback.
Architecture, commands, configuration, and artifact descriptions are broadly consistent. Tests explicitly pin README configuration keys to implementation behavior and cover precedence, resume detection, CLI compatibility, and non-clobbering, providing solid self-consistency evidence. Dependencies are common public Python packages and the Python/Chromium prerequisites are documented, but versions are not locked and browsers, live sites, and model APIs remain external runtime dependencies. Tests demonstrate useful handling for missing substitutions, empty invocation, invalid specifications, existing files, and selected failure paths, but the supplied suite is concentrated on Skill Factory rather than the core browser loop, so failure-message coverage is not thorough.
The material clearly supports a standalone CLI plus Claude Code, Codex, OpenClaw, and Hermes, and distinguishes one-shot scripts, parameterized tools, Task Showcase, and Skill Factory workflows; audience and scenario coverage is therefore strong. It states architectural exclusions such as no multi-agent system, graph engine, plugin layer, or hidden orchestration and identifies browser, backend, and host differences. It does not adequately define boundaries for authentication, CAPTCHAs, downloads, payments, restricted sites, or hazardous write actions. Natural-language activation, explicit commands, and stacked configuration are documented, but automatic activation is broadly described without false-trigger or conflict-resolution rules. Python 3.10+, Playwright Chromium, three model backends, and multiple host-specific installation paths provide strong environment-fit evidence.
The README has a clear project map, quick start, flag table, host installation guides, usage examples, trajectory viewer, and focused feature sections, earning strong information-architecture and installation scores. Package, CLI, configuration, and command names are coherent, with tests guarding documentation drift, although the project remains at version 0.1.0 and invocation conventions differ among hosts. Examples are plentiful and several caveats are documented, including conditional report generation, restart requirements, inert Hermes subcommands, and run variability, but there is no standalone FAQ or comprehensive limitations section. The complete MIT license earns full credit. Dated News entries serve as a useful lightweight history, but no formal changelog, compatibility policy, release process, or migration guidance is shown. Microsoft organization provenance, copyright, and a security-reporting route clarify ownership and escalation in part, while named maintainers, support commitments, and response timelines are absent.
Runs produce reusable Python scripts, trajectories, screenshots, and optional structured reports, while Skill Factory adds parameterized CLI entry points and discoverable help; these are directly usable outputs. Code-as-action, reusable skills, and multi-host integration present credible marginal value over step-by-step browser control, but the strongest performance benefits are repository claims and the supplied files contain neither complete benchmark artifacts nor core end-to-end tests. Cost-benefit evidence includes token comparisons, an asserted roughly 40-second zero-token reuse path, and reduced-step claims, with an explicit warning that runs vary. It does not quantify total model spend, browser resources, review burden, or tradeoffs across broad production scenarios, so the evidence is adequate rather than comprehensive.
Performance claims identify benchmarks, task counts, models, step budgets, and comparison points and refer readers to a blog; structural and Skill Factory claims are traceable to named repository paths and tests. However, the supplied material omits the blog contents, raw results, evaluation scripts, and most core implementation, so SOTA and accuracy claims cannot be closed-loop verified in this static review. The README, pyproject, license, workflow, and tests corroborate installation, naming, configuration, and selected Skill Factory behavior, but performance evidence remains largely first-party and single-source. Facts, design opinions, and promotional conclusions are often separated by section and wording, and variability is acknowledged, yet strong terms such as “verified” and “state-of-the-art” are not accompanied here by criterion-level reproducibility material.
- Webwright lets a model generate and execute free-form Playwright code. Add domain allowlists, action restrictions, and human confirmation before commits when using real accounts or performing payments, publishing, messaging, or deletion.
- Do not treat trajectories and screenshots as a security boundary: they may contain page content, account details, or other sensitive data. Restrict access, define retention, and verify log redaction.
- Dependencies have minimum-version constraints without a demonstrated lockfile or vulnerability scan; pin and audit Python and browser dependencies before deployment.
- The README's SOTA, accuracy, and zero-token reuse figures are not independently substantiated by raw evaluation material included in this prompt.
- This assessment is limited to the supplied static files; no agent, browser, test suite, or benchmark was executed.
What does this agent do, and when should you use it?
Webwright is a lightweight browser-agent framework in which a model writes, executes, and repairs Playwright Python instead of predicting one click or screen coordinate at a time. Its concrete pieces include the agent loop in `agents/default.py`, a Playwright browser environment, OpenAI/Anthropic/OpenRouter backends, a Typer CLI, and the `image_qa` and `self_reflection` tools. Browser sessions are disposable; durable state lives in the local workspace as code, logs, trajectories, and screenshots. Each task is driven toward a rerunnable `final_script.py`, while the optional Task Showcase configuration can also emit `task.json` and structured `report.json` output. Skill Factory can distill successful scripts into parameterized programs that pass an input gate and standalone replay verification before reuse. It is a fit for teams that can supply Python, Chromium, network and filesystem access, and model credentials, and that value inspectable automation over a hosted no-code experience.
A user submits a task, start URL, configuration files, and output directory through python -m webwright.run.cli. The loop in agents/default.py follows a flat prompt-observe-execute-script cycle: the model creates Python in a terminal workspace, the environment starts one or more Playwright/Chromium sessions, and the script queries elements, waits for conditions, fills forms, or traverses multi-page workflows. When execution fails, the agent inspects saved logs, page states, or screenshots and repairs the program until it has a rerunnable final script. A normal run writes trajectory.json and debugging artifacts; adding task_showcase.yaml also produces task.json and report.json. The webwright.skill_factory commands and components—recommend, route, learn, build, and update—reuse, distill, and regression-check prior programs. The repository also supplies plugin or skill paths for Claude Code, Codex, OpenClaw, and Hermes Agent, plus a browser-based viewer for comparing Webwright, Codex, and GitHub Copilot trajectories.
- An automation engineer needs to turn a multi-page search, filtering, form-filling, or collection workflow into a repeatable Playwright Python program.
- A browser-agent research team wants to test a code-as-action approach on long-horizon suites such as Online-Mind2Web or Odysseys and inspect complete trajectories and screenshots.
- A Claude Code or Codex user wants the existing coding agent to operate websites through a documented plugin instead of adding a separate multi-agent orchestrator.
- An operations or data team repeatedly checks deals, inventory, listings, job boards, or weather and wants Task Showcase to render structured results in a small dashboard.
- A team with recurring site workflows wants Skill Factory to convert verified successful runs into parameterized CLI programs that can later execute without a model.
- A framework developer wants a browser-agent starting point whose core loop, browser environment, backends, and CLI are small enough to read and modify directly.
What are this agent's strengths and limitations?
- Code is the action and the durable artifact: the completed browsing history is a Python program that can be reviewed, edited, shared, and rerun without preserving the original browser session.
- The architecture is deliberately inspectable: the source describes an approximately 450-line core loop, 570-line browser environment, and 150-line CLI without a graph engine or hidden orchestration.
- The standalone harness supports OpenAI, Anthropic, and OpenRouter, while the shared skill is explicitly integrated with Claude Code, Codex, OpenClaw, and Hermes Agent.
- Runs persist trajectories, screenshots, and logs to disk, giving adopters concrete material for debugging failures and comparing execution harnesses.
- Skill Factory turns solved work into parameterized programs with both an input gate and standalone replay verification; the reported WebArena experiment improved held-out accuracy from 55% to 70% with reuse.
- The source reports 86.7% on Online-Mind2Web and 60.1% on Odysseys under a 100-step budget, providing specific evidence for long-horizon performance.
- Self-hosting requires Python 3.10+, Playwright, Chromium, network access, and a writable workspace, creating runtime and browser-maintenance overhead.
- Standalone harness runs require credentials for the chosen model backend and incur that provider's usage cost; only the host-plugin path claims no extra key or model cost beyond the host subscription.
- Generated programs depend on live sites and their dynamic behavior. Waiting and repair logic can improve resilience, but a site redesign may still break an existing workflow.
- Structured
report.jsonoutput is not produced by a default run: adopters must explicitly addtask_showcase.yaml, and the accompanying dashboard separately requires Flask. - The performance figures apply to named models, datasets, and step budgets and do not establish equivalent reliability on every website, permission boundary, or business workflow.
- The framework intentionally omits multi-agent orchestration and graph engines, so teams requiring distributed scheduling, approval flows, or enterprise workflow governance must build those layers themselves.
How do you install or deploy this agent?
The standalone framework requires Python 3.10+, filesystem and network access, Playwright Chromium, and an API key for the selected backend. From the repository root, run:
pip install -e .
playwright install chromiumSet OPENAI_API_KEY when using model_openai.yaml, or ANTHROPIC_API_KEY when using model_claude.yaml. An OpenRouter backend is listed, but the supplied quick start does not name its credential variable. For Claude Code, run /plugin marketplace add microsoft/Webwright, then /plugin install webwright@webwright, and restart the session. For Codex CLI, run codex plugin marketplace add microsoft/Webwright, launch codex, install Webwright through /plugins, and restart Codex.
How do you use this agent?
A first OpenAI-backed invocation is:
python -m webwright.run.cli \
-c base.yaml -c model_openai.yaml \
-t "Search for flights from SEA to JFK on 2026-08-15 to 2026-08-20" \
--start-url https://www.google.com/flights \
--task-id demo_openai \
-o outputs/default-c stacks configuration files from src/webwright/config/; -t supplies the task, --start-url chooses the initial page, --task-id names the output subdirectory, and -o sets the output root. Add -c task_showcase.yaml when renderer-ready structured output is required, then serve it with python assets/task_showcase/app.py --tasks-dir outputs/default/<run>/task_showcase/tasks. In Claude Code, /webwright:run <task> produces a one-shot script, while /webwright:craft <task> creates a reusable CLI with argparse parameters. In a new Codex thread, invoke the bundled skill with @webwright <task>.
How does this agent compare with similar options?
Unlike Stagehand, which offers a hybrid of code and natural-language primitives such as act and extract, Webwright lets the model write free-form Playwright Python. Unlike Vercel's agent-browser, it does not center the workflow on one open, click, or snapshot subprocess call per micro-step. Unlike browser-use and its repeated DOM/AX observation followed by indexed actions, Webwright treats local code, screenshots, and logs as state and allows browser sessions to be discarded. The README also reports benchmark comparisons: on Odysseys, GPT-5.4 with Webwright scored 60.1%, versus the listed Opus 4.6 vision/persistent-browser result of 44.5% and a base GPT-5.4 coordinate-prediction result of 33.5%; those figures are limited to the stated evaluation setup.
FAQ
Is OpenAI required?
image_qa and self_reflection by default and does not require an OpenAI key.Does every run produce a structured report?
base.yaml run produces trajectory.json and debugging artifacts but not report.json. Stack task_showcase.yaml to generate the task and report files consumed by the dashboard.