# Agent Browser

Drives a real browser in the sandbox to open pages, fill forms, and extract data.

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

## Install

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

## Description

Use when the task needs a real web browser inside the sandbox - open a page, click, fill forms, take screenshots, extract or scrape data, test a web app, or use a site that needs a login. Drives the preinstalled agent-browser CLI; ask the user with ask_user whether to run visibly (headed) or invisibly (headless) before the first browser command. This is NOT the local_browser tool, which controls the user's own Chrome on their computer.

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

# agent-browser (browser inside the sandbox)

The CLI is already installed. Do not install it again, do not run
`agent-browser install`, and never install a browser yourself: the sandbox
pins its own Google Chrome. Run it with shell_exec and without skill_name.
Every call is one command; the browser stays open between calls.

## Start here

This file is only the map. Load the real usage guide from the CLI itself, so
the instructions always match the installed version:

```sh
agent-browser skills get core        # workflows, common patterns, troubleshooting
agent-browser skills get core --full # adds the full command reference
agent-browser skills list            # specialized guides bundled with the CLI
```

For quick tasks the loop below is enough; read `core` before anything harder
(waits, iframes, multiple tabs, downloads, auth flows).

## Basic loop

```sh
agent-browser open https://example.com   # no --headed: runs headless
agent-browser snapshot -i          # interactive elements as @e1, @e2, ...
agent-browser click @e2
agent-browser fill @e3 "text to type"
agent-browser screenshot /workspace/output/page.png
agent-browser close                # closes the browser; the screen stays
```

Run `snapshot -i` again after every page change: refs from an older snapshot
go stale. `agent-browser --help` lists every other command.

## Screens

Before the first browser command of a task, ask the user with `ask_user`
whether to run visibly or invisibly. Visible means adding `--headed` to the
launch (the browser window appears on their Desktop tab); invisible means
leaving it off (headless). Apply the choice to the whole task; do not re-ask
for every command. If the user does not care, headless. A captcha, 2FA code
or password still needs the headed window: ask the user to type it there,
never in the chat.

## Rules

The rest: https://github.com/Tencent/WeKnora/blob/HEAD/internal/application/service/builtin_skills/agent-browser/SKILL.md
