Skip to main content

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. Commands for navigating web pages.
CommandDescriptionUsage
openNavigate to a URL (aliases: goto, navigate)agent-browser open <url>
backNavigate back in historyagent-browser back
forwardNavigate forward in historyagent-browser forward
reloadReload the current pageagent-browser reload

Core Actions

Commands for interacting with page elements.
CommandDescriptionUsage
clickClick an elementagent-browser click <selector> [—new-tab]
dblclickDouble-click an elementagent-browser dblclick <selector>
fillClear and fill an input fieldagent-browser fill <selector> <text>
typeType text into an elementagent-browser type <selector> <text>
hoverHover over an elementagent-browser hover <selector>
focusFocus an elementagent-browser focus <selector>
checkCheck a checkboxagent-browser check <selector>
uncheckUncheck a checkboxagent-browser uncheck <selector>
selectSelect a dropdown optionagent-browser select <selector> <value…>
dragDrag and dropagent-browser drag <source> <target>
uploadUpload filesagent-browser upload <selector> <files…>
downloadDownload a file by clicking an elementagent-browser download <selector> <path>

Keyboard

Commands for keyboard input and key presses.
CommandDescriptionUsage
pressPress a key or key combination (alias: key)agent-browser press <key>
keydownPress a key down without releaseagent-browser keydown <key>
keyupRelease a keyagent-browser keyup <key>
keyboardRaw keyboard input (no selector needed)agent-browser keyboard <type|inserttext> <text>

Scroll

Commands for scrolling the page or elements.
CommandDescriptionUsage
scrollScroll the pageagent-browser scroll [direction] [amount] [—selector <sel>]
scrollintoviewScroll element into view (alias: scrollinto)agent-browser scrollintoview <selector>

Wait

Commands for waiting and synchronization.
CommandDescriptionUsage
waitWait for element, timeout, or conditionagent-browser wait <selector|ms|option>

Screenshot & PDF

Commands for capturing page content.
CommandDescriptionUsage
screenshotTake a screenshotagent-browser screenshot [path] [—full] [—annotate]
pdfSave page as PDFagent-browser pdf <path>

Snapshot

Commands for getting accessibility tree information.
CommandDescriptionUsage
snapshotGet accessibility tree snapshotagent-browser snapshot [-i] [-C] [-c] [-d <n>] [-s <sel>]

Eval

Commands for executing JavaScript.
CommandDescriptionUsage
evalExecute JavaScriptagent-browser eval [—base64|—stdin] <script>

Get Info

Commands for retrieving information from elements or the page.
CommandDescriptionUsage
get textGet text content of elementagent-browser get text <selector>
get htmlGet inner HTML of elementagent-browser get html <selector>
get valueGet value of input elementagent-browser get value <selector>
get attrGet attribute valueagent-browser get attr <selector> <name>
get titleGet page titleagent-browser get title
get urlGet current URLagent-browser get url
get countCount matching elementsagent-browser get count <selector>
get boxGet bounding boxagent-browser get box <selector>
get stylesGet computed stylesagent-browser get styles <selector>

State Checks

Commands for checking element state.
CommandDescriptionUsage
is visibleCheck if element is visibleagent-browser is visible <selector>
is enabledCheck if element is enabledagent-browser is enabled <selector>
is checkedCheck if checkbox/radio is checkedagent-browser is checked <selector>

Find Elements

Commands for finding elements using semantic locators.
CommandDescriptionUsage
find roleFind by ARIA roleagent-browser find role <role> <action> [—name <n>] [—exact]
find textFind by text contentagent-browser find text <text> <action> [—exact]
find labelFind by associated labelagent-browser find label <label> <action> [—exact]
find placeholderFind by placeholder textagent-browser find placeholder <text> <action> [—exact]
find altFind by alt textagent-browser find alt <text> <action> [—exact]
find titleFind by title attributeagent-browser find title <text> <action> [—exact]
find testidFind by data-testidagent-browser find testid <id> <action>
find firstFirst matching elementagent-browser find first <selector> <action>
find lastLast matching elementagent-browser find last <selector> <action>
find nthNth matching elementagent-browser find nth <index> <selector> <action>

Mouse Control

Commands for low-level mouse operations.
CommandDescriptionUsage
mouse moveMove mouse to coordinatesagent-browser mouse move <x> <y>
mouse downPress mouse buttonagent-browser mouse down [button]
mouse upRelease mouse buttonagent-browser mouse up [button]
mouse wheelScroll wheelagent-browser mouse wheel <dy> [dx]

Browser Settings

Commands for configuring browser behavior.
CommandDescriptionUsage
set viewportSet viewport sizeagent-browser set viewport <width> <height>
set deviceEmulate deviceagent-browser set device <name>
set geoSet geolocationagent-browser set geo <lat> <lng>
set offlineToggle offline modeagent-browser set offline [on|off]
set headersSet extra HTTP headersagent-browser set headers <json>
set credentialsSet HTTP basic authagent-browser set credentials <username> <password>
set mediaEmulate color schemeagent-browser set media [dark|light]

Network

Commands for network interception and monitoring.
CommandDescriptionUsage
network routeIntercept requestsagent-browser network route <url> [—abort] [—body <json>]
network unrouteRemove routesagent-browser network unroute [url]
network requestsView tracked requestsagent-browser network requests [—filter <pattern>]

Storage

Commands for managing browser storage.
CommandDescriptionUsage
storage localGet all localStorageagent-browser storage local
storage local <key>Get specific localStorage keyagent-browser storage local <key>
storage local setSet localStorage valueagent-browser storage local set <key> <value>
storage local clearClear all localStorageagent-browser storage local clear
storage sessionGet all sessionStorageagent-browser storage session

Cookies

Commands for managing cookies.
CommandDescriptionUsage
cookiesGet all cookiesagent-browser cookies
cookies setSet a cookieagent-browser cookies set <name> <value> [options]
cookies clearClear all cookiesagent-browser cookies clear

Tabs & Windows

Commands for managing tabs and windows.
CommandDescriptionUsage
tabList tabsagent-browser tab
tab newCreate new tabagent-browser tab new [url]
tab <n>Switch to tabagent-browser tab <index>
tab closeClose tabagent-browser tab close [index]
window newCreate new windowagent-browser window new

Frames

Commands for iframe navigation.
CommandDescriptionUsage
frameSwitch to iframeagent-browser frame <selector>
frame mainBack to main frameagent-browser frame main

Dialogs

Commands for handling browser dialogs.
CommandDescriptionUsage
dialog acceptAccept dialogagent-browser dialog accept [text]
dialog dismissDismiss dialogagent-browser dialog dismiss

Debug

Commands for debugging and profiling.
CommandDescriptionUsage
trace startStart recording traceagent-browser trace start
trace stopStop and save traceagent-browser trace stop [path]
profiler startStart Chrome profilingagent-browser profiler start [—categories <list>]
profiler stopStop and save profileagent-browser profiler stop [path]
consoleView console messagesagent-browser console [—clear]
errorsView page errorsagent-browser errors [—clear]
highlightHighlight elementagent-browser highlight <selector>

State Management

Commands for managing authentication state.
CommandDescriptionUsage
state saveSave auth stateagent-browser state save <path>
state loadLoad auth stateagent-browser state load <path>
state listList saved state filesagent-browser state list
state showShow state summaryagent-browser state show <file>
state renameRename state fileagent-browser state rename <old> <new>
state clearClear states for sessionagent-browser state clear [name] [—all]
state cleanDelete old statesagent-browser state clean —older-than <days>

Authentication

Commands for managing authentication vault.
CommandDescriptionUsage
auth saveSave auth profileagent-browser auth save <name> —url <url> —username <user> —password <pass>
auth loginLogin with saved profileagent-browser auth login <name>
auth listList auth profilesagent-browser auth list
auth showShow profile detailsagent-browser auth show <name>
auth deleteDelete auth profileagent-browser auth delete <name>

Action Confirmation

Commands for handling action confirmations.
CommandDescriptionUsage
confirmConfirm pending actionagent-browser confirm <confirmation-id>
denyDeny pending actionagent-browser deny <confirmation-id>

Sessions

Commands for managing browser sessions.
CommandDescriptionUsage
sessionShow current sessionagent-browser session
session listList active sessionsagent-browser session list

Connection

Commands for connecting to browsers.
CommandDescriptionUsage
connectConnect via CDPagent-browser connect <port|url>
closeClose browser (aliases: quit, exit)agent-browser close

Recording

Commands for recording browser sessions.
CommandDescriptionUsage
record startStart video recordingagent-browser record start <output.webm> [url]
record stopStop recordingagent-browser record stop
record restartRestart recordingagent-browser record restart <output.webm> [url]

Diff

Commands for comparing snapshots and screenshots.
CommandDescriptionUsage
diff snapshotCompare snapshotsagent-browser diff snapshot [—baseline <file>]
diff screenshotVisual pixel diffagent-browser diff screenshot —baseline <file> [-o <out>] [-t <threshold>]
diff urlCompare two URLsagent-browser diff url <url1> <url2> [—screenshot]

Setup

Commands for installation and setup.
CommandDescriptionUsage
installDownload Chromium browseragent-browser install [—with-deps]
device listList iOS devices (iOS provider only)agent-browser device list

iOS Specific

Commands specific to iOS simulator/device control.
CommandDescriptionUsage
tapTap element (iOS alias for click)agent-browser -p ios tap <selector>
swipeSwipe gestureagent-browser -p ios swipe <direction> [distance]

Build docs developers (and LLMs) love