Vercel Deployment
Run AGENT BROWSER automations inside Vercel Serverless Functions and Edge Runtime using the official sandbox package.
Install the sandbox
npm install @agent-browser/sandboxExample: Vercel function
app/api/automate/route.ts
import { createSandbox } from "@agent-browser/sandbox";
export async function GET(request: Request) {
const sandbox = await createSandbox();
await sandbox.open("https://example.com");
const snapshot = await sandbox.snapshot();
await sandbox.close();
return Response.json({ snapshot });
}Configuration
The sandbox automatically uses the AGENT BROWSER cloud backend when deployed to Vercel. No additional configuration required for basic usage.
Vercel environment variables
# Optional: specify a region
AGENT_BROWSER_REGION=iad1
# Optional: custom timeout
AGENT_BROWSER_TIMEOUT=60000