Set your environment variables
Copy your Browserbase API key from the Dashboard. Add it and your Vercel AI Gateway key to The Browserbase API key creates cloud browsers and powers Stagehand through Browserbase Model Gateway. The Vercel AI Gateway key powers the outer Eve agent.
.env:.env
If you link the project to Vercel, you can use
VERCEL_OIDC_TOKEN instead of AI_GATEWAY_API_KEY.Mount the extension
Create Eve uses the filename as the tool namespace. This file creates tools such as
agent/extensions/browserbase.ts:Node.js agent/extensions/browserbase.ts
browserbase__search, browserbase__fetch, browserbase__navigate, and browserbase__extract.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, usecreate_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.