API Reference
browserTools
function browserTools(session): Tool<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>[];Defined in: tools/builtin/browser.ts:49
Build the browser_navigate, browser_click, and browser_type tools over a
BrowserSession.
Parameters
| Parameter | Type | Description |
|---|---|---|
session | BrowserSession | The backing BrowserSession. Required — there is no shipped default, because a real browser binds to a host. |
Returns
Tool<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>[]
[browser_navigate, browser_click, browser_type], ready for runAgent or a ToolRegistry.
Remarks
All three run ExecutionMode.Sequential: they drive one shared page, so
the loop must never run them concurrently. Each returns the resulting page,
shaped by formatBrowserSnapshot, so the model can pick the next
element's ref.
See
Example
await runAgent({ ...opts, tools: browserTools(mySession) });
// The model can now call: browser_navigate({ url: "https://example.com" })
// browser_click({ ref: "e3" })
// browser_type({ ref: "e1", text: "hello" })