A one-install package that lets any Vercel eve agent browse the web with a
Browser Use cloud browser. Goal: turn the multi-hour manual integration
(which we did by hand in ~/Projects/lab/eve-lab) into:
npm i @browser_use/eve && npx @browser_use/eve add
# set BROWSER_USE_API_KEY → agent can browse@vercel/connect— a third-party package that plugs into eve via per-framework subpath exports (./eve,./mcp,./ai-sdk, …), no scaffolder, users call a factory in a one-line file. This is our closest analog.- eve channels — adapter lives in the package (
eve/channels/slack), the user's file isexport default slackChannel({...}), and a catalog +eve channels addscaffolder writes it. We copy the catalog/scaffolder UX for@browser_use/eve add.
Subpath exports, each a small factory:
| Subpath | Factory | Backed by (lab) |
|---|---|---|
@browser_use/eve/sandbox |
browserUseSandbox(opts) → defineSandbox |
agent/sandbox/sandbox.ts |
@browser_use/eve/skill |
browserUseSkill(opts) → defineSkill |
agent/skills/browser-harness.md |
@browser_use/eve/tools |
openCloudBrowser / stopCloudBrowser → defineTool |
(new, hardened mode) |
@browser_use/eve/connection |
browserUseConnection(opts) → defineMcpClientConnection |
(alt "mcp" mode) |
bin: @browser_use/eve |
add scaffolder + catalog |
mirrors eve channels add |
Thin files the user ends up with (they own these; logic stays in the package):
// agent/sandbox/sandbox.ts
import { browserUseSandbox } from "@browser_use/eve/sandbox";
export default browserUseSandbox();
// agent/skills/browser-use.ts
export { default } from "@browser_use/eve/skill";browserUseSandbox({ mode, proxyCountryCode, profile, timeoutMinutes, stopOnSessionEnd, approval, networkPolicy, liveUrl }) — maps to real
start_remote_daemon options + eve HITL/network primitives. No args = sensible defaults.
- TS, built with tsup (or unbuild) → dual ESM + per-subpath
.d.ts;files: ["dist"]. - peerDependencies:
eve,zod(NOT bundled). Pin a tested compat range — we learned eveai@7-beta/@ai-sdk/provider@4-betaalignment is load-bearing. exportsmap mirrors@vercel/connect.
- Keep an
examples/minimal-agent/eve app in the repo. - Smoke test: boot
eve dev --no-ui, POST a session ("open example.com, report title"), assert the agent used browser-harness + got the page. (This is literally the test we ran.) - Optional: an
eve evalsuite as the CI gate.
npm publish— unscoped@browser_use/eve(no org/scope needed), optionally--provenance.- README: 3-line quickstart + the config table.
- Get listed in eve's Integrations gallery (coordinate w/ Vercel) — same slot as Linear/Notion.
- Cross-link from Browser Use docs;
npx @browser_use/eve@latest addworks without pre-install. - Releases via changesets; document supported eve version range; CI matrix vs eve versions.
- MVP —
sandbox+skill, autospawn mode, manual file add. (≈ port lab code.) - Hardened — app-runtime provisioning +
BU_CDP_WS(key out of sandbox) + open/stop tools + billing cleanup. - Scaffolder —
@browser_use/eve add+ catalog +.envreminder. - MCP mode —
connectionsubpath +add --mode mcp. - Ship — npm publish + docs + gallery PR.
- Name/scope:
@browser_use/eve. - Driver: TS-native —
browser-harness-js(Bun CLI) in the sandbox +browser-use-sdk(Cloud SDK) in the app runtime. Nouv/Python. - Default mode: hardened (key out of sandbox); autospawn-style opt-in later.
- v1 scope: harness-in-sandbox only; MCP mode fast-follow.
- Home: prototype in
~/Projects/lab/browser-use-eve, move to abrowser-useorg repo to publish.
The key (BROWSER_USE_API_KEY) lives ONLY in the app runtime. The sandbox only ever sees a scoped WebSocket URL.
- Provision (app runtime,
onSession).const b = await new BrowserUse().browsers.create(opts)→{ id, cdpUrl, liveUrl }. (browser-use-sdkBrowserUse,client.browsers.create→POST /api/v2/browsers;cdpUrlisstring|null, pollbrowsers.get(id)if null.) - Resolve wss.
cdpUrlis HTTPS;browser-harness-jsneedswss. FetchGET <cdpUrl>/json/version→webSocketDebuggerUrl. - Inject. Write the wss (NOT the key) into the sandbox at
/workspace/.bu-cdp. Keepb.idapp-side for teardown. - Driver in sandbox.
bootstrapinstallsbrowser-harness-js: obtain the CLI, symlink onto PATH, first call auto-installs Bun (BROWSER_HARNESS_SKIP_BUN_INSTALLto control). The package ships a tinybhwrapper that auto-session.connect({ wsUrl: <contents of /workspace/.bu-cdp> })on first use, so the skill's ergonomics stay "just run bh". - Drive. Agent runs CDP snippets:
bh 'await session.Page.navigate({url})',bh 'await session.use(...)', etc. (Raw typed CDP — no helper layer.) - Teardown (billing).
await client.browsers.stop(b.id)(PATCH /browsers/{id} {action:"stop"}) — via astop_cloud_browsertool and/or an eve teardown hook; also set a cloud-browser timeout as a backstop.
- HTTPS
cdpUrl→wssresolution via/json/version(don't pass HTTPS toWebSocket). cdpUrlmay benullwhile provisioning → pollbrowsers.get(id).- Bun must exist in the sandbox (auto-install on first call, or pre-bake into the image).
stop(id)must be idempotent and run in afinally/teardown; cloud browsers bill until timeout.browser-harness-jshas NO url env/flag — template the wss into theconnect()snippet (thebhwrapper does this).
Because browser-harness-js exposes raw typed CDP (session.Domain.method), the skill teaches the model the 4–5 routing primitives it needs: listPageTargets(), session.use(targetId), session.Page.navigate, session.Runtime.evaluate, session.waitFor(...). (Different from the Python harness's new_tab/page_info helpers.)
- Skeleton ✅ — package.json (exports map mirrors
@vercel/connect), tsconfig, tsup, peerDepseve+zod, depbrowser-use-sdk. - Core ✅ —
@browser_use/eve/sandbox(install + PATH) and@browser_use/eve/skill(raw-CDP, async-IIFE output pattern). - Tools ✅ —
open_cloud_browser(provision via SDK → resolve wss → inject → connect, enables Page/Runtime) /stop_cloud_browser(teardown + billing). - Scaffolder ✅ —
@browser_use/eve add(idempotent,--force, dep/key nudges). - Test ✅ — validated against eve-lab via
eve dev --no-ui+ HTTP session: agent opened a cloud browser, read "Example Domain", stopped it. (Still TODO: commit anexamples/minimal-agent+ automate as CI/eval.) - Ship — repo
browser-use/eve(private) done; TODO:npm publishas@browser_use/eve, README, gallery PR.
proxyCountryCode / profileId / timeout from browserUseSandbox(opts) → the
open_cloud_browser tool's createCloudBrowser(opts) (the SDK + CloudBrowserOptions
already accept them; just need to thread config from the factory to the tool).