Get your API Key
Install Agent Browser
- npm
- npx
- Homebrew
install command downloads Chromium for local use. When using the Browserbase provider, the browser runs in the cloud instead.Open a page with Browserbase
Use the This creates a Browserbase session and navigates to the URL. You can view the session in your Browserbase Dashboard.
-p browserbase flag to run commands on a Browserbase cloud browser:Get an accessibility snapshot
The Output includes element refs that you can use in subsequent commands:Use the
snapshot command returns an accessibility tree with element references — the primary way AI agents understand page content:-i flag to show only interactive elements:All commands support the
-p browserbase flag to run on Browserbase cloud browsers. You can also set AGENT_BROWSER_PROVIDER=browserbase as an environment variable to avoid passing the flag each time. See the Agent Browser README for the full command reference.