Skip to main content
This guide adds Browserbase to an Eve agent. You’ll give the agent Search and Fetch for lightweight web context plus a persistent browser for interactive pages.
1

Create an Eve agent

Eve requires Node.js 24 or newer. Create a project, then enter its directory:
2

Install the Browserbase extension

Add the Browserbase extension to your project:
3

Set your environment variables

Copy your Browserbase API key from the Dashboard. Add it and your Vercel AI Gateway key to .env:
.env
The Browserbase API key creates cloud browsers and powers Stagehand through Browserbase Model Gateway. The Vercel AI Gateway key powers the outer Eve agent.
If you link the project to Vercel, you can use VERCEL_OIDC_TOKEN instead of AI_GATEWAY_API_KEY.
4

Mount the extension

Create agent/extensions/browserbase.ts:
Node.js agent/extensions/browserbase.ts
Eve uses the filename as the tool namespace. This file creates tools such as browserbase__search, browserbase__fetch, browserbase__navigate, and browserbase__extract.
5

Configure the agent model

Create or update agent/agent.ts:
Node.js agent/agent.ts
6

Guide the agent's browser use

Add these instructions to agent/instructions.md:
7

Run the agent

Start Eve’s terminal interface:
Try this prompt:
Open the Sessions dashboard to watch the agent use the browser.

Choose the right browser tool

For predictable runs, use create_session, navigate, observe, and then act or extract. Use agent when the task needs Stagehand to plan several browser steps on its own. Always call stop_session after the task.

Example agent

Compare your project with the complete runnable example.

Extension source

Review the extension’s tools, configuration, and session lifecycle.