# @agent-browser/eve An [eve](https://eve.dev) extension that gives your agent a full browser automation tool set, backed by [agent-browser](https://agent-browser.dev) running inside the agent's sandbox. Mount it once and the agent gets ~20 namespaced tools — navigation, accessibility snapshots with stable element refs, clicking, form filling, semantic element finding, waiting, screenshots, JavaScript evaluation, tab management, network and console inspection — without writing a single tool by hand. ## Install ```bash npm install @agent-browser/eve ``` `eve` is a peer dependency; the extension runs on the eve installed in your app. ## Mount Create a mount file under `agent/extensions/`. The file name becomes the tool namespace: ```ts // agent/extensions/browser.ts import browser from "@agent-browser/eve"; export default browser({}); ``` That's it. The agent now has `browser__navigate`, `browser__snapshot`, `browser__click`, and the rest, plus an instructions fragment teaching the model the snapshot-refs workflow. On first tool use in a fresh sandbox, the extension installs agent-browser (and Chromium plus its system libraries) automatically. For production, pre-install in your sandbox bootstrap instead so sessions start from a warm template: ```ts // agent/sandbox.ts import { agentBrowserRevalidationKey, installAgentBrowser } from "@agent-browser/eve/sandbox"; import { defineSandbox } from "eve/sandbox"; import { vercel } from "eve/sandbox/vercel"; export default defineSandbox({ backend: vercel({ resources: { vcpus: 2 } }), revalidationKey: () => agentBrowserRevalidationKey(), async bootstrap({ use }) { const sandbox = await use(); await installAgentBrowser(sandbox); }, }); ``` `@agent-browser/eve/sandbox` also exports `runAgentBrowser` for calling agent-browser from a hand-written eve tool. It derives a short, stable session name from the eve sandbox id; pass `session` when multiple independent browser sessions should share one sandbox. ## Configuration All fields are optional: ```ts export default browser({ // Safety allowedDomains: ["example.com", "*.example.com"], // restrict navigation and sub-resources caCert: "/etc/ssl/certs/proxy-ca.pem", clearCaCert: false, contentBoundaries: true, // wrap page output in markers the model can recognize maxOutputChars: 50_000, // truncate page output // Output inlineScreenshots: true, // embed screenshots in tool output as data URLs for channels/UIs // (hidden from the model via toModelOutput; capped at 4 MB per image) // Install behavior autoInstall: true, // install agent-browser on first use when missing installSpec: "agent-browser@0.31.2", // defaults to the version matching this package installBrowser: true, // download Chromium during auto-install installSystemDependencies: true, // apt/dnf Chromium libraries during auto-install // Session & runtime session: undefined, // fixed session name; defaults to one derived from the sandbox id sessionPrefix: "eve", // prefix for the derived session name binary: "agent-browser", // binary name or path inside the sandbox proxy: undefined, // proxy server URL }); ``` ## Tools | Tool | Purpose | | --- | --- | | `navigate` | Open a URL, or go back/forward/reload | | `snapshot` | Accessibility tree with `@eN` element refs (the primary way to see a page) | | `read` | Page as agent-friendly text/markdown, `llms.txt` aware | | `click` | Click or double-click an element | | `fill` | Type into an input (clearing first by default) | | `press_key` | Press a key or combination (`Enter`, `Control+a`) | | `hover` | Hover an element | | `select_option` | Pick a `