Files
wehub-resource-sync cb15c5e0d8
CI / Rust (windows-latest - x86_64-pc-windows-msvc) (push) Waiting to run
CI / Native E2E Tests (push) Blocked by required conditions
CI / Windows Integration Test (push) Blocked by required conditions
CI / Version Sync Check (push) Waiting to run
CI / Rust (push) Waiting to run
CI / Dashboard (push) Waiting to run
CI / Sandbox Package (push) Waiting to run
CI / Rust (macos-latest - aarch64-apple-darwin) (push) Waiting to run
CI / Rust (macos-latest - x86_64-apple-darwin) (push) Waiting to run
CI / Global Install (macos-latest) (push) Blocked by required conditions
CI / Global Install (ubuntu-latest) (push) Blocked by required conditions
CI / Global Install (windows-latest) (push) Blocked by required conditions
Release / Check for new version (push) Waiting to run
Release / Build macOS ARM64 (push) Blocked by required conditions
Release / Build macOS x64 (push) Blocked by required conditions
Release / Build Linux ARM64 (push) Blocked by required conditions
Release / Build Linux musl ARM64 (push) Blocked by required conditions
Release / Build Linux musl x64 (push) Blocked by required conditions
Release / Build Linux x64 (push) Blocked by required conditions
Release / Build Windows x64 (push) Blocked by required conditions
Release / Publish to npm (push) Blocked by required conditions
Release / Publish sandbox package to npm (push) Blocked by required conditions
Release / Create GitHub Release (push) Blocked by required conditions
chore: import upstream snapshot with attribution
2026-07-13 12:35:58 +08:00
..

agent-browser sandbox helpers

This example shows how to use @agent-browser/sandbox in two places:

  • eve/ is a scaffold-style Eve app with a sandbox-backed browser tool.
  • vercel/ uses @vercel/sandbox directly from a Node script.

The package installs agent-browser in the sandbox and runs commands there, not in the serverless function or app runtime.

Eve

Run the Eve app from its own directory:

cd eve
pnpm install
vercel link --yes --scope <team-or-user> --project <project>
vercel env pull .env.local --yes
pnpm run dev

The app follows the project shape created by eve init --channel-web-nextjs. Its agent/sandbox.ts bootstrap installs Chromium system dependencies, agent-browser, and Chrome once into the sandbox template. The browser_snapshot tool opens a URL and returns an accessibility snapshot to the agent.

Vercel Sandbox

Run the direct Vercel example from this directory:

pnpm install
vercel link --yes --scope <team-or-user> --project <project>
vercel env pull .env.local --yes
node vercel/snapshot-url.mjs https://example.com

The script loads .env.local when it is present, so local runs can use the OIDC token pulled by the Vercel CLI. On Vercel, the OIDC token is provided by the runtime.

For production, create and reuse a Vercel Sandbox snapshot so fresh requests do not reinstall system dependencies and Chrome.