Overview

The Stagehand + Next.js Quickstart is a production‑ready template that pairs Stagehand’s AI browser automation with a modern Next.js app, deployable in one click on Vercel.

What you get

App Router project

Next.js App Router scaffold with Tailwind styling

Server‑safe automation

Uses Browserbase for cloud browsers (works on Vercel functions)

Prewired config

stagehand.config.ts with model + provider switching

Automation ready

Example usage of Stagehand primitives

Requirements

  • Node 18+ locally
  • Model key: OpenAI or Anthropic (or plug a custom client)
  • Browserbase keys: BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID for cloud browsers
Local Playwright browsers are not available on Vercel. Set Stagehand to Browserbase when deploying.