{"id":"26b99d4a-fce8-4686-855f-c9a3363efa97","entityType":"agent","slug":"shaihazher-browser-js","name":"browser-js","canonicalUrl":"https://www.xpersona.co/agent/shaihazher-browser-js","canonicalPath":"/agent/shaihazher-browser-js","generatedAt":"2026-10-09T08:20:03.699Z","source":"GITHUB_OPENCLEW","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":null},"description":"Lightweight CDP browser control for AI agents. Token-efficient alternative to the built-in browser tool — 3-10x fewer tokens per interaction. Use when browsing websites, clicking elements, filling forms, uploading files, or extracting page content. Requires a Chrome/Chromium browser running with --remote-debugging-port (OpenClaw browser works out of the box). Signed-in sessions carry over automatically. --- name: browser-js description: Lightweight CDP browser control for AI agents. Token-efficient alternative to the built-in browser tool — 3-10x fewer tokens per interaction. Use when browsing websites, clicking elements, filling forms, uploading files, or extracting page content. Requires a Chrome/Chromium browser running with --remote-debugging-port (OpenClaw browser works out of the box). Signed-in sessions carry","descriptionLabel":"Technical summary","evidenceSummary":"Published capability contract available. No trust telemetry is available yet. Last updated 4/15/2026.","installCommand":"git clone https://github.com/shaihazher/browser-js.git","sourceUrl":"https://github.com/shaihazher/browser-js","homepage":null,"primaryLinks":[{"label":"View Source","url":"https://github.com/shaihazher/browser-js","kind":"source"}],"safetyScore":94,"overallRank":30.5,"popularityScore":0,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Lightweight CDP browser control for AI agents. Token-efficient alternative to the built-in browser tool — 3-10x fewer tokens per interaction. Use when browsing "},"coverage":{"evidence":{"source":"capability-contract + public-profile","verified":true,"confidence":"high","updatedAt":"2026-02-24T19:41:52.639Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[{"label":"act","status":"self-declared"},{"label":"recursively","status":"self-declared"},{"label":"skip","status":"self-declared"},{"label":"bjs","status":"self-declared"}],"verifiedCount":0,"selfDeclaredCount":5,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"},{"key":"act","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"recursively","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"skip","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"bjs","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile capability:act|supported|profile capability:recursively|supported|profile capability:skip|supported|profile capability:bjs|supported|profile"}},"adoption":{"evidence":{"source":"no-adoption-signals","verified":false,"confidence":"low","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":"No source adoption metrics were available."},"stars":0,"forks":0,"downloads":null,"packageName":null,"latestVersion":null,"tractionLabel":null},"release":{"evidence":{"source":"agent-index","verified":false,"confidence":"medium","updatedAt":"2026-04-15T01:14:01.529Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T05:21:22.124Z","lastCrawledAt":"2026-04-15T01:14:01.529Z","lastIndexedAt":null,"nextCrawlAt":"2026-04-16T01:14:01.529Z","lastVerifiedAt":null,"highlights":[]},"execution":{"evidence":{"source":"capability-contract","verified":true,"confidence":"high","updatedAt":"2026-02-24T19:41:52.639Z","emptyReason":null},"installCommand":"git clone https://github.com/shaihazher/browser-js.git","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"ready","authModes":["api_key","oauth"],"requires":["openclew","lang:typescript"],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":"https://github.com/shaihazher/browser-js#input","outputSchemaRef":"https://github.com/shaihazher/browser-js#output","dataRegion":"global","contractUpdatedAt":"2026-02-24T19:41:52.639Z","sourceUpdatedAt":"2026-02-24T19:41:52.639Z","freshnessSeconds":19571891},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"GITHUB_OPENCLEW","generatedAt":"2026-10-09T08:20:03.699Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/shaihazher-browser-js/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":[],"safeUseWhen":["Contract is available with explicit auth and schema references.","Trust confidence is not low and verification freshness is acceptable."],"riskFlags":["trust_data_unavailable"],"operationalConfidence":"medium"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"GITHUB OPENCLEW","verified":false,"confidence":"high","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":null},"readme":"---\nname: browser-js\ndescription: Lightweight CDP browser control for AI agents. Token-efficient alternative to the built-in browser tool — 3-10x fewer tokens per interaction. Use when browsing websites, clicking elements, filling forms, uploading files, or extracting page content. Requires a Chrome/Chromium browser running with --remote-debugging-port (OpenClaw browser works out of the box). Signed-in sessions carry over automatically.\n---\n\n# browser-js\n\nLightweight CLI that talks to Chrome via CDP (Chrome DevTools Protocol). Returns minimal, indexed output that agents can act on immediately — no accessibility tree parsing, no ref hunting.\n\n## Setup\n\n```bash\n# Install dependency (one-time, in the skill scripts/ dir)\ncd scripts && npm install\n\n# Ensure browser is running with CDP enabled.\n# With OpenClaw:\n#   browser start profile=openclaw\n# Or manually:\n#   google-chrome --remote-debugging-port=18800 --user-data-dir=~/.browser-data\n```\n\nThe tool connects to `http://127.0.0.1:18800` by default. Override with `CDP_URL` env var.\n\n## Alias setup (optional)\n\n```bash\nmkdir -p ~/.local/bin\ncat > ~/.local/bin/bjs << 'WRAPPER'\n#!/bin/bash\nexec node /path/to/scripts/browser.js \"$@\"\nWRAPPER\nchmod +x ~/.local/bin/bjs\n```\n\n## Commands\n\n```\nbjs tabs                    List open tabs\nbjs open <url>              Navigate to URL\nbjs tab <index>             Switch to tab\nbjs newtab [url]            Open new tab\nbjs close [index]           Close tab\nbjs elements [selector]     List interactive elements (indexed)\nbjs click <index>           Click element by index\nbjs type <index> <text>     Type into element\nbjs upload <path> [selector] Upload file to input (bypasses OS dialog)\nbjs text [selector]         Extract visible page text\nbjs html <selector>         Get element HTML\nbjs eval <js>               Run JavaScript in page\nbjs screenshot [path]       Save screenshot\nbjs scroll <up|down|top|bottom> [px]\nbjs url                     Current URL\nbjs back / forward / refresh\nbjs wait <ms>\n\nCoordinate commands (cross-origin iframes, captchas, overlays):\nbjs click-xy <x> <y>       Click at page coordinates via CDP Input\nbjs click-xy <x> <y> --double   Double-click at coordinates\nbjs click-xy <x> <y> --right    Right-click at coordinates\nbjs hover-xy <x> <y>       Hover at page coordinates\nbjs drag-xy <x1> <y1> <x2> <y2>   Drag between coordinates\nbjs iframe-rect <selector> Get iframe bounding box (for click-xy targeting)\n```\n\n## How it works\n\n`elements` scans the page for all interactive elements (links, buttons, inputs, selects, etc.) — **including those inside shadow DOM** (web components). This means sites like Reddit, GitHub, and other modern SPAs that use shadow DOM are fully supported. The scan recursively pierces all shadow roots.\n\nReturns a compact numbered list:\n\n```\n[0] (link) Hacker News → https://news.ycombinator.com/news\n[1] (link) new → https://news.ycombinator.com/newest\n[2] (input:text) q\n[3] (button) Submit\n```\n\nThen `click 3` or `type 2 search query` — immediately actionable, no interpretation needed.\n\n**Auto-indexing:** `click` and `type` auto-index elements if not already indexed. You can skip calling `elements` first and go straight to `click`/`type` after `open`. Call `elements` explicitly when you need to see what's on the page.\n\n**After navigation or AJAX changes:** Elements get re-indexed automatically on next `click`/`type` if stamps are stale. For manual re-index, call `elements` again.\n\n**Real mouse events:** `click` uses CDP `Input.dispatchMouseEvent` (mousePressed + mouseReleased) instead of JS `.click()`. This triggers React/Vue/Angular synthetic event handlers that ignore plain `.click()` calls. Works reliably on SPAs like Instagram, GitHub, LinkedIn.\n\n## File uploads\n\n`upload` uses CDP's `DOM.setFileInputFiles` to inject files directly into hidden `<input type=\"file\">` elements — no OS file picker dialog. Works with Instagram, Twitter, any site with file uploads.\n\n```bash\nbjs upload ~/photos/image.jpg                    # auto-finds input[type=file]\nbjs upload ~/docs/resume.pdf \"input.file-drop\"   # specific selector\n```\n\n## Token efficiency\n\n| Approach | Tokens per interaction | Notes |\n|----------|----------------------|-------|\n| **bjs** | ~50-200 | Indexed list, 1-line responses |\n| browser tool (snapshot) | ~2,000-5,000 | Full accessibility tree |\n| browser tool + thinking | ~3,000-8,000 | Plus reasoning to find refs |\n\nOver a 10-step flow: **~1,500 tokens (bjs) vs ~30,000-80,000 (browser tool)**.\n\n## Typical flow\n\n```bash\nbjs open https://example.com       # Navigate\nbjs elements                        # See what's clickable\nbjs click 5                         # Click element [5]\nbjs type 12 \"hello world\"          # Type into element [12]\nbjs text                            # Read page content\nbjs screenshot /tmp/result.png      # Verify visually\n```\n\n## Shadow DOM support\n\nbjs automatically pierces shadow DOM boundaries. Sites built with web components (Reddit, GitHub, etc.) work out of the box — `elements`, `click`, `type`, and `text` all recurse into shadow roots. No special flags needed.\n\n## Coordinate commands (iframes, captchas, overlays)\n\nWhen you can't use `click` by index — e.g. the target is inside a **cross-origin iframe** (captcha checkbox, payment form, OAuth widget) — use coordinate-based commands that dispatch real CDP Input events at the OS level. These bypass all DOM boundaries.\n\n**Workflow for clicking inside an iframe:**\n```bash\nbjs iframe-rect 'iframe[title*=\"hCaptcha\"]'    # Get bounding box\n# Output: x=95 y=440 w=302 h=76 center=(246, 478)\n\nbjs click-xy 125 458                            # Click checkbox position\n```\n\n`iframe-rect` returns the iframe's position on the page. Add offsets to target specific elements inside it (e.g. a checkbox is typically near the left side).\n\n**Other uses:**\n- `hover-xy` — trigger hover menus, tooltips that need mouse position\n- `drag-xy` — slider controls, drag-and-drop, canvas interactions\n- `click-xy --double` — double-click to select text, expand items\n- `click-xy --right` — context menus\n\n**When to use coordinate commands vs `click`:**\n- `click <index>` — always preferred when the element shows up in `elements`\n- `click-xy` — only when the target is inside a cross-origin iframe or otherwise unreachable by DOM indexing\n\n## Tips\n\n- `elements` with a CSS selector narrows scope: `bjs elements \".modal\"`\n- `eval` runs arbitrary JS and returns the result — use for custom extraction\n- `text` caps at 8KB — enough for most pages, won't blow up context\n- `html <selector>` caps at 10KB — for inspecting specific elements\n- Pipe through `grep` to filter: `bjs elements | grep -i \"submit\\|login\"`\n","readmeExcerpt":"--- name: browser-js description: Lightweight CDP browser control for AI agents. Token-efficient alternative to the built-in browser tool — 3-10x fewer tokens per interaction. Use when browsing websites, clicking elements, filling forms, uploading files, or extracting page content. Requires a Chrome/Chromium browser running with --remote-debugging-port (OpenClaw browser works out of the box). Signed-in sessions carry","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# Install dependency (one-time, in the skill scripts/ dir)\ncd scripts && npm install\n\n# Ensure browser is running with CDP enabled.\n# With OpenClaw:\n#   browser start profile=openclaw\n# Or manually:\n#   google-chrome --remote-debugging-port=18800 --user-data-dir=~/.browser-data"},{"language":"bash","snippet":"mkdir -p ~/.local/bin\ncat > ~/.local/bin/bjs << 'WRAPPER'\n#!/bin/bash\nexec node /path/to/scripts/browser.js \"$@\"\nWRAPPER\nchmod +x ~/.local/bin/bjs"},{"language":"text","snippet":"bjs tabs                    List open tabs\nbjs open <url>              Navigate to URL\nbjs tab <index>             Switch to tab\nbjs newtab [url]            Open new tab\nbjs close [index]           Close tab\nbjs elements [selector]     List interactive elements (indexed)\nbjs click <index>           Click element by index\nbjs type <index> <text>     Type into element\nbjs upload <path> [selector] Upload file to input (bypasses OS dialog)\nbjs text [selector]         Extract visible page text\nbjs html <selector>         Get element HTML\nbjs eval <js>               Run JavaScript in page\nbjs screenshot [path]       Save screenshot\nbjs scroll <up|down|top|bottom> [px]\nbjs url                     Current URL\nbjs back / forward / refresh\nbjs wait <ms>\n\nCoordinate commands (cross-origin iframes, captchas, overlays):\nbjs click-xy <x> <y>       Click at page coordinates via CDP Input\nbjs click-xy <x> <y> --double   Double-click at coordinates\nbjs click-xy <x> <y> --right    Right-click at coordinates\nbjs hover-xy <x> <y>       Hover at page coordinates\nbjs drag-xy <x1> <y1> <x2> <y2>   Drag between coordinates\nbjs iframe-rect <selector> Get iframe bounding box (for click-xy targeting)"},{"language":"text","snippet":"[0] (link) Hacker News → https://news.ycombinator.com/news\n[1] (link) new → https://news.ycombinator.com/newest\n[2] (input:text) q\n[3] (button) Submit"},{"language":"bash","snippet":"bjs upload ~/photos/image.jpg                    # auto-finds input[type=file]\nbjs upload ~/docs/resume.pdf \"input.file-drop\"   # specific selector"},{"language":"bash","snippet":"bjs open https://example.com       # Navigate\nbjs elements                        # See what's clickable\nbjs click 5                         # Click element [5]\nbjs type 12 \"hello world\"          # Type into element [12]\nbjs text                            # Read page content\nbjs screenshot /tmp/result.png      # Verify visually"}],"parameters":{},"dependencies":[],"permissions":[],"extractedFiles":[],"languages":["typescript"],"docsSourceLabel":"GITHUB OPENCLEW","editorialOverview":"Lightweight CDP browser control for AI agents. Token-efficient alternative to the built-in browser tool — 3-10x fewer tokens per interaction. Use when browsing websites, clicking elements, filling forms, uploading files, or extracting page content. Requires a Chrome/Chromium browser running with --remote-debugging-port (OpenClaw browser works out of the box). Signed-in sessions carry over automatically. --- name: browser-js description: Lightweight CDP browser control for AI agents. Token-efficient alternative to the built-in browser tool — 3-10x fewer tokens per interaction. Use when browsing websites, clicking elements, filling forms, uploading files, or extracting page content. Requires a Chrome/Chromium browser running with --remote-debugging-port (OpenClaw browser works out of the box). Signed-in sessions carry","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":419,"uniquenessScore":62,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T08:20:03.699Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/github_openclew","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}