Claw Relay — Browser Access for AI Agents
by @andreagriffiths11
Control a remote browser through Claw Relay using the CLI client. Use when you need to navigate authenticated websites, click buttons, fill forms, take scree...
clawhub install claw-relay-browser📖 About This Skill
name: claw-relay-openclaw description: Control a remote browser through Claw Relay using the CLI client. Use when you need to navigate authenticated websites, click buttons, fill forms, take screenshots, or read page content on a user's real browser — and your platform doesn't support MCP. Triggers on remote browser control, authenticated browsing, real browser, cookie-based access, browser relay.
Claw Relay — OpenClaw CLI Client
> If your platform supports MCP (Copilot CLI, Claude Desktop, Gemini CLI), use skills/browser/SKILL.md instead. This skill is for OpenClaw, nanobot, ZeroClaw, and other agents that call tools via exec.
⚠️ IMPORTANT: No MCP Required
Do NOT write an MCP server, bridge, or wrapper. You already have everything you need:
exec tool (built into OpenClaw)relay-client.cjs script (in this folder)That's it. One exec call per browser action. No MCP, no bridge, no custom server.
Setup
Set environment variables (or pass as flags):
export CLAW_RELAY_URL="wss://relay.clawrelay.dev/"
export CLAW_RELAY_TOKEN="your-token"
export CLAW_RELAY_AGENT="your-agent-id"
The client script is at skills/openclaw/relay-client.cjs in the claw-relay repo.
Usage
node relay-client.cjs [--url URL] [--token TOKEN] [--agent-id ID] ACTION [ARGS...]
Flags override env vars. Every invocation connects, authenticates, performs ONE action, prints JSON, and exits.
Actions
| Action | Args | Description |
|--------|------|-------------|
| navigate | | Navigate to URL |
| snapshot | — | Get accessibility tree with element refs |
| screenshot | [filepath] | Take screenshot; saves to filepath if given |
| click | | Click element by ref |
| fill | | Replace input content with text |
| type | | Append text to input |
| press | | Press keyboard key (Enter, Tab, Escape, etc.) |
| hover | | Hover over element |
| select | | Select dropdown option(s) |
| evaluate | | Run JavaScript in the page |
| close | — | Close the browser tab |
Workflow
navigate → snapshot → find ref → act → snapshot → verify
1. Navigate to the target URL
2. Snapshot to read the page and get element refs (e.g. e3, e7)
3. Act — click, fill, type, press using refs from the snapshot
4. Verify — snapshot again to confirm the page changed
Example: Search GitHub
# Step 1: Navigate
node relay-client.cjs navigate https://github.comStep 2: Snapshot to find the search input ref
node relay-client.cjs snapshotStep 3: Fill the search box (say ref is e3)
node relay-client.cjs fill e3 claw-relayStep 4: Press Enter
node relay-client.cjs press EnterStep 5: Snapshot to read results
node relay-client.cjs snapshot
Example: Click a Button
# Find the button
node relay-client.cjs snapshot
Output shows button at ref e7
Click it
node relay-client.cjs click e7Verify
node relay-client.cjs snapshot
Example: Take a Screenshot
node relay-client.cjs screenshot /tmp/page.png
Output: {"ok":true,"path":"/tmp/page.png","bytes":...}
Example: Run JavaScript
node relay-client.cjs evaluate "document.title"
OpenClaw exec Integration
Use the exec tool directly. Each call connects, authenticates, performs one action, and exits:
exec: node /path/to/relay-client.cjs snapshot
exec: node /path/to/relay-client.cjs navigate https://github.com
exec: node /path/to/relay-client.cjs click e3
Set CLAW_RELAY_URL, CLAW_RELAY_TOKEN, and CLAW_RELAY_AGENT in your environment or pass them as flags each time.
Do NOT try to keep a persistent connection, start a background process, or write wrapper scripts. The CLI handles connection lifecycle automatically.
Security Constraints
Troubleshooting
"Invalid token or agent_id"
config.yaml for exact casing (e.g., Rusty ≠ rusty)config.yaml"Agent lacks scope for 'navigate'"
scopes in config.yaml don't include the action you're trying to useread (snapshot/screenshot), navigate, interact (click/fill/type), execute (evaluate)Script errors
.cjs, not .js (the repo uses ES modules)npm install in the relay-server/ directory firstCommon mistakes
execWhat Makes This Different
Local browser tools require agent and browser on the same machine. Claw Relay doesn't. Your agent runs anywhere and controls the user's real browser remotely — real cookies, real sessions, real logins. No headless browser, no fake profiles.
💡 Examples
node relay-client.cjs [--url URL] [--token TOKEN] [--agent-id ID] ACTION [ARGS...]
Flags override env vars. Every invocation connects, authenticates, performs ONE action, prints JSON, and exits.
⚙️ Configuration
Set environment variables (or pass as flags):
export CLAW_RELAY_URL="wss://relay.clawrelay.dev/"
export CLAW_RELAY_TOKEN="your-token"
export CLAW_RELAY_AGENT="your-agent-id"
The client script is at skills/openclaw/relay-client.cjs in the claw-relay repo.
📋 Tips & Best Practices
"Invalid token or agent_id"
config.yaml for exact casing (e.g., Rusty ≠ rusty)config.yaml"Agent lacks scope for 'navigate'"
scopes in config.yaml don't include the action you're trying to useread (snapshot/screenshot), navigate, interact (click/fill/type), execute (evaluate)Script errors
.cjs, not .js (the repo uses ES modules)npm install in the relay-server/ directory firstCommon mistakes
exec