HeadlinesBriefing favicon HeadlinesBriefing.com

Webwright: AI Web Agents Should Write Code, Not Click

Towards Data Science •
×

For years, web agents have worked one click at a time—and often fallen apart on long tasks. Whether they work from screenshots, DOM elements, or fixed action menus, four costs return: brittle actions, per-step price, stale page state, and no reusable tool at the end. On long-horizon tasks, agents like OpenAI's Operator and Anthropic's Computer Use still take one action, wait to see what happens, then decide again. When the task is over, nothing reusable remains.

Webwright, a browser-agent framework from Microsoft Research and the University of Hong Kong, makes a different bet: give the model a terminal and let it write the program instead. Its tagline: "A terminal is all you need for web agents." Instead of predicting clicks, agents write and run bash and Playwright scripts to open browsers, inspect pages, and carry out the task.

The results stand out. The same GPT-5.4 model jumps from 33.5% to 60.1% success on long-horizon tasks. Instead of leaving behind a click trace, it leaves a program engineers can inspect, rerun, modify, and reuse. The framework is roughly 1,000 lines of code and performs well on benchmarks while addressing cost and reliability.