Appearance
Usage
Minimal usage example (standalone harness)
Export your API key, then call the CLI. This example uses the OpenAI backend to search Google Flights:
bash
export OPENAI_API_KEY=sk-...
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/defaultTo use Anthropic instead, swap the config file and key:
bash
export ANTHROPIC_API_KEY=sk-ant-...
python -m webwright.run.cli \
-c base.yaml -c model_claude.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_claude \
-o outputs/defaultCLI flags
| Flag | Description |
|---|---|
-c | Config file(s) from src/webwright/config/ (stackable, applied left to right) |
-t | Task instruction in natural language |
--start-url | Initial URL the browser opens |
--task-id | Name for the output subfolder |
-o | Output directory root |
Output artifacts
Each run writes to <output>/<task-id>/:
final_script.py- the complete, re-runnable Playwright script for the tasktrajectory.json- full agent trajectory with tool calls and observationsfinal_runs/run_<id>/- screenshots captured during the runraw_responses.jsonl- raw model responses (loadable in the trajectory viewer)
Usage as a Claude Code plugin
After installing the plugin and restarting Claude Code, invoke Webwright in plain English or with slash commands:
text
/webwright:run search Google Flights for flights from SEA to JFK on 2026-08-15 to 2026-08-20text
/webwright:craft search a ticket on Google Flights from LAX to SFO depart June 7 return June 14/webwright:run produces a one-shot final_script.py for the exact task values.
/webwright:craft produces a reusable parameterized CLI tool. The resulting script accepts argparse flags so you can rerun it with different values:
bash
python final_script.py --origin JFK --destination LAX --depart-date 2026-07-01Task Showcase (optional web dashboard)
To render task results in a Flask dashboard, add the task_showcase.yaml overlay:
bash
pip install flask
python -m webwright.run.cli \
-c base.yaml -c model_openai.yaml -c task_showcase.yaml \
-t "Find the cheapest direct flight from BOS to LAX next Friday" \
--task-id my_task \
-o outputs/default
python assets/task_showcase/app.py \
--tasks-dir outputs/default/my_task/task_showcase/tasksOpen http://127.0.0.1:5005 in your browser.