What are browser agents in AI coding?
By Flavio
Browser agents open pages and use controls to test web apps. Learn how coding tools connect to a browser, what to ask them to check, and common pitfalls.
Browser agents use a browser to carry out a task, reading pages and interacting with links, buttons, and forms. In AI coding, that gives the agent a way to try the application it just changed.
For the browser engine side, read Kitesurf: Cloudflare’s browser built for AI agents. This entry explains the agent’s job around the browser.
How browser agents work
The model chooses an action through tool calling. The browser runs it, then returns information about the resulting page. The agent uses that result to decide what to do next.
A screenshot helps with layout. Checking whether a saved setting survives a reload requires using the app and reading its state afterward.
Browser agents in each tool
Claude Code
Claude Code’s Chrome integration connects through the Claude in Chrome extension. It can test web apps and inspect console logs. Actions run visibly in a browser window, with access to its signed-in state. Login pages and CAPTCHAs require manual handling.
OpenAI Codex
OpenAI’s browser guide distinguishes surfaces. The built-in browser is available in ChatGPT on the web and desktop. It isn’t available in Codex CLI or the Codex IDE extension. A Codex Cloud task with browser access can use its browser to reproduce a bug or check a fix.
Cursor
Cursor’s Browser tool can navigate, click, type, and capture screenshots. It also exposes console output and network traffic for debugging. Browser storage persists per workspace, which matters when you need to test a fresh visitor’s experience.
Grok Build
A built-in browser workflow is not documented in the Grok Build overview. The overview documents its terminal interface, scripting, and ACP integration. Don’t assume a web-search result means an agent has clicked through your application.
Details checked against each vendor’s documentation in November 2026.
A real example
Give a browser-enabled coding agent a concrete navigation check on this site:
Open https://flaviocopes.com/ai-glossary/.
Follow the Browser agents entry, then its Kitesurf tutorial link.
Check that each destination has the expected heading.
Return to the glossary using the site's navigation.
Report the URLs you reached and any broken link.
This checks a reader’s path through real pages. For a form, specify the input, the expected result, and whether the agent may submit it.
When to use browser agents
Use one after changing navigation, forms, or settings. Include an empty state or invalid input in the task when that flow has one. Keep unit tests for logic that can be checked without opening a browser.
Pitfalls
A logged-in browser can hide onboarding problems. State which account and starting state the check needs, and repeat the relevant flow with fresh storage when appropriate.
Pages can contain prompt injection. Treat their text as content to inspect. Set clear boundaries before an agent reaches a purchase, message, or other action with consequences.
For desktop testing beyond the browser, see testing Mac apps in a VM and VM Peek, which lets you watch the test machine.
Related glossary entries
- Tool calling: Tool calling is when a model names a function and its arguments, and the app runs it. How Claude Code, Codex, Cursor and Grok Build take that step.
- Prompt injection: Prompt injection is instructions hidden in text a coding agent reads. How Claude Code, Codex, Cursor and Grok Build limit what that text can make the agent do.
- Multimodal model: A multimodal model takes more than text, such as a screenshot, in the same request as the prompt. How Claude Code, Codex, Cursor and Grok accept an image.
Want me to talk about your product? You can sponsor this site.