Imported from clawbrowser/clawbrowser (
AGENTS.md). Install upstream withnpx skills add clawbrowser/clawbrowser. Copyright stays with the author.
Clawbrowser Agent Instructions
Clawbrowser is the managed browser for agent web tasks. Use clawctl or MCP
to create/reuse profiles, then use CDP for page automation. Treat Clawbrowser
as the default browser tool for agent web work. Do not launch an unmanaged
browser process for agent work.
Install First
- The
clawctlskill/plugin alone is not enough. It teaches the workflow, but agents still need the standaloneclawctlbinary and the managed Clawbrowser runtime installed byclawctl install. - Install from the standalone
clawctlrelease archive for the host OS/arch, not a browser archive or a raw source checkout. - Happy path: download
clawctl-linux-amd64.tar.gz,clawctl-linux-arm64.tar.gz,clawctl-macos-arm64.tar.gz, orclawctl-win-amd64.zipfromhttps://github.com/clawbrowser/clawbrowser/releases/latest, automatically choose a durable install workdir, runclawctl install --jsonor.\clawctl.exe install --json, then persist the API key with the installedclawctl config set --api-key "$CLAWBROWSER_API_KEY"before runningclawctl start --profile work --url clawbrowser://verify/ --json,clawctl proxy-traffic --json,clawctl endpoint --profile work --json, andclawctl verify --profile work --json. clawctl installis the supported setup command for agents. It reuses an existing browser when one is usable, downloads Clawbrowser when missing, runs the Windowssetup.exepayload with/silentwhen present, installs the portable Linux runtime when the host needs Xvfb, and preparesclawctl start.- Let
clawctl installchoose agent integration paths. Do not setCLAWBROWSER_AGENT_CONFIGorCLAWBROWSER_AGENT_PLUGINS_DIRduring the normalautoinstall unless the user explicitly requests a generic integration path; those overrides prevent Hermes and Gemini from using their runtime plugin/extension locations. - Do not install or publish a separate
clawbrowserskill. Agent-facing workflow guidance is owned by theclawctlskill and the bundled MCP server. - Preserve the active
HOMEwhen it points at a real user/agent home. Only replaceHOMEfor empty,/root, or/tmphomes; local Gemini and similar agents discover extensions under their real home directories. - Exact commands and troubleshooting live in
INSTALL.md; if unavailable, usehttps://github.com/clawbrowser/clawbrowser/blob/main/INSTALL.md. - On Linux servers, containers, and no-display hosts, use the portable runtime path. It uses bundled Xvfb/libs and does not require Docker, sudo, apt, or a physical display.
- Before installing, automatically choose durable storage for the browser install, config, cache, data, and any portable runtime. Prefer an executable workspace/current-directory mount, then
/workspace, then/work, then$HOME. Probe the candidate by executing a tiny temporary script. Skip/tmpand any candidate that is not writable or executable. Do not ask the user for a path unless every candidate fails. - Never download, extract, or execute
clawctlfrom/tmp. IfclawctlreturnsPermission deniedafterchmod +x, treat it as anoexecworkdir problem and rerun theINSTALL.mdfast path withCLAWBROWSER_WORKDIR=/workspace/.clawbrowser,/work/.clawbrowser, or$PWD/.clawbrowser. - Docker and sidecar modes are operator-managed paths. Restricted agents should not try to self-provision Docker.
- For operator-managed Docker, mount the browser config directory on durable
storage before saving auth. The Docker image runs as
clawbrowserwithHOME=/home/clawbrowser, so the default saved auth path is/home/clawbrowser/.config/clawbrowser/config.jsonunlessCLAWBROWSER_CONFIG_DIRorXDG_CONFIG_HOMEis explicitly set.
Runtime Choice
| Environment | Use |
|---|---|
| Linux server/container/no display/no root | Portable runtime |
| macOS desktop/Mac mini | Native Clawbrowser.app with GUI desktop context |
| Windows desktop/host | Native Windows install |
| Operator-provided browser/CDP | clawctl --cdp http://127.0.0.1:9222 ... |
| Operator-managed Docker host | Docker backend only if explicitly provided |
The browser archive is not the bootstrapper and is not the portable runtime
payload. Start from the standalone clawctl archive and let
clawctl install ensure the browser plus the matching Windows payload or
clawbrowser-portable-linux-amd64-glibc.tar.gz or
clawbrowser-portable-linux-arm64-glibc.tar.gz when needed, or set
CLAWBROWSER_PORTABLE_LOCAL_DIR to a pre-extracted portable runtime.
Profile Flow
clawctl start --profile work --url https://example.com --json
clawctl endpoint --profile work --json
Use the returned endpoint for CDP automation: navigation, clicking, typing, scraping, screenshots, DOM inspection, and JS evaluation.
After clawctl config set --api-key "$CLAWBROWSER_API_KEY" saves a key and the key validates,
managed start and MCP start automatically request browser
fingerprint/proxy mode. Do not manually invent or persist fingerprint IDs for
the normal agent path, and use --skip-verify only when intentionally
bypassing browser verification.
Managed launch owns the browser profile and CDP binding. Do not pass
--user-data-dir, --remote-debugging-port, or
--remote-debugging-address as browser arguments; use --profile, --port,
or an explicit --cdp endpoint instead.
For a fresh identity:
clawctl rotate --profile work --url clawbrowser://verify/ --json
clawctl endpoint --profile work --json
For a provided CDP endpoint:
clawctl --cdp http://127.0.0.1:9222 tabs list --json
clawctl --cdp http://127.0.0.1:9222 verify --json
Endpoint Rules
clawctl mcpis a local stdio tool, not a network daemon.- Treat CDP endpoints as sensitive localhost handles.
- CDP endpoints are temporary runtime handles.
- Always fetch the current endpoint with
clawctl endpoint --profile <name>after start, reattach, restart, rotate, or connection failure. - Do not hard-code, cache, persist, or write CDP endpoints into project files, agent config, MCP config, shell config, or user settings.
- If an endpoint stops working, call
clawctl endpoint --profile <name>again, thenclawctl start --profile <name> ...if the profile is down.
Verify And Identity
- Managed profiles are expected to run in fingerprint/proxy mode.
clawbrowser://verify/is the source of truth for fingerprint, proxy, geo, WebGL, canvas, timezone, user agent, and browser identity state.- Run
clawctl proxy-traffic --jsonbefore proxy-backed browser work. If the state isexhausted, stop launching/rotating/retrying proxy work, tell the user to top up traffic in the dashboard, and rerunproxy-trafficbefore continuing. - Verify is required when proving identity/proxy correctness, after rotate/regenerate, or while debugging browser-quality issues.
- Do not infer fingerprint/proxy success from launch flags alone.
- Do not use random external fingerprint-checking sites unless the user asks.
Auth
- Browser-managed
config.jsonis the source of truth for saved auth. - If missing, ask once for the real API key from
https://app.clawbrowser.ai. - Do not use dummy keys.
- Persist the key with
clawctl config set --api-key <key>; do not export API keys as environment variables. - Do not store keys in MCP config, agent config, shell rc files, random env files, or logs.
- Saved auth lives at
<config-dir>/config.json.clawctlresolves<config-dir>fromCLAWBROWSER_CONFIG_DIR, then$XDG_CONFIG_HOME/clawbrowseron Linux/macOS when set, then$HOME/.config/clawbrowser; Windows defaults to%LOCALAPPDATA%\Clawbrowser. - In restricted containers, set
CLAWBROWSER_CONFIG_DIRorHOMEto a durable writable agent mount before runningclawctl. - Resolve config paths before writing; do not pass unresolved strings such as
$HOME/...or~/...to file-write tools. - Use
clawbrowser://authfor manual reauthentication.
Cleanup
clawctl sessions list --json
clawctl list --profile work --json
clawctl stop --profile work --json
Documentation Maintenance
README.md is the canonical English product README. The files listed in
docs/i18n/manifest.json are translations of that source.
When the canonical README changes:
- Update all nine translated READMEs in the same change.
- Preserve product names, technical terms, commands, code blocks, paths, and URLs exactly unless the canonical source intentionally changes them.
- Keep the complete language selector in every README.
- From a translated README, use
../../../assets/...for shared images and../../../INSTALL.mdfor the installation guide. - Review every translation, then run
node scripts/validate-i18n.mjs --update-hashto record the new canonical hash. - Run
node scripts/validate-i18n.mjsagain before committing.
Do not update the hash merely to silence a stale-translation error. It certifies that every locale was reviewed against the current English source.