# Browser Automation

Use when the agent must open a URL, fill a form, click through a flow, screenshot a...

- Repository: https://github.com/coco-research/coco (797 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add coco-research/coco --skill browser-automation -g -a claude-code -y`
Codex: `npx skills add coco-research/coco --skill browser-automation -g -a codex -y`
Cursor: `npx skills add coco-research/coco --skill browser-automation -g -a cursor -y`
Gemini CLI: `npx skills add coco-research/coco --skill browser-automation -g -a gemini-cli -y`

## Description

Use when the agent must open a URL, fill a form, click through a flow, screenshot a page, or extract data from a live page. Covers two providers (agent-browser local CLI, agentic-browser cloud) and the shared @e ref workflow.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Browser Automation

Browser automation for AI agents with two provider options. Both share the same core workflow: navigate, snapshot, interact using `@e` refs, re-snapshot after changes.

| Provider | Runtime | Best For |
|----------|---------|----------|
| agent-browser | Local (Playwright CLI) | Local testing, iOS Simulator, file:// URLs |
| agentic-browser | Cloud (inference.sh) | Video recording, cloud execution, parallel sessions |

**Default to agent-browser; use agentic-browser only when the task needs recording, cloud IPs, or more than 2 parallel sessions.** They share the same `@e` ref workflow.

---

## Core Workflow (Both Providers)

Every browser automation follows this pattern:

1. **Navigate**, Open a URL
2. **Snapshot**, Get `@e` refs for interactive elements
3. **Interact**, Use refs to click, fill, select
4. **Re-snapshot**, After navigation or DOM changes, get fresh refs

**Important: Refs are invalidated after navigation.** Always re-snapshot after clicking links/buttons, form submissions, or dynamic content loading.

---

## Provider 1: agent-browser (Local CLI)

### Quick Start

```bash
agent-browser open https://example.com/form
agent-browser snapshot -i
# Output: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Submit"

agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i  # Check result
```

### Essential Commands

```bash
# Navigation
agent-browser open <url>              # Navigate
agent-browser close                   # Close browser

# Snapshot
agent-browser snapshot -i             # Interactive elements with refs
agent-browser snapshot -i -C          # Include cursor-interactive elements
agent-browser snapshot -s "#selector" # Scope to CSS selector

The rest: https://github.com/coco-research/coco/blob/HEAD/skills/browser-automation/SKILL.md
