Demo | Browserbase | Stagehand
An AI-powered research agent that runs 5 parallel browser sessions to search the web in real-time. Watch AI agents browse Google, Wikipedia, YouTube, Hacker News, and Google News simultaneously, then synthesize findings into a comprehensive summary.
Deploy this template to Vercel with one click. The Vercel Marketplace will automatically prompt you to set up Browserbase.
git clone https://github.com/browserbase/browserbase-nextjs-templatecd research-agent-template
npm install# orpnpm install
cp .env.example .env.local
Edit .env.local with your API keys:
# Vercel AI Gateway API Key# Get yours at: https://vercel.com/docs/ai-gatewayAI_GATEWAY_API_KEY=your_ai_gateway_key# Browserbase (for cloud browser sessions)# Get yours at: https://browserbase.comBROWSERBASE_PROJECT_ID=your_project_idBROWSERBASE_API_KEY=your_api_key
npm run dev
Navigate to http://localhost:3000
| Variable | Description | Required |
|---|---|---|
AI_GATEWAY_API_KEY | Vercel AI Gateway API key for Claude access | Yes |
BROWSERBASE_API_KEY | Your Browserbase API key | Yes |
BROWSERBASE_PROJECT_ID | Your Browserbase project ID | Yes |
Enter a Query: Type any research question or select from example queries:
Watch the Research: See 5 browser windows researching in parallel, each exploring a different source
Get Results: Receive findings from each source as they complete, followed by an AI-synthesized summary
# Development servernpm run dev# Production buildnpm run build# Start production servernpm run start# Lint codenpm run lint
├── app/│ ├── api/│ │ └── research/│ │ └── route.ts # Research API with parallel Stagehand sessions│ ├── components/ # React components│ ├── context/ # Research context provider│ ├── results/ # Results page│ ├── page.tsx # Home page│ └── layout.tsx # Root layout├── public/ # Static assets└── .env.example # Environment variables template
MIT