> For the complete documentation index, see [llms.txt](https://www.openclawbook.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openclawbook.xyz/en/ch04-conversation-and-tools/4.3-browser-tools-and-canvas.md). Agents can also search and read this documentation through its [MCP server](https://www.openclawbook.xyz/~gitbook/mcp).

# 4.3 Browser Tools and the Canvas

> **Generated by**: Claude Opus 5 (claude-opus-5\[1m]) **Token usage**: Input \~206,000 tokens, Output \~8,000 tokens (this section) **Source baseline**: `v2026.3.9` (`v2026.3.8-170-g665f67726`)

***

## 4.3.1 The Browser Tool: Navigation, Screenshots, Extraction

The browser tool drives a **real Chrome instance**, not a headless one (§24.5.1) — which means it carries a real fingerprint and can use your login state, and isn't blocked by the anti-bot detection that stops headless browsers.

### Getting started

```bash
openclaw browser status      # is a browser available?
```

The first use launches a managed Chrome with its own profile under `~/.openclaw/browser/`. **The window carries an orange marker** so you can tell at a glance that the agent is driving it rather than you.

### What to ask for

```
Open the GitHub trending page and summarize the top 5 TypeScript projects
```

```
Go to this URL, fill in the contact form with these details, and screenshot the confirmation
```

```
Check whether my order on this site has shipped
```

### How it actually works

The key mechanism is worth knowing because it explains the tool's behavior:

**The agent doesn't look at screenshots by default.** It takes a `snapshot` — an accessibility tree rendered as text, with a stable `ref` handle on every interactive element:

```
button "Sign in" [ref=e12]
textbox "Email" [ref=e13]
link "Forgot password?" [ref=e14]
```

Then it acts by reference: click `e12`, type into `e13`.

> **Semantics before pixels.** A page screenshot costs a vision model thousands of tokens; the accessibility tree costs hundreds, and referencing elements precisely beats guessing at coordinates. Screenshots are for when you want to *see* the result.

### Login state

Two options:

| Approach                      | Trade-off                                                                                                                           |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Managed profile** (default) | Isolated from your everyday browser; you log into sites once inside the agent's profile                                             |
| **Extension relay**           | Attaches to a tab in your own browser, reusing your existing sessions — convenient, but the agent is operating in your real browser |

For anything involving your real accounts, think about which you want. The managed profile keeps a boundary; the relay removes it.

### A default worth knowing

`ssrfPolicy.dangerouslyAllowPrivateNetwork` **defaults to `true`** — the browser may reach private network addresses.

That's reasonable for a personal machine at home (your LAN is yours). **On a shared or corporate network it's a hazard** — note the `dangerously` prefix, which is telling you exactly that.

## 4.3.2 Canvas: The A2UI Concept

Canvas is a programmable display surface the agent can push to your devices — a macOS, iOS, or Android node.

The idea: an agent that can only reply in text is limited. With a canvas it can **render a UI, then look at what it rendered and adjust**:

```
draw → screenshot → check → revise
```

The `canvas` tool supports present / hide / navigate / eval / snapshot, so the agent can display HTML or A2UI interfaces, run JavaScript in them, and screenshot to verify the result.

> **Canvas and the browser are complements**: the browser *operates external web pages*; the canvas is the agent's *own display*. One reaches out, the other shows you something.

## 4.3.3 Worked Examples

### Research and summarize

```
Compare the pricing pages of these three services and make me a table
```

The agent will open each page, snapshot it, extract the relevant text, and produce a comparison. Extraction from the accessibility tree is more reliable than scraping HTML because it sees what a user would see.

### Repetitive form filling

```
For each row in this CSV, submit the form at <url> with those values
```

Worth pairing with `browserArmDialog` behavior — the agent pre-arms dialog handling before triggering actions that pop dialogs (§24.5.3), which avoids the race where a dialog appears and blocks the page.

### Visual verification

```
Deploy the site, then screenshot the homepage on desktop and mobile widths
```

Here screenshots are the point rather than an expensive detour.

### One realistic caveat

Browser automation is the most fragile capability in the toolkit. Sites change layouts, require captchas, and detect automation. **Expect to iterate**, and prefer asking for outcomes ("find the price") over prescribing interactions ("click the third button").

***

## Section Summary

1. **The browser tool drives a real Chrome, not a headless one** — carrying a real fingerprint and evading anti-bot detection; the managed profile's window has an **orange marker** so you can tell the agent is driving.
2. **The agent works from an accessibility tree snapshot with stable `ref` handles, not screenshots** — semantics before pixels, an order of magnitude cheaper in tokens and more precise than coordinates.
3. **Two login approaches**: the managed profile (isolated, log in once inside it) or the extension relay (reuses your sessions, but the agent is in your real browser) — decide deliberately for real accounts.
4. **`dangerouslyAllowPrivateNetwork` defaults to `true`** — fine at home, a hazard on a shared network; the `dangerously` prefix is the warning.
5. **Canvas is the agent's own display; the browser operates external pages** — one shows you something, the other reaches out. The canvas enables a draw → screenshot → check → revise loop.
6. **Browser automation is the most fragile capability** — ask for outcomes rather than prescribing interactions, and expect iteration.
