code are the tools; the prompts are what you would say to the agent.
1. Get a tab
Open the login page of app.example.com in my browser.The agent calls
browser_status if it has not yet, then browser_tabs {action: "new", url, browserId} using the selected extension browser’s ID. The tab opens in that browser’s current window, in the background by default, and becomes the agent’s default target. If you already had the page open and shared, it uses that tab instead.
For a developer browser, open the tab with mode: "dev" and its context. Pass the returned tabId on subsequent calls when working across browsers. Chrome, Brave, Firefox and Zen use the same workflow; Firefox and Zen have documented exceptions, including literal multiline text input.
2. Look
browser_snapshot returns the accessible tree with refs:
diff: true on later snapshots to read only what changed, or browser_read {what: "text", ref} to read one region.
3. Act
Several steps can go in one
browser_batch to save round trips:
4. Verify
browser_waitpolls for text to appear or disappear, the URL to contain a string, or a ref to become visible, hidden or enabled. Default timeout 15 seconds.browser_screenshotfor the viewport,fullPage: true, or oneref. PNG by default, JPEG withquality.browser_snapshot {diff: true}shows what the last action changed.
Interruptions
- A click that triggers
alert,confirm,promptorbeforeunloadreturns at once and reports the dialog.browser_dialog {accept, promptText}resolves it;browser_statuslists open dialogs. - A click that hits a breakpoint set through
devtools_debuggeralso returns at once and says the page is paused, so the agent can inspect and resume. - Navigations wait for the load event, including back and forward restored from the back-forward cache and same-document navigations.
Things that do not work by design
- Browser shortcuts through
browser_key(open DevTools, switch tabs, reload). Keys go to the page only. Usebrowser_navigate {action: "reload"}and thedevtools_*tools. - Automating
chrome://pages, extension pages or the Chrome Web Store. - Reaching a tab you have not shared.
