docs/src/app/eve/page.mdx
@agent-browser/eve mounts the full agent-browser tool set into an eve agent. The tools run agent-browser inside the agent sandbox, so the browser process, downloads, screenshots, and state stay out of the Next.js runtime.
pnpm add @agent-browser/eve
eve is a peer dependency and should already be present in an eve app. The sandbox preinstall helpers shown below ship with the same package, so no other install is needed.
Create an extension mount under agent/extensions/. The file name becomes the tool namespace.
// agent/extensions/browser.ts
import browser from "@agent-browser/eve";
export default browser({
allowedDomains: ["example.com", "*.example.com"],
maxOutputChars: 50000,
});
The agent gets namespaced tools such as browser__navigate, browser__snapshot, browser__click, browser__fill, browser__find, browser__screenshot, browser__console, and browser__network_requests.
The extension can install agent-browser, Chromium, and required Linux libraries on first tool use. For production, install them in the eve sandbox template so sessions start warm.
// 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);
},
});
Common options:
allowedDomains restricts navigation and subresources.contentBoundaries wraps page output in boundary markers.maxOutputChars truncates large page output.inlineScreenshots embeds screenshots as data URLs for channels that can render them.autoInstall, installSpec, installBrowser, and installSystemDependencies control first-use installation.session and sessionPrefix control browser session naming.binary points at the agent-browser executable inside the sandbox.proxy configures browser proxy use.Have the agent navigate, snapshot, then act on snapshot refs. Snapshot refs like [ref=e12] become @e12 selectors for interaction tools.
Inspect https://example.com and summarize what is visible.
For reading articles or docs, prefer browser__read. For apps, use browser__snapshot before interaction and resnapshot after page changes.
Cookie, storage, and saved-auth-state commands are intentionally not exposed by the extension because they can reveal credential material to the model. Use standard eve extension overrides when you need to disable a tool, add approval requirements, or provide an app-specific guarded tool.
See examples/eve for a complete Next.js eve app with the extension mounted.