|
| 1 | +# Example Eve browser agent |
| 2 | + |
| 3 | +This agent mounts the local `@browserbasehq/eve` extension as `browserbase`, so |
| 4 | +its tools are available as `browserbase__create_session`, |
| 5 | +`browserbase__navigate`, `browserbase__observe`, `browserbase__act`, |
| 6 | +`browserbase__extract`, `browserbase__agent`, and |
| 7 | +`browserbase__stop_session`. It also exposes `browserbase__search` and |
| 8 | +`browserbase__fetch`, which do not require a browser session. |
| 9 | + |
| 10 | +## Run it |
| 11 | + |
| 12 | +From the repository root, enter the `eve` package directory: |
| 13 | + |
| 14 | +```bash |
| 15 | +cd packages/eve-browserbase |
| 16 | +nvm use |
| 17 | +pnpm install |
| 18 | +pnpm build |
| 19 | +cp ../../examples/integrations/vercel/eve-example/.env.example ../../examples/integrations/vercel/eve-example/.env |
| 20 | +``` |
| 21 | + |
| 22 | +Fill in the values in `../../examples/integrations/vercel/eve-example/.env`, |
| 23 | +then start the agent from the same `packages/eve-browserbase` directory: |
| 24 | + |
| 25 | +```bash |
| 26 | +pnpm --filter browserbase-eve-example dev |
| 27 | +``` |
| 28 | + |
| 29 | +Eve requires Node.js 24 or newer. Both workspace packages include an `.nvmrc` |
| 30 | +for Node 24.16.0. If that version is not installed yet, run |
| 31 | +`nvm install 24.16.0` before `nvm use`. |
| 32 | + |
| 33 | +The Eve terminal UI opens. Try this prompt: |
| 34 | + |
| 35 | +```text |
| 36 | +Open https://news.ycombinator.com and return the titles and URLs of the first |
| 37 | +five stories. Use a Browserbase session and stop it when you are done. |
| 38 | +``` |
| 39 | + |
| 40 | +The environment requires: |
| 41 | + |
| 42 | +- `BROWSERBASE_API_KEY` to create the cloud browser and power Stagehand through |
| 43 | + Browserbase Model Gateway. |
| 44 | +- `AI_GATEWAY_API_KEY` to power the Eve agent model. A linked Vercel project's |
| 45 | + `VERCEL_OIDC_TOKEN` can be used instead. |
| 46 | + |
| 47 | +The dependency on `@browserbasehq/eve` uses pnpm's `workspace:*` protocol, so |
| 48 | +the example exercises the local package without publishing it first. The |
| 49 | +workspace-level install provides dependencies for both packages. |
0 commit comments