Browserless

Browserless provides cloud browser infrastructure with a Sessions API. Use it when running agent-browser in environments where a local browser isn't available.

Setup

export BROWSERLESS_API_KEY="your-api-token"
agent-browser -p browserless open https://example.com

Or use environment variables for CI/scripts:

export AGENT_BROWSER_PROVIDER=browserless
export BROWSERLESS_API_KEY="your-api-token"
agent-browser open https://example.com

The -p flag takes precedence over AGENT_BROWSER_PROVIDER.

Configuration

VariableDescriptionDefault
BROWSERLESS_API_KEYAPI token (required)
BROWSERLESS_API_URLBase API URL (for custom regions or self-hosted)https://production-sfo.browserless.io
BROWSERLESS_BROWSER_TYPEType of browser to use (chromium or chrome)chromium
BROWSERLESS_TTLSession TTL in milliseconds300000
BROWSERLESS_STEALTHEnable stealth modetrue

When enabled, agent-browser connects to a Browserless cloud session instead of launching a local browser. All commands work identically.

Get your API token from the Browserless Dashboard.