For AI agents: a documentation index is available at /llms.txt
Skip to main content

OpenClaw Integration

OpenClaw is an open-source personal AI assistant that runs locally and can autonomously browse the web, fill out forms, scrape data, and interact with online services. By connecting OpenClaw to Browserless, you offload browser execution to the cloud – gaining stealth, residential proxies, CAPTCHA solving, and scalable sessions without running a local browser.

Prerequisites
  • OpenClaw installed and running (openclaw onboard completed), updated to the latest release with openclaw update
  • Browserless API token (available in your account dashboard)

Step-by-Step Setup​

  1. Get your API token

    Go to your Browserless account dashboard and copy your API token. You will add it to your OpenClaw configuration in the next step.

    tip

    Store your token in an environment variable instead of hardcoding it in config files:

    export BROWSERLESS_API_TOKEN="your-token-here"
  2. Configure a Browserless browser profile

    OpenClaw uses browser profiles defined in ~/.openclaw/openclaw.json. Add a browserless profile that points to a Browserless regional endpoint via its CDP URL.

    Open your config file and add the following:

    // ~/.openclaw/openclaw.json
    {
    browser: {
    enabled: true,
    defaultProfile: "browserless",
    profiles: {
    browserless: {
    cdpUrl: "wss://production-sfo.browserless.io?token=YOUR_API_TOKEN"
    }
    }
    }
    }

    Replace YOUR_API_TOKEN with your actual Browserless token, or use an environment variable reference if your setup supports it.

    Keep defaultProfile set to browserless. Without it, OpenClaw uses its built-in openclaw profile, which launches Chrome on your machine instead of connecting to Browserless.

    Only add keys that OpenClaw documents to the browser block. OpenClaw rejects keys it doesn't recognize, and the gateway won't start until you remove them. Connection timeouts are built into OpenClaw, so there's nothing to tune here. Check the file after you save it:

    openclaw config validate

    Response

    Config valid: ~/.openclaw/openclaw.json

    Choose a regional endpoint

    Pick the region closest to you for lower latency:

    RegionCDP URL
    US Westwss://production-sfo.browserless.io?token=YOUR_API_TOKEN
    Europe UKwss://production-lon.browserless.io?token=YOUR_API_TOKEN
    Europe Amsterdamwss://production-ams.browserless.io?token=YOUR_API_TOKEN
  3. Verify the connection

    Confirm that OpenClaw can reach the Browserless endpoint:

    openclaw browser doctor

    Response

    OK gateway: browser control endpoint reachable
    OK plugin: enabled
    OK profile: browserless (cdp)
    OK browser: running
    OK profiles: 4 configured
    OK tabs: 1 visible, use tab reference t1

    Every line should start with OK. The tabs check matters most, because it proves OpenClaw can list pages in the Browserless session, not just open the connection. If any line shows FAIL, see the FAQ below.

    You can also start a quick browser session and take a screenshot to validate:

    openclaw browser start
    openclaw browser screenshot
  4. Use browser automation

    Once connected, OpenClaw's AI can use Browserless just like a local browser. Ask it to perform tasks in natural language through your preferred chat interface (WhatsApp, Discord, Slack, etc.):

    • "Go to example.com and take a screenshot"
    • "Fill out the contact form on browserless.io/practice-form"
    • "Scrape the pricing table from that page"

    OpenClaw will route all browser actions through Browserless automatically.

    Using the CLI directly

    You can also drive the browser with OpenClaw's CLI commands:

    # Navigate to a page
    openclaw browser navigate "https://example.com"

    # Take a snapshot (returns element references for interaction)
    openclaw browser snapshot --efficient

    # Click an element by reference
    openclaw browser click @e1

    # Take a full-page screenshot
    openclaw browser screenshot --full-page
    note

    Always take a new snapshot after every action – element references (@e1, @e2, etc.) become stale when the DOM changes.

Why use Browserless with OpenClaw?​

OpenClaw's built-in managed browser works well for local tasks, but cloud and headless deployments (servers, Docker, CI) have no display. Browserless solves this and adds a host of other features:

  • Stealth and anti-bot resilience – bypass bot detection that trips up standard Chromium
  • CAPTCHA and Cloudflare solving – automatically handle verification challenges
  • Residential proxies – rotate IPs to avoid rate limits and geo-restrictions
  • No local browser required – ideal for headless servers, Docker, and cloud VMs
  • Regional endpoints – choose US West, UK, or Amsterdam for lower latency

Keeping a local profile alongside Browserless​

You can define multiple profiles and switch between them. This is useful for local development (managed browser) and production (Browserless):

// ~/.openclaw/openclaw.json
{
browser: {
enabled: true,
defaultProfile: "browserless",
profiles: {
local: {
cdpPort: 18800
},
browserless: {
cdpUrl: "wss://production-sfo.browserless.io?token=YOUR_API_TOKEN"
}
}
}
}

Pass --browser-profile <name> to any openclaw browser command to use a different profile, or change defaultProfile in your config.

Running OpenClaw in NemoClaw or NVIDIA OpenShell​

NemoClaw runs OpenClaw inside an NVIDIA OpenShell sandbox, where your Browserless API token stays outside the sandbox. The setup there differs from the steps above. In NemoClaw, add Browserless as a hosted MCP server. NemoClaw pins an OpenShell release older than 0.1.8, so using Browserless from OpenClaw's built-in browser needs a separate OpenShell 0.1.8 or newer sandbox outside NemoClaw. See NVIDIA OpenShell and NemoClaw for both routes.

Additional resources​

FAQ & Troubleshooting​

How do I connect OpenClaw to Browserless?

Add a browserless profile to ~/.openclaw/openclaw.json with a cdpUrl pointing at your Browserless WebSocket endpoint and token, then set it as defaultProfile, as shown in step 2 above.

The gateway won't start after I edit openclaw.json

Run openclaw config validate. It lists every key OpenClaw doesn't recognize:

Config needs correction: ~/.openclaw/openclaw.json
- openclaw.json:7 — browser.profiles.browserless: Unrecognized key: "color"

Remove the keys it lists, then restart the gateway. Current OpenClaw releases reject remoteCdpTimeoutMs, remoteCdpHandshakeTimeoutMs, and per-profile color, so delete them if your config still has them.

openclaw browser doctor can't reach the Browserless profile

Check that your API token is correct and active in the Browserless dashboard, and that your firewall allows outbound HTTPS traffic on port 443. OpenClaw's connection timeouts are built in, so you can't raise them in openclaw.json. If the connection works but the tabs check fails, see the next question.

OpenClaw connects to Browserless, but tasks run in a local browser

Update OpenClaw with openclaw update, then restart the gateway.

This happens when a browser call on the browserless profile fails and the agent retries on the local openclaw profile. On older OpenClaw releases, a slow network path to the Browserless region triggers it, for example through a corporate proxy or from a region far from you. Those releases stop listing tabs after 3 seconds, and openclaw browser doctor reports:

FAIL tabs: GatewayClientRequestError: Error: Playwright page enumeration timed out after 3000ms

Current releases give tab listing more time on remote browsers. Also pick the region closest to you, and keep defaultProfile set to browserless so the agent starts there.

Snapshot, PDF, or AI snapshot calls return a 501 error

Reinstall or update OpenClaw with openclaw update, then restart the gateway. You don't need to install Playwright yourself.

OpenClaw runs these features through Playwright, which ships with OpenClaw as a core dependency. A 501 with Playwright is not available in this gateway build means your install is missing that dependency.

I'm hitting rate limit or plan errors

Browserless returns HTTP 429 when concurrency or request limits are exceeded. Check your usage in the Browserless dashboard and consider upgrading your plan.

Next steps​

Was this page helpful?