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.
Overview
Interaction commands allow you to simulate user interactions with page elements.
Mouse Interactions
click
Click an element.
| Parameter | Description |
|---|
selector | CSS selector, ref (@e1), or text locator |
Options:
| Option | Description |
|---|
—new-tab | Open link in new tab |
Examples:
# Click by ref
agent-browser click @e2
# Click by CSS selector
agent-browser click "#submit-button"
# Click by text
agent-browser click "text=Sign In"
# Click and open in new tab
agent-browser click @e5 --new-tab
dblclick
Double-click an element.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser dblclick @e3
agent-browser dblclick ".file-name"
hover
Hover over an element.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser hover @e4
agent-browser hover ".dropdown-trigger"
focus
Focus an element.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser focus @e1
agent-browser focus "#email-input"
Text Input
fill
Clear and fill an input field.
| Parameter | Description |
|---|
selector | Input element selector |
text | Text to fill (multiple words joined with spaces) |
Examples:
# Fill by ref
agent-browser fill @e3 "test@example.com"
# Fill by selector
agent-browser fill "#email" "user@domain.com"
# Fill with multiple words
agent-browser fill @e2 "John Doe"
type
Type text into an element (without clearing).
| Parameter | Description |
|---|
selector | Input element selector |
text | Text to type |
Examples:
agent-browser type @e1 "additional text"
agent-browser type "#search" "query"
press
Press a keyboard key.
| Parameter | Description |
|---|
key | Key name (Enter, Tab, Escape) or key combination (Control+a) |
Alias: key
Examples:
# Press Enter
agent-browser press Enter
# Press Tab
agent-browser press Tab
# Keyboard shortcuts
agent-browser press Control+a
agent-browser press Meta+v
keyboard type
Type text with real keystrokes (current focus).
| Parameter | Description |
|---|
text | Text to type |
Examples:
agent-browser keyboard type "Hello World"
keyboard inserttext
Insert text without key events (current focus).
| Parameter | Description |
|---|
text | Text to insert |
Examples:
agent-browser keyboard inserttext "pasted content"
check
Check a checkbox.
| Parameter | Description |
|---|
selector | Checkbox selector |
Examples:
agent-browser check @e5
agent-browser check "#agree-terms"
uncheck
Uncheck a checkbox.
| Parameter | Description |
|---|
selector | Checkbox selector |
Examples:
agent-browser uncheck @e6
agent-browser uncheck "#newsletter"
select
Select dropdown option(s).
| Parameter | Description |
|---|
selector | Select element selector |
value | Option value(s) to select |
Examples:
# Select single option
agent-browser select @e4 "option1"
# Select multiple options
agent-browser select "#country" "US" "CA"
Scroll the page or an element.
| Parameter | Description |
|---|
direction | Direction: up, down, left, right (default: down) |
amount | Pixels to scroll (default: 300) |
Options:
| Option | Description |
|---|
-s, —selector | Scroll specific element instead of page |
Examples:
# Scroll down 300px (default)
agent-browser scroll
# Scroll down 500px
agent-browser scroll down 500
# Scroll up
agent-browser scroll up
# Scroll specific element
agent-browser scroll down 200 --selector "#content"
Scroll element into view.
| Parameter | Description |
|---|
selector | Element selector |
Alias: scrollinto
Examples:
agent-browser scrollintoview @e10
agent-browser scrollinto "#footer"
Drag and Drop
drag
Drag an element to another element.
| Parameter | Description |
|---|
source | Source element selector |
target | Target element selector |
Examples:
agent-browser drag @e1 @e2
agent-browser drag ".draggable" ".drop-zone"
File Upload
upload
Upload file(s) to an input element.
| Parameter | Description |
|---|
selector | File input selector |
files | File path(s) to upload |
Examples:
# Upload single file
agent-browser upload @e7 "/path/to/file.pdf"
# Upload multiple files
agent-browser upload "#file-input" "/path/to/file1.jpg" "/path/to/file2.jpg"
Workflow Examples
agent-browser open example.com/login
agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser check @e3 # Remember me
agent-browser click @e4 # Submit button
Search and Navigate
agent-browser open example.com
agent-browser fill @e1 "search query"
agent-browser press Enter
agent-browser wait --load networkidle
agent-browser click @e5 # First result
agent-browser fill @e1 "John Doe"
agent-browser select @e2 "United States"
agent-browser check @e3
agent-browser upload @e4 "/path/to/resume.pdf"
agent-browser click @e5