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

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",
    remoteCdpTimeoutMs: 2000,
    remoteCdpHandshakeTimeoutMs: 4000,
    profiles: {
    browserless: {
    cdpUrl: "wss://production-sfo.browserless.io?token=YOUR_API_TOKEN",
    color: "#FF4500"
    }
    }
    }
    }

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

    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 status

    You should see the browserless profile listed as reachable. If the profile shows as unreachable, double-check your API token and network connectivity.

    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,
color: "#0066CC"
},
browserless: {
cdpUrl: "wss://production-sfo.browserless.io?token=YOUR_API_TOKEN",
color: "#FF4500"
}
}
}
}

Switch profiles on any command with the ?profile=<name> parameter, or change defaultProfile in your config.

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.

openclaw browser status shows the Browserless profile as unreachable

Verify your API token is correct and active in the Browserless dashboard. If it still fails, increase remoteCdpTimeoutMs and remoteCdpHandshakeTimeoutMs in your config, and check that outbound HTTPS traffic on port 443 is allowed by your firewall.

I'm getting 501 errors on snapshot, PDF, or AI snapshot features

These advanced OpenClaw browser features require Playwright. Install it with npm install playwright.

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