You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli/browser.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,19 @@ openclaw browser close t1
135
135
136
136
Raw target ids are volatile diagnostic handles, not durable agent memory: when Chromium replaces the underlying raw target during a navigation or form submit, OpenClaw keeps the stable `tabId`/label attached to the replacement tab when it can prove the match. Prefer `suggestedTargetId`.
137
137
138
-
## Snapshot / screenshot / actions
138
+
## Extract / snapshot / screenshot / actions
139
+
140
+
Answer a question from the current page without printing the page content:
141
+
142
+
```bash
143
+
openclaw browser extract "What is the main conclusion?"
- Question answering over readable page text without returning a full snapshot.
21
22
- Playwright-backed profiles save direct attachment navigations under the managed downloads directory and return `{ url, suggestedFilename, path }` metadata after final-URL policy validation.
22
23
- Playwright-backed agent actions return a `downloads` array with the same managed metadata when the action immediately starts one or more downloads.
23
24
- A bundled `browser-automation` skill that teaches agents the snapshot,
@@ -101,6 +102,12 @@ Plugin-bundled skills are listed in the agent's available skills when the
101
102
plugin is enabled. The full skill instructions load on demand, so routine
102
103
turns do not pay the full token cost.
103
104
105
+
For “read this page and answer X,” use browser `action="extract"` with a
106
+
`query`. It sends sanitized, bounded readable text through one model call and
107
+
returns only the answer; keep `snapshot` for choosing actions and obtaining
108
+
refs. Extraction requires a Playwright-backed profile and falls back to a
109
+
snapshot workflow when it cannot complete.
110
+
104
111
## Missing browser command or tool
105
112
106
113
If `openclaw browser` is unknown after an upgrade, `browser.request` is missing, or the agent reports the browser tool as unavailable, the usual cause is a `plugins.allow` list that omits `browser` and no root `browser` config block exists. Add it:
Copy file name to clipboardExpand all lines: extensions/browser/skills/browser-automation/SKILL.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,9 @@ Use this skill when you need the `browser` tool for anything beyond a single pag
21
21
-`suggestedTargetId` is the label when one exists, otherwise the stable `tabId` handle like `t1`.
22
22
- Avoid relying on raw DevTools `targetId` except for immediate diagnostics; it can change under Chromium target replacement.
23
23
3. Read before you click:
24
+
- For “read the page and answer X,” use `action="extract"` with `query` so only the answer returns.
25
+
- Use `action="snapshot"` instead when you need action refs or page structure.
26
+
- If extract returns `NOT_FOUND` or asks for snapshot fallback, inspect the page with a snapshot.
24
27
- Use `action="snapshot"` on the intended `targetId`.
25
28
- Use the same `targetId` for follow-up actions so refs stay on the same tab.
26
29
- For durable Playwright refs, request `refs="aria"` when supported. If you receive `axN` refs from `snapshotFormat="aria"`, use them only after that same snapshot call; stale or unbound `axN` refs fail fast and need a fresh snapshot.
0 commit comments