Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vercel-labs/agent-browser/llms.txt
Use this file to discover all available pages before exploring further.
CLI Options
Complete reference of all command-line flags and options available in Agent Browser.
Global Options
These options can be used with any command.
| Option | Description | Default |
|---|
—json | Output as JSON for machine parsing | false |
—debug | Enable debug output | false |
Browser Configuration
Options for configuring the browser instance.
| Option | Description | Default |
|---|
—headed | Show browser window (not headless) | false |
—executable-path <path> | Custom browser executable path | Bundled Chromium |
—extension <path> | Load browser extension (repeatable) | None |
—args <args> | Browser launch args (comma or newline separated) | None |
—user-agent <ua> | Custom User-Agent string | Default Chrome UA |
—color-scheme <scheme> | Color scheme: dark, light, no-preference | System default |
—ignore-https-errors | Ignore HTTPS certificate errors | false |
—allow-file-access | Allow file:// URLs to access local files (Chromium only) | false |
Session Management
Options for managing browser sessions and state.
| Option | Description | Default |
|---|
—session <name> | Use isolated session | default |
—session-name <name> | Auto-save/restore session state | None |
—profile <path> | Persistent browser profile directory | None (ephemeral) |
—state <path> | Load storage state from JSON file | None |
Network Configuration
Options for network settings and headers.
| Option | Description | Default |
|---|
—headers <json> | Set HTTP headers scoped to the URL’s origin | None |
—proxy <url> | Proxy server URL with optional auth | None |
—proxy-bypass <hosts> | Hosts to bypass proxy (comma-separated) | None |
Screenshot Options
Options specific to screenshot commands.
| Option | Description | Default |
|---|
—full, -f | Capture full page (not just viewport) | false |
—annotate | Annotated screenshot with numbered element labels | false |
Snapshot Options
Options for the snapshot command.
| Option | Description | Default |
|---|
-i, —interactive | Only include interactive elements | false |
-C, —cursor | Include cursor-interactive elements | false |
-c, —compact | Remove empty structural elements | false |
-d, —depth <n> | Limit tree depth to n levels | Unlimited |
-s, —selector <sel> | Scope snapshot to CSS selector | Full page |
Cloud Providers
Options for cloud browser providers.
| Option | Description | Default |
|---|
-p, —provider <name> | Cloud browser provider: browserbase, browseruse, kernel, ios | None (local) |
—device <name> | iOS device name (for iOS provider), e.g. “iPhone 15 Pro” | None |
CDP Connection
Options for Chrome DevTools Protocol connections.
| Option | Description | Default |
|---|
—cdp <port|url> | Connect via Chrome DevTools Protocol (port or WebSocket URL) | None |
—auto-connect | Auto-discover and connect to running Chrome | false |
Security Options
Options for security features.
| Option | Description | Default |
|---|
—content-boundaries | Wrap page output in boundary markers for LLM safety | false |
—max-output <chars> | Truncate page output to N characters | Unlimited |
—allowed-domains <list> | Comma-separated allowed domain patterns | None (all allowed) |
—action-policy <path> | Path to action policy JSON file | None |
—confirm-actions <list> | Action categories requiring confirmation (comma-separated) | None |
—confirm-interactive | Enable interactive confirmation prompts | false |
Download Configuration
Options for download behavior.
| Option | Description | Default |
|---|
—download-path <path> | Default download directory | System temp directory |
Configuration File
Options for loading configuration.
| Option | Description | Default |
|---|
—config <path> | Use a custom config file | Auto-discover from ~/.agent-browser/config.json and ./agent-browser.json |
Click Options
Options for the click command.
| Option | Description | Default |
|---|
—new-tab | Open link in a new tab instead of navigating current tab | false |
Options for the scroll command.
| Option | Description | Default |
|---|
-s, —selector <sel> | CSS selector for a scrollable container | Page viewport |
Wait Options
Options for the wait command.
| Option | Description | Default |
|---|
-u, —url <pattern> | Wait for URL to match pattern | None |
-l, —load <state> | Wait for load state: load, domcontentloaded, networkidle | None |
-f, —fn <expression> | Wait for JavaScript expression to be truthy | None |
-t, —text <text> | Wait for text to appear on page | None |
-d, —download | Wait for a download to complete | None |
—timeout <ms> | Timeout in milliseconds (for download wait) | 30000 |
Eval Options
Options for the eval command.
| Option | Description | Default |
|---|
-b, —base64 | Decode script from base64 | false |
—stdin | Read script from stdin | false |
Find Options
Options for the find command.
| Option | Description | Default |
|---|
—name <name> | Filter role by accessible name | None |
—exact | Require exact text match | false |
Cookie Options
Options for the cookies set command.
| Option | Description | Default |
|---|
—url <url> | Cookie URL scope | Current page URL |
—domain <domain> | Cookie domain | Current page domain |
—path <path> | Cookie path | / |
—httpOnly | Mark as HTTP-only | false |
—secure | Mark as secure (HTTPS only) | false |
—sameSite <value> | SameSite attribute: Strict, Lax, None | None |
—expires <timestamp> | Expiration timestamp (Unix seconds) | Session cookie |
Auth Options
Options for the auth save command.
| Option | Description | Required |
|---|
—url <url> | Login page URL | Yes |
—username <user> | Username | Yes |
—password <pass> | Password | Yes (or —password-stdin) |
—password-stdin | Read password from stdin | No |
—username-selector <sel> | Custom username field selector | No |
—password-selector <sel> | Custom password field selector | No |
—submit-selector <sel> | Custom submit button selector | No |
State Options
Options for state clear command.
| Option | Description | Default |
|---|
-a, —all | Clear all saved states | false |
Profiler Options
Options for profiler start command.
| Option | Description | Default |
|---|
—categories <list> | Chrome trace categories (comma-separated) | Default Chrome categories |
Diff Options
Options for diff commands.
| Option | Description | Default |
|---|
—baseline <file> | Baseline file for comparison | Previous snapshot in session |
-o, —output <file> | Save diff image to custom path | Auto-generated path |
-t, —threshold <value> | Color threshold for screenshot diff (0-1) | 0.1 |
—screenshot | Also perform visual screenshot diff (for url diff) | false |
—wait-until <state> | Wait strategy before diff: load, domcontentloaded, networkidle | load |
Network Options
Options for network route command.
| Option | Description | Default |
|---|
—abort | Block requests matching URL pattern | false |
—body <json> | Mock response body (JSON) | None |
Boolean Flag Values
All boolean flags accept optional true or false values to override config settings:
# Enable (equivalent to bare --headed)
agent-browser --headed true open example.com
# Disable (overrides config file setting)
agent-browser --headed false open example.com
# Bare flag defaults to true
agent-browser --headed open example.com
This applies to: --json, --full, --headed, --debug, --ignore-https-errors, --allow-file-access, --auto-connect, --annotate, --content-boundaries, --confirm-interactive.