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.
All Commands
Comprehensive list of all Agent Browser CLI commands organized by category.
Navigation
Commands for navigating web pages.
| Command | Description | Usage |
|---|
open | Navigate to a URL (aliases: goto, navigate) | agent-browser open <url> |
back | Navigate back in history | agent-browser back |
forward | Navigate forward in history | agent-browser forward |
reload | Reload the current page | agent-browser reload |
Core Actions
Commands for interacting with page elements.
| Command | Description | Usage |
|---|
click | Click an element | agent-browser click <selector> [—new-tab] |
dblclick | Double-click an element | agent-browser dblclick <selector> |
fill | Clear and fill an input field | agent-browser fill <selector> <text> |
type | Type text into an element | agent-browser type <selector> <text> |
hover | Hover over an element | agent-browser hover <selector> |
focus | Focus an element | agent-browser focus <selector> |
check | Check a checkbox | agent-browser check <selector> |
uncheck | Uncheck a checkbox | agent-browser uncheck <selector> |
select | Select a dropdown option | agent-browser select <selector> <value…> |
drag | Drag and drop | agent-browser drag <source> <target> |
upload | Upload files | agent-browser upload <selector> <files…> |
download | Download a file by clicking an element | agent-browser download <selector> <path> |
Keyboard
Commands for keyboard input and key presses.
| Command | Description | Usage |
|---|
press | Press a key or key combination (alias: key) | agent-browser press <key> |
keydown | Press a key down without release | agent-browser keydown <key> |
keyup | Release a key | agent-browser keyup <key> |
keyboard | Raw keyboard input (no selector needed) | agent-browser keyboard <type|inserttext> <text> |
Commands for scrolling the page or elements.
| Command | Description | Usage |
|---|
scroll | Scroll the page | agent-browser scroll [direction] [amount] [—selector <sel>] |
scrollintoview | Scroll element into view (alias: scrollinto) | agent-browser scrollintoview <selector> |
Wait
Commands for waiting and synchronization.
| Command | Description | Usage |
|---|
wait | Wait for element, timeout, or condition | agent-browser wait <selector|ms|option> |
Screenshot & PDF
Commands for capturing page content.
| Command | Description | Usage |
|---|
screenshot | Take a screenshot | agent-browser screenshot [path] [—full] [—annotate] |
pdf | Save page as PDF | agent-browser pdf <path> |
Snapshot
Commands for getting accessibility tree information.
| Command | Description | Usage |
|---|
snapshot | Get accessibility tree snapshot | agent-browser snapshot [-i] [-C] [-c] [-d <n>] [-s <sel>] |
Eval
Commands for executing JavaScript.
| Command | Description | Usage |
|---|
eval | Execute JavaScript | agent-browser eval [—base64|—stdin] <script> |
Get Info
Commands for retrieving information from elements or the page.
| Command | Description | Usage |
|---|
get text | Get text content of element | agent-browser get text <selector> |
get html | Get inner HTML of element | agent-browser get html <selector> |
get value | Get value of input element | agent-browser get value <selector> |
get attr | Get attribute value | agent-browser get attr <selector> <name> |
get title | Get page title | agent-browser get title |
get url | Get current URL | agent-browser get url |
get count | Count matching elements | agent-browser get count <selector> |
get box | Get bounding box | agent-browser get box <selector> |
get styles | Get computed styles | agent-browser get styles <selector> |
State Checks
Commands for checking element state.
| Command | Description | Usage |
|---|
is visible | Check if element is visible | agent-browser is visible <selector> |
is enabled | Check if element is enabled | agent-browser is enabled <selector> |
is checked | Check if checkbox/radio is checked | agent-browser is checked <selector> |
Find Elements
Commands for finding elements using semantic locators.
| Command | Description | Usage |
|---|
find role | Find by ARIA role | agent-browser find role <role> <action> [—name <n>] [—exact] |
find text | Find by text content | agent-browser find text <text> <action> [—exact] |
find label | Find by associated label | agent-browser find label <label> <action> [—exact] |
find placeholder | Find by placeholder text | agent-browser find placeholder <text> <action> [—exact] |
find alt | Find by alt text | agent-browser find alt <text> <action> [—exact] |
find title | Find by title attribute | agent-browser find title <text> <action> [—exact] |
find testid | Find by data-testid | agent-browser find testid <id> <action> |
find first | First matching element | agent-browser find first <selector> <action> |
find last | Last matching element | agent-browser find last <selector> <action> |
find nth | Nth matching element | agent-browser find nth <index> <selector> <action> |
Mouse Control
Commands for low-level mouse operations.
| Command | Description | Usage |
|---|
mouse move | Move mouse to coordinates | agent-browser mouse move <x> <y> |
mouse down | Press mouse button | agent-browser mouse down [button] |
mouse up | Release mouse button | agent-browser mouse up [button] |
mouse wheel | Scroll wheel | agent-browser mouse wheel <dy> [dx] |
Browser Settings
Commands for configuring browser behavior.
| Command | Description | Usage |
|---|
set viewport | Set viewport size | agent-browser set viewport <width> <height> |
set device | Emulate device | agent-browser set device <name> |
set geo | Set geolocation | agent-browser set geo <lat> <lng> |
set offline | Toggle offline mode | agent-browser set offline [on|off] |
set headers | Set extra HTTP headers | agent-browser set headers <json> |
set credentials | Set HTTP basic auth | agent-browser set credentials <username> <password> |
set media | Emulate color scheme | agent-browser set media [dark|light] |
Network
Commands for network interception and monitoring.
| Command | Description | Usage |
|---|
network route | Intercept requests | agent-browser network route <url> [—abort] [—body <json>] |
network unroute | Remove routes | agent-browser network unroute [url] |
network requests | View tracked requests | agent-browser network requests [—filter <pattern>] |
Storage
Commands for managing browser storage.
| Command | Description | Usage |
|---|
storage local | Get all localStorage | agent-browser storage local |
storage local <key> | Get specific localStorage key | agent-browser storage local <key> |
storage local set | Set localStorage value | agent-browser storage local set <key> <value> |
storage local clear | Clear all localStorage | agent-browser storage local clear |
storage session | Get all sessionStorage | agent-browser storage session |
Cookies
Commands for managing cookies.
| Command | Description | Usage |
|---|
cookies | Get all cookies | agent-browser cookies |
cookies set | Set a cookie | agent-browser cookies set <name> <value> [options] |
cookies clear | Clear all cookies | agent-browser cookies clear |
Tabs & Windows
Commands for managing tabs and windows.
| Command | Description | Usage |
|---|
tab | List tabs | agent-browser tab |
tab new | Create new tab | agent-browser tab new [url] |
tab <n> | Switch to tab | agent-browser tab <index> |
tab close | Close tab | agent-browser tab close [index] |
window new | Create new window | agent-browser window new |
Frames
Commands for iframe navigation.
| Command | Description | Usage |
|---|
frame | Switch to iframe | agent-browser frame <selector> |
frame main | Back to main frame | agent-browser frame main |
Dialogs
Commands for handling browser dialogs.
| Command | Description | Usage |
|---|
dialog accept | Accept dialog | agent-browser dialog accept [text] |
dialog dismiss | Dismiss dialog | agent-browser dialog dismiss |
Debug
Commands for debugging and profiling.
| Command | Description | Usage |
|---|
trace start | Start recording trace | agent-browser trace start |
trace stop | Stop and save trace | agent-browser trace stop [path] |
profiler start | Start Chrome profiling | agent-browser profiler start [—categories <list>] |
profiler stop | Stop and save profile | agent-browser profiler stop [path] |
console | View console messages | agent-browser console [—clear] |
errors | View page errors | agent-browser errors [—clear] |
highlight | Highlight element | agent-browser highlight <selector> |
State Management
Commands for managing authentication state.
| Command | Description | Usage |
|---|
state save | Save auth state | agent-browser state save <path> |
state load | Load auth state | agent-browser state load <path> |
state list | List saved state files | agent-browser state list |
state show | Show state summary | agent-browser state show <file> |
state rename | Rename state file | agent-browser state rename <old> <new> |
state clear | Clear states for session | agent-browser state clear [name] [—all] |
state clean | Delete old states | agent-browser state clean —older-than <days> |
Authentication
Commands for managing authentication vault.
| Command | Description | Usage |
|---|
auth save | Save auth profile | agent-browser auth save <name> —url <url> —username <user> —password <pass> |
auth login | Login with saved profile | agent-browser auth login <name> |
auth list | List auth profiles | agent-browser auth list |
auth show | Show profile details | agent-browser auth show <name> |
auth delete | Delete auth profile | agent-browser auth delete <name> |
Action Confirmation
Commands for handling action confirmations.
| Command | Description | Usage |
|---|
confirm | Confirm pending action | agent-browser confirm <confirmation-id> |
deny | Deny pending action | agent-browser deny <confirmation-id> |
Sessions
Commands for managing browser sessions.
| Command | Description | Usage |
|---|
session | Show current session | agent-browser session |
session list | List active sessions | agent-browser session list |
Connection
Commands for connecting to browsers.
| Command | Description | Usage |
|---|
connect | Connect via CDP | agent-browser connect <port|url> |
close | Close browser (aliases: quit, exit) | agent-browser close |
Recording
Commands for recording browser sessions.
| Command | Description | Usage |
|---|
record start | Start video recording | agent-browser record start <output.webm> [url] |
record stop | Stop recording | agent-browser record stop |
record restart | Restart recording | agent-browser record restart <output.webm> [url] |
Diff
Commands for comparing snapshots and screenshots.
| Command | Description | Usage |
|---|
diff snapshot | Compare snapshots | agent-browser diff snapshot [—baseline <file>] |
diff screenshot | Visual pixel diff | agent-browser diff screenshot —baseline <file> [-o <out>] [-t <threshold>] |
diff url | Compare two URLs | agent-browser diff url <url1> <url2> [—screenshot] |
Setup
Commands for installation and setup.
| Command | Description | Usage |
|---|
install | Download Chromium browser | agent-browser install [—with-deps] |
device list | List iOS devices (iOS provider only) | agent-browser device list |
iOS Specific
Commands specific to iOS simulator/device control.
| Command | Description | Usage |
|---|
tap | Tap element (iOS alias for click) | agent-browser -p ios tap <selector> |
swipe | Swipe gesture | agent-browser -p ios swipe <direction> [distance] |