Agent Zero AI framework
Document host browser tab reuse workflow
Update the Browser tool prompt and plugin DOX so agents list and activate existing tabs by URL or title before opening new host-browser tabs.
Alessandro committed
Jun 3, 2026 at 03:45 UTC
d871b2e0d7a87acc42afff1ea9dbecec34b7f45d
2 files changed
+3
-1
plugins/AGENTS.md
+1
@@ -48,6 +48,7 @@
48
- Keep plugin README and docs current when user-visible plugin behavior changes.
49
- Check configuration before injecting setup or discovery banners so configured plugins do not keep advertising setup.
50
- Use highly unique banner IDs prefixed by plugin name.
51
+- Browser tool prompts must preserve the existing-tab workflow: when a user refers to an already-open URL, tab, or page title, guide agents to `list` and then `set_active` or `navigate` by `browser_id` instead of blindly opening a new tab.
52
- When preparing community plugins, keep plugin contents at the standalone repository root with `plugin.yaml`, `README.md`, and a root `LICENSE`.
53
- Plugin Index submissions use a separate `index.yaml` under `a0-plugins/plugins/<name>/`; do not confuse it with runtime `plugin.yaml`.
54
plugins/_browser/prompts/agent.system.tool.browser.md
+2
-1
@@ -14,7 +14,8 @@ Actions: `open`, `list`, `state`, `set_active`, `navigate`, `back`, `forward`, `
14
Common args: `action`, `browser_id`, `url`, `ref`, `target_ref`, `text`, `selector`, `selectors`, `script`, `modifiers`, `keys`, `key`, `include_content`, `focus_popup`, `event_type`, `x`, `y`, `to_x`, `to_y`, `delta_x`, `delta_y`, `button`, `quality`, `full_page`, `path`, `paths`, `value`, `values`, `checked`, `width`, `height`, `calls`.
15
16
Workflow:
17
-- `open` creates a tab and returns id/state.
17
+- `open` creates a tab and returns id/state. In host-browser mode, if the requested URL is already open, the host may reuse and activate that existing tab.
18
+- If the user asks for an existing tab, page title, or already-open URL, call `list` first, match by `title` or `currentUrl`, then use `set_active` or `navigate` on that `browser_id` instead of opening a new tab.
19
- `content` returns markdown with refs like `[link 3]`, `[button 6]`, `[input text 8]`.
20
- Interactions use refs from the latest `content` capture.
21
- For same-page controls that are easier to identify structurally, `click`, `type`, `submit`, `type_submit`, `scroll`, `select_option`, `set_checked`, and `upload_file` may use `selector` instead of `ref`; the tool resolves the selector through `content` first.