open-browser-agent
/open-browser-agent
Use when an AI agent needs to automate, browse, inspect, scrape, click, fill forms, or interact with web pages and web applications using the open-browser-agent MCP server or CLI
- Author
- motailab ↗
- Repository
- open-browser-agent ↗
- Licence
- Apache-2.0
- Last repository change
- 05.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 5
No signals detected. Repository changed on 05.11.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Use when an AI agent needs to automate, browse, inspect, scrape, click, fill forms, or interact with web pages and web applications using the open-browser-agent MCP server or CLI
Original author description
Use when an AI agent needs to automate, browse, inspect, scrape, click, fill forms, or interact with web pages and web applications using the open-browser-agent MCP server or CLI
How it works
- Overview
- When to Use
- The Two Agent Modes
- 3-Tier Inspection Strategy (Token & Speed Efficiency)
- Quick Reference Table
- Controlling Real Desktop Chrome via Extension Bridge
- Crucial Agent Behavioral Rules
SKILL.md preview
---
name: open-browser-agent
description: Use when an AI agent needs to automate, browse, inspect, scrape, click, fill forms, or interact with web pages and web applications using the open-browser-agent MCP server or CLI
---
# Open Browser Agent Skill
## Overview
The `open-browser-agent` is an open, platform-independent browser automation harness inspired by the state-of-the-art architectures of ChatGPT and Claude browser agent extensions. It allows any AI agent to control a real Chromium/Chrome/Edge browser via a persistent JavaScript REPL (`js` tool) or granular MCP tools.
## When to Use
- Browsing the web, navigating multi-step web applications, and scraping live data.
- Clicking buttons, filling forms, and interacting with modern SPAs and web controls.
- Inspecting web pages using accessibility trees (`tab.ax`), Playwright locators (`tab.playwright`), or markdown conversion (`tab.content.markdown()`).
- Automated testing and visual verification via screenshots.
### When NOT to Use
- Simple static HTTP requests where `fetch` or `curl` is sufficient (no JavaScript execution or authentication needed).
- Direct API integrations when an official REST/GraphQL API already exists.
---
## The Two Agent Modes
### 1. Code REPL Mode (`js` tool) — Recommended for Autonomous Coding Agents
Call the `js` tool with `{ code: string }`. All handles are exposed globally.
```javascript
// State persists across turns! Use `const` for handles and `let` for variables
await tab.goto('https://news.ycombinator.com');
const items = await tab.playwright.locator('.titleline > a').allInnerTexts();
let topPost = items[0];
return items.slice(0, 5);
```
On the next turn, `topPost` is still defined in scope:
```javascript
console.log('Continuing from previous turn:', topPost);
await tab.goto('https://news.ycombinator.com/item?id=...');
return await tab.content.markdown();
```
### 2. Granular Tool Mode — For Function-Calling Agents
If your harness prefers individual tool calls:
- `browser_navigate`: `{ url: "https://example.com" }`
- `browser_extract_content`: `{ format: "markdown" }`
- `browser_get_accessibility_tree`: `{}`
- `browser_click`: `{ axId: 13 }` or `{ selector: "button:has-text('Submit')" }`
- `browser_type`: `{ text: "search query", axId: 16 }`
- `browser_screenshot`: `{ fullPage: false }`
---
## 3-Tier Inspection Strategy (Token & Speed Efficiency)
Follow this tiered strategy to understand page state without burning context tokens:
```
┌────────────────────────────────────────────────────────┐
│ Tier 1: tab.content.markdown() │
│ Fastest & cheapest. Read text, headings, links, tables.│
└──────────────────────────┬─────────────────────────────┘
│ Need to click or type?
▼
┌────────────────────────────────────────────────────────┐
│ Tier 2: tab.ax.get() (Accessibility Tree) │
│ Returns numbered integer IDs: [13] button "Sign in" │
│ Target directly with: await tab.ax.click(13) │
└──────────────────────────┬─────────────────────────────┘
│ Visual layout verification?
▼
┌────────────────────────────────────────────────────────┐
│ Tier 3: tab.screenshot() │
│ Use ONLY when visual verification/images are required. │
└────────────────────────────────────────────────────────┘
```
---
## Quick Reference Table
| Target Action | REPL Code Example (`js` tool) | Granular MCP Tool |
| :--- | :--- | :--- |
| **Navigate** | `await tab.goto('https://...')` | `browser_navigate` |
| **Get Markdown** | `return await tab.content.markdown()` | `browser_extract_content` |
| **Get AX Tree** | `return await tab.ax.get()` | `browser_get_accessibility_tree` |
| **Click AX Element** | `await tab.ax.click(13)` | `browser_click` with `axId` |
| **Click Selector** | `await tab.playwright.locator('button').click()` | `browser_click` with `selector` |
| **Type into Input** | `await tab.ax.write('Hello', { elementId: 16 })` | `browser_type` with `axId` |
| **Fill Selector** | `await tab.playwright.locator('input').fill('text')` | `browser_type` with `selector` |
| **Press Key** | `await tab.playwright.page.keyboard.press('Enter')` | `browser_press_key` |
| **Take Screenshot** | `return await tab.screenshot({ encoding: 'base64' })` | `browser_screenshot` |
| **Evaluate JS** | `return await tab.playwright.evaluate(() => document.title)` | `browser_evaluate` |
| **New Tab** | `const newTab = await tabs.new()` | `browser_new_tab` |
| **List Tabs** | `return await tabs.list()` | `browser_get_tabs` |
---
## Controlling Real Desktop Chrome via Extension Bridge
When the user wants you to automate an active, logged-in session (e.g., private dashboards, Twitter/X, Reddit, Google Docs), use the local HTTP bridge rather than a fresh headless browser:
1. **Verify Bridge Status**:
```bash
npm run status
```
2. **Execute Actions**:
```bash
TOKEN=$(cat ~/.open-browser-agent/bridge-token.txt)
curl -s -X POST http://127.0.0.1:8765/exec \
-H "Content-Type: application/json" \
-H "X-Agent-Bridge-Token: $TOKEN" \
-d '{"command": "<NAVIGATE|CLICK|TYPE|SCROLL|TAKE_SCREENSHOT|CLEANUP>", "params": { ... }}'
```
3. **Mandatory Cleanup**:
Always execute `{"command": "CLEANUP"}` on completion to close agent tabs and detach debugger sessions.
---
## Crucial Agent Behavioral Rules
1. **REPL Variables Persist**: Variables declared with `let` or `const` persist in the session across turns. Do not re-fetch pages or re-declare handles unless the session restarted.
2. **Prefer AX IDs Over Brittle Selectors**: Complex dynamic classes change constantly. Numbered IDs from `await tab.ax.get()` (`[14] button "Submit"`) are stable and immune to obfuscated CSS classes.
3. **Check State Before Proceeding**: After clicking or submitting forms, check the cheapest state (Tier 1 markdown or Tier 2 AX tree) to confirm navigation succeeded before issuing more actions.
4. **Never Blindly Repeat Failed Actions**: If an interaction fails, inspect visible state for popups, modals, or error banners.
5. **Handle Dialogs**: If a page shows a browser alert or confirmation dialog, handle it via `const dialog = await tab.getJsDialog(); await dialog.accept();`.
6. **Takeover / 2FA**: If the page requires CAPTCHA solving, SMS 2FA, or credit card authorization, ask the user to complete it in the browser rather than attempting to bypass security checks.
Versions
The database has no other skills named open-browser-agent.
Database snapshot: 13.11.2026 · package version 671d792422b6 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95agent-browser
Web browser automation CLI for AI agents. Use when the user needs to initialize or verify browser automation, interact with websites, navigate pages, fill forms, click buttons, take screenshots, extract data, test web apps, log in to sites, or automate any browser task. - 87agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a… - 95agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a… - 95agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a… - 95agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a… - 95agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a…