AI agent browser
An AI agent browser is a real cloud browser an AI agent controls to act on websites: open pages, log in, click, type, fill forms and read what loads. Zenrows Browser gives agents that browser through MCP tools like browser_navigate and browser_click, or Playwright and Puppeteer over CDP, with Zenrows' stealth on every session.
Updated
{
"task": "Find the newest invoice in the supplier portal",
"session_id": "sess_8c41e2",
"steps": [
{ "tool": "browser_navigate", "url": "https://portal.example.com/login" },
{ "tool": "browser_fill", "selector": "#email", "value": "ops@example.com" },
{ "tool": "browser_fill", "selector": "#password", "value": "********" },
{ "tool": "browser_click", "selector": "button[type=submit]" },
{ "tool": "browser_wait_for_selector", "selector": "table.invoices" },
{ "tool": "browser_get_text", "selector": "table.invoices tbody tr:first-child" },
{ "tool": "browser_close" }
],
"result": {
"invoice": "INV-2026-0912",
"amount": 1240.0,
"currency": "EUR",
"due_date": "2026-11-05"
},
"session_minutes": 2
}
What teams use an agent browser for
If one request returns the page, Fetch is faster.
A browser earns its place at a login, form or click.
| Job | Data you collect | Typical sources |
|---|---|---|
| Portal logins and downloads | Invoices, statements, order and shipment status | Supplier portals, |
| Form-driven lookups | Results behind a search form | State court portals, company registries, county property search |
| Availability checks | Slots, seats or stock behind clicks | Government appointments, airline booking, ticketing |
| Configurators and quotes | A price that depends on options | Car configurators, insurance quotes, B2B calculators |
| Dynamic dashboards | Numbers behind tabs, filters or scroll | Seller centers, analytics dashboards |
| Checking your own flows | Sign-up, search and checkout still working | Your staging and production apps |
Why agents fail in a browser
A smart agent still fails if a local headless browser is flagged, loses its login or dies mid-task.
A Turnstile loop or "verify you are human" on step one
Zenrows' stealth gets through Cloudflare Turnstile and similar
Logged in, then logged out on the next action
One session_id keeps cookies and tabs across tool calls
Clicks miss after a redesign; the agent loops
browser_get_accessibility_tree picks elements by role and text
Open sessions pile up after the answer
browser_close at the end of each task frees the session
Chrome versions, memory limits, crashed containers
A hosted browser at wss://browser.zenrows.com, nothing to run
Nobody knows why a run went wrong
browser_screenshot captures any step for review
Set up an AI agent browser with Zenrows
- Connect the agent:
claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcp, orhttps://mcp.zenrows.com/mcpwith a Bearer key in any MCP client. - Describe the goal and end state; the agent starts with
browser_navigateand picks each step. - Script the parts that never change, like logins, in Playwright or Puppeteer over CDP; the model takes the variable part.
- Close every session with
browser_closeand log session minutes per task.
// npm install playwright-core
import { chromium } from "playwright-core";
const browser = await chromium.connectOverCDP(
"wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY"
);
const context = browser.contexts()[0] ?? (await browser.newContext());
const page = await context.newPage();
// Scripted login: credentials stay in env vars, never in the prompt.
await page.goto(LOGIN_URL);
await page.fill("#email", process.env.PORTAL_USER);
await page.fill("#password", process.env.PORTAL_PASSWORD);
await page.click("button[type=submit]");
await page.waitForSelector("main");
// Hand the model a compact view of the page to choose its next action.
const snapshot = await page.locator("main").ariaSnapshot();
console.log(snapshot);
await browser.close();# Connect once
claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcp
# Then ask:
Use the Zenrows browser to open TARGET_URL, search for "ACME Holdings" in the company search form, open the first result, and tell me the registration number and status. Close the browser session when done.npx -y @zenrows/cli init
# Print the MCP config for your agent, so it gets the browser tools
zenrows mcp config --client claude-code
# Read a page that needs no clicks straight from the terminal
zenrows fetch TARGET_URL --output markdownWhich Zenrows product fits
- Let an agent log in and fill forms BrowserA cloud browser over CDP or MCP
- Give Claude, Cursor or Codex browser tools MCP Serverbrowser_navigate, browser_click, browser_fill and more
- Set up and read from an agent's shell CLIzenrows mcp config prints the setup; zenrows fetch reads pages
- Read a page that needs no interaction FetchOne request, no session to manage
- Teach the agent which tool fits Agent ToolkitSkills and plugins route reads to Fetch, actions to Browser
What success looks like
| Measure | What good looks like | How to check it |
|---|---|---|
| Task completion | Test tasks reach their end state | Weekly rerun of known-answer tasks |
| Steps per task | Stable step counts per task | Tool calls per task in the trace |
| Session minutes per task | Minutes match the work, no idle tail | Session duration against last action time |
| Orphaned sessions | Every session closed | Each opening browser_navigate has a browser_close |
| Challenge pages | Block pages are rare on your targets | Screenshot or log pages with a challenge marker |
| Human handoffs | Few tasks need a person | Tasks escalated to a human per week |
AI agent browser FAQ
-
A browser an AI agent drives instead of a person: given a goal, it reads each page and picks the next action (click, type, select, scroll, wait). Zenrows Browser runs it in the cloud, reached over MCP or CDP.
-
Connect the Zenrows MCP server:
claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcpin Claude Code; in Cursor, Windsurf, VS Code and others,https://mcp.zenrows.com/mcpwith your key as Bearer token. The agent gets thebrowser_*tools. -
Yes, with credentials you may use; the session keeps cookies. Safer: script the login in Playwright from environment variables and hand the model the logged-in page, so passwords never enter the prompt.
-
MCP when the path is unknown and the model decides; Playwright or Puppeteer over CDP for fixed, fast, repeatable flows. Both use the same Zenrows Browser: script the fixed part, hand the rest to the agent.
-
Zenrows' stealth gets agents through Cloudflare, Turnstile, DataDome and Akamai checks like a regular visitor.
browser_screenshotshows what it saw at any step. -
What a person does on a page:
browser_navigateopens a URL;browser_click,browser_fill,browser_typeandbrowser_select_optionact;browser_scrollandbrowser_wait_for_selectormove and wait;browser_get_text,browser_get_accessibility_tree,browser_screenshotandbrowser_evaluateread. Also tabs, cookies, back and forward;browser_closeends the session. -
When the page needs no interaction: Fetch returns HTML, Markdown or JSON in one request, rendering only when needed (Adaptive Stealth Mode), no session. Most agents use both.