Skip to content

Browser Automation & Scraping

OpenClaw allows your agent to control a dedicated Chrome/Brave/Edge/Chromium profile. This provides a safe, isolated environment for browser automation and web scraping, distinct from your personal browsing session.

  • Isolation: Keeps agent activity separate from your personal work.
  • Safety: Prevents the agent from accidentally closing your tabs or leaking your session data.
  • Capabilities: Enables full automation (snapshots, PDF generation, screenshots, complex interactions).
  • Multi-Profile: Support for multiple isolated profiles (e.g., work, research, testing).
  1. Check Status Verify if the browser service is ready.

    Terminal window
    openclaw browser --browser-profile openclaw status
  2. Start the Browser Launch the managed browser instance.

    Terminal window
    openclaw browser --browser-profile openclaw start
  3. Open a Page Direct the agent to a URL.

    Terminal window
    openclaw browser --browser-profile openclaw open https://example.com
  4. Take a Snapshot See what the agent sees.

    Terminal window
    openclaw browser --browser-profile openclaw snapshot
ProfileDescriptionUse Case
openclawManaged, isolated browser instance.Recommended. Best for automation, scraping, and testing.
chromeExtension relay to your system browser.Use when the agent needs access to your logged-in sessions (requires Chrome Extension).

To use the managed browser by default, set browser.defaultProfile: "openclaw" in your config.

Browser settings are located in ~/.openclaw/openclaw.json.

{
browser: {
enabled: true, // Master switch
// cdpUrl: "http://127.0.0.1:18792", // Legacy override
remoteCdpTimeoutMs: 1500, // Timeout for remote CDP checks
remoteCdpHandshakeTimeoutMs: 3000,
defaultProfile: "chrome", // Change to "openclaw" for isolation
color: "#FF4500", // UI tint color
headless: false, // Set true for background operation
noSandbox: false,
attachOnly: false, // "true" = never launch, only attach
executablePath: "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser",
profiles: {
openclaw: { cdpPort: 18800, color: "#FF4500" },
work: { cdpPort: 18801, color: "#0066CC" },
remote: { cdpUrl: "http://10.0.0.42:9222", color: "#00AA00" }
}
}
}

If your system default browser is Chromium-based, OpenClaw uses it automatically. You can force a specific browser executable if needed.

Terminal window
openclaw config set browser.executablePath "/usr/bin/google-chrome"

OpenClaw supports flexible deployment models:

  1. Local Control (Default): Gateway runs locally, launches browser locally.
  2. Remote Control (Node Host): Gateway runs elsewhere, but uses a “Node Host” on your machine to control the browser.
  3. Remote CDP: Gateway connects directly to a remote debugger (e.g., a browser in a Docker container or another server).

You can connect to a remote browser instance using a CDP URL.

  • Query Token: https://provider.example?token=<token>
  • Basic Auth: https://user:pass@provider.example

Browserless provides a hosted Chromium service, perfect for serverless deployments or when you don’t want to manage local browser resources.

{
browser: {
enabled: true,
defaultProfile: "browserless",
profiles: {
browserless: {
cdpUrl: "https://production-sfo.browserless.io?token=<BROWSERLESS_API_KEY>",
color: "#00AA00"
}
}
}
}

Drive your existing Chrome tabs (with your login sessions) using the Chrome Extension.

  1. Install Extension Load the extension in “Developer Mode”.

    Terminal window
    openclaw browser extension install

    Navigate to chrome://extensions, enable Developer Mode, and “Load Unpacked” from the path provided.

  2. Attach to Tab Click the OpenClaw icon on the tab you want to control. The badge will show ON.

  3. Control via Agent The agent can now use the chrome profile to interact with that tab.

    Terminal window
    openclaw browser --browser-profile chrome tabs

For a full guide, see Chrome Extension.

Common issues and how to solve them.

  1. Take a Snapshot: openclaw browser snapshot --interactive to see what the agent sees.
  2. Check Console: openclaw browser console --level error for page errors.
  3. Highlight: openclaw browser highlight <ref> to verify element targeting.
  4. Trace: openclaw browser trace start / stop to record a Playwright trace for deep analysis.

See Browser CLI Reference for a complete list of commands.