Skip to main content

Browser Automation

browser(action=...) provides DOM-aware browser control via Chrome DevTools Protocol (CDP).

Overview

The Browser tool is the middle-layer interaction tool — it understands web page DOM structure and can precisely operate elements via CSS selectors or Accessibility Tree refs. Suitable for all web interaction scenarios.

Available Actions

Screenshot: Three Modes

1. URL Mode (running page)

2. HTML Injection Mode (zero-server)

Injects HTML via CDP Page.setDocumentContent. No server needed.

3. File Path Mode (local file)

Auto-starts bun serve and captures the file.

Accessibility Tree Workflow

Execution Backends

Difference from chrome