main
md 247 lines 8.87 KB
Rendered Raw
1 # Browser Guide
2
3 Agent Zero has a built-in Browser for real web pages.
4
5 Use it for research, forms, screenshots, UI review, downloads, extensions, and
6 anything else that works best in a browser.
7
8 ![Browser Canvas and tool history](../res/usage/browser/browser-canvas-wide.png)
9
10 ## Two Parts
11
12 The Browser has two connected parts:
13
14 - **The Browser tool:** the agent can browse even when the Browser surface is not open.
15 - **The Browser surface:** The right-side Canvas panel where you can watch and interact with the live Docker browser.
16
17 The Browser surface does not open automatically every time the agent browses.
18 Open it when you want to watch, steer, or annotate the page.
19
20 ## Open The Browser Surface
21
22 1. Open the right-side Canvas.
23 2. Select **Browser**.
24 3. Click **Open Browser** or the plus button to create a new browser tab.
25 4. Enter a URL in the Browser address bar.
26
27 ![Browser surface](../res/usage/browser/browser-canvas-example.png)
28
29 The surface shows Browser tabs, back/forward/reload controls, an address bar, an annotation toggle, and Browser settings.
30
31 ## Ask The Agent To Browse
32
33 You can ask naturally:
34
35 ```text
36 Use the Browser tool to open https://example.com, read the page content, and take a screenshot. Keep the response short.
37 ```
38
39 The agent can:
40
41 - open pages;
42 - read page content;
43 - click links and buttons;
44 - type into forms;
45 - upload files;
46 - take screenshots.
47
48 When a page is read, Agent Zero gets simple references such as `[link 1]`,
49 `[button 2]`, or `[input text 3]`. It can use those references to act on the
50 right part of the page.
51
52 <details>
53 <summary>Advanced Browser actions</summary>
54
55 ```text
56 list
57 state
58 set_active
59 navigate
60 back
61 forward
62 reload
63 hover
64 double_click
65 right_click
66 drag
67 scroll
68 evaluate
69 key_chord
70 mouse
71 wheel
72 keyboard
73 clipboard
74 set_viewport
75 multi
76 close
77 close_all
78 ```
79
80 </details>
81
82 ![Browser tool history](../res/usage/browser/browser-tool-history-expanded.png)
83
84 ## Screenshots And History
85
86 When Agent Zero takes a Browser screenshot, the image is saved and shown in the
87 chat history.
88
89 Many Browser steps also keep a small history screenshot. That means an older
90 chat can show the page as it looked when the agent worked on it, not just the
91 latest page frame.
92
93 ## Annotate Pages
94
95 Annotate mode lets you mark a page element or region and send a targeted comment back into the chat. This is useful for UI review: you can point at the exact thing that needs to change instead of describing it from memory.
96
97 1. Open the Browser surface.
98 2. Navigate to the page you want to review.
99 3. Click **Annotate**. The button changes to **Annotating**.
100 4. Click the page element or region.
101 5. Write the comment and click **Add**.
102
103 ![Browser annotation](../res/usage/browser/browser-annotation-comment.png)
104
105 ## Browser Settings
106
107 Open Browser settings from the Browser toolbar or from the Browser plugin settings.
108
109 ![Browser toolbar settings](../res/usage/browser/browser-toolbar-settings.png)
110
111 The toolbar menu includes:
112
113 - **Browser LLM Preset:** Optional model choice for Browser helper work.
114 - **Chrome Extensions:** Install a Chrome Web Store URL, create a new extension with Agent Zero, or scan an extension with Agent Zero.
115 - **Settings:** Opens the full Browser plugin settings.
116
117 ![Browser plugin settings](../res/usage/browser/browser-plugin-settings.png)
118
119 The full settings include:
120
121 - **Browser location:** Use the Docker browser or **Bring Your Own Browser** through A0 CLI.
122 - **Proxy:** Optionally route the Docker browser through an HTTP or SOCKS proxy, with bypass and authentication settings.
123 - **Page content access:** Controls host-browser page text and screenshots.
124 - **Starting page:** The default URL for new Browser sessions.
125 - **Autofocus active page:** Lets an already-open Browser surface follow the agent's browsing.
126 - **Extensions:** Choose which installed Chrome extensions load in the Docker browser.
127
128 ## Docker Browser
129
130 The Docker browser is the default. It is a separate browser inside Agent Zero's
131 Docker environment, and it is the browser shown in the live Browser surface.
132
133 Use Docker browser mode when you want a clean, separate browser that Agent Zero
134 can show in the Canvas.
135
136 In normal Docker installs, the needed browser is already included. In local
137 development, Agent Zero can install it the first time it is needed.
138
139 To use a proxy, enter its server in Browser settings, for example
140 `http://proxy.example:3128` or `socks5://proxy.example:1080`. Add an optional
141 comma-separated bypass list, username, and password when the proxy requires
142 them. Saving proxy changes restarts active Docker Browser sessions.
143
144 ## Bring Your Own Browser
145
146 Bring Your Own Browser lets Agent Zero use Chrome, Edge, Brave, Opera, Vivaldi,
147 or Chromium on your own computer through A0 CLI.
148
149 Use it when the page, login, or browser profile should stay on your machine.
150
151 Requirements:
152
153 - [ ] Keep A0 CLI connected to the Agent Zero chat.
154 - [ ] Choose **Bring Your Own Browser** in Browser settings.
155 - [ ] Use a Chromium-family browser on the host: Chrome, Edge, Brave, Opera, Vivaldi, or Chromium.
156 - [ ] For an already-open browser, open its remote debugging page and enable **Allow remote debugging for this browser instance**.
157
158 Remote debugging pages:
159
160 | Browser | Page |
161 | --- | --- |
162 | Chrome, Edge, Brave, Vivaldi, Chromium | `chrome://inspect/#remote-debugging` |
163 | Opera | `opera://inspect/#remote-debugging` |
164
165 The **Host browser** list shows Automatic, currently advertised debug endpoints,
166 and **Custom endpoint**. If a browser does not appear after enabling remote
167 debugging, restart or reconnect the local A0 CLI. Restarting only the Agent Zero
168 Web UI server does not refresh the browser inventory; the list comes from the
169 connected CLI.
170
171 As a fallback, launch the browser with an explicit debugging port and profile
172 directory:
173
174 ```bash
175 opera --remote-debugging-port=9222 --user-data-dir="$HOME/.config/a0-opera-debug"
176 ```
177
178 Then choose **Custom endpoint** in Browser settings and enter `localhost:9222`
179 or `http://localhost:9222`. A full DevTools WebSocket endpoint also works. The
180 same forms can be passed to A0 CLI:
181
182 ```bash
183 export A0_HOST_BROWSER_REMOTE_DEBUGGING_ENDPOINTS="http://localhost:9222"
184 ```
185
186 ![Host browser remote debugging setting](../res/usage/browser/host-browser-remote-debugging-setting.png)
187
188 The first time Agent Zero tries to operate that browser, Chrome shows an **Allow
189 remote debugging?** prompt. Click **Allow** if you trust the connected Agent Zero
190 instance and A0 CLI session.
191
192 ![Host browser remote debugging allow prompt](../res/usage/browser/host-browser-remote-debugging-allow.png)
193
194 > [!IMPORTANT]
195 > Remote debugging grants full control of that browser session, including access
196 > to saved data, cookies, site data, and navigation. Enable it only for browser
197 > instances you intend Agent Zero to control.
198
199 Browser settings decide what Agent Zero may do with page text and screenshots
200 from your own browser:
201
202 - **Local models only:** Block host-browser content and screenshots unless the active chat model is local.
203 - **Warn when using cloud:** Allow content and include a warning.
204 - **Allow:** Allow without warning.
205
206 > [!NOTE]
207 > The live Browser surface shows the Docker browser. When Agent Zero uses your
208 > host browser, page results and screenshots appear in the chat, but the live
209 > Canvas is not a stream of your personal browser window.
210
211 For setup details, profiles, and troubleshooting, see the [A0 CLI Connector guide](a0-cli-connector.md#host-browser).
212
213 ## Chrome Extensions
214
215 Browser can load Chrome extensions into the Docker browser.
216
217 Only enable extensions you trust. They run inside the Docker browser, but they
218 can still change what happens in that browser.
219
220 ## MCP Alternatives
221
222 Start with Agent Zero's built-in Browser.
223
224 Use an MCP browser option only when you specifically need another browser tool
225 or an external automation service.
226
227 Common alternatives include:
228
229 - Chrome DevTools MCP
230 - Playwright MCP
231 - Browser OS MCP
232
233 See [MCP Setup](mcp-setup.md) for MCP setup.
234
235 ## Troubleshooting
236
237 - **Browser says Chromium is missing:** Docker installs already include the browser. In local development, let Agent Zero install it on first use or preinstall it with `PLAYWRIGHT_BROWSERS_PATH=tmp/playwright patchright install chromium --no-shell`.
238 - **The Browser surface does not open automatically:** That is expected. Open the Browser surface manually or ask the agent to show it.
239 - **The Canvas does not follow the agent:** Enable **Autofocus active page** in Browser settings.
240 - **Bring Your Own Browser cannot start:** Keep A0 CLI connected, verify Browser location is **Bring Your Own Browser**, and check `/browser status` in A0 CLI.
241 - **Host-browser content is blocked:** Switch to a local model or change Browser **Page content access** from **Local models only** to **Warn when using cloud** or **Allow**.
242
243 ## Related
244
245 - [A0 CLI Connector](a0-cli-connector.md): host Browser setup, profiles, and CLI commands.
246 - [MCP Setup](mcp-setup.md): external browser tools when you need a different setup.
247 - [Desktop Guide](desktop.md): Linux GUI apps and LibreOffice Cowork in the Canvas.