| name | browser |
| description | Drive a browser to automate websites — fill forms, click buttons, take screenshots, scrape pages. Uses the built-in `browser` command (or `agents browser`). |
| argument-hint | [url] |
| allowed-tools | Bash(browser*), Bash(agents browser*), Bash(sleep*) |
| user-invocable | true |
Browser Automation
The browser command (shorthand for agents browser) provides CDP-based browser automation with profile and task management.
Quick Start
browser profiles create my-profile -b chrome -e cdp://localhost:9222
browser start my-task --profile my-profile
browser navigate my-task https://example.com
browser refs my-task
browser click my-task <tabId> <ref>
browser type my-task <tabId> <ref> "hello"
browser screenshot my-task
browser stop my-task
Profiles
Profiles define browser type and connection endpoint. Create once, reuse across tasks.
browser profiles create local -b chrome -e cdp://localhost:9222
browser profiles create mac-mini -b comet -e ssh://mac-mini?port=9333
browser profiles list
Supported browsers: chrome, comet, chromium, brave, edge
Tasks
Tasks are browser sessions. Each task gets its own tabs and state.
browser start [task-name] --profile <profile>
browser tasks
browser stop <task>
Navigation & Tabs
browser navigate <task> <url>
browser tabs <task>
browser close <task> [tabId]
DOM Interaction
browser refs <task> [tabId]
browser click <task> <tabId> <ref>
browser type <task> <tabId> <ref> "text"
browser press <task> <tabId> Enter
browser hover <task> <tabId> <ref>
Screenshots & Evaluation
browser screenshot <task> [tabId]
browser evaluate <task> <tabId> "document.title"
Account Credentials
Before navigating to sites that require login, load credentials:
eval "$(agents secrets export browser-accounts --plaintext)"
Known accounts (configure in browser-accounts bundle):
| Service | Username variable | Password variable |
|---|
| Grafana | $GRAFANA_USERNAME | $GRAFANA_PASSWORD |
| Cloudflare | $CLOUDFLARE_USERNAME | $CLOUDFLARE_PASSWORD |
Always screenshot first — if the session is still alive in the profile, skip login.
Workflow Pattern
- Start a task with a profile
- Navigate to target URL
- Refs to see clickable elements with their ref numbers
- Click / type / press using refs
- Refs again after each action — refs are ephemeral
- Screenshot liberally — screenshots are your eyes
- Stop the task when done
Rich Text Editors
type may fail on contenteditable / ProseMirror. Use evaluate:
browser evaluate <task> <tabId> 'document.execCommand("insertText", false, "your text")'
Remote Browsers (SSH)
For browsers on remote machines:
browser profiles create remote-mac -b comet -e ssh://user@hostname?port=9222
browser start task --profile remote-mac
browser navigate task https://example.com
The SSH driver launches the browser on the remote host and tunnels CDP back.