Stagehand Research Agent is a Next.js 15 starter template that uses Stagehand and Browserbase to run five parallel browser sessions for real-time web research, then synthesizes findings via Claude. Built by the Browserbase team, it deploys to Vercel with one click and streams results using Server-Sent Events.
What is the Stagehand Research Agent?
The template is a complete, MIT-licensed application that takes a research question as input and outputs a structured Markdown summary. It runs on Next.js API Routes with a 300-second max duration, and its frontend is built with React 19, TypeScript, and Tailwind CSS 4. The backend orchestrates five concurrent Stagehand sessions on Browserbase, each assigned to a different source: Google, Wikipedia, YouTube, Hacker News, and Google News.
Key Features
- Parallel Browser Sessions — Launches 5 simultaneous Stagehand sessions on Browserbase, each exploring a separate source for the same query.
- Live Browser Views — The interface shows each AI agent's navigation in real time, letting you watch searches happen across all five windows.
- AI-Powered Extraction — Claude Sonnet via Vercel AI Gateway extracts relevant information from each page using structured schemas.
- Smart Synthesis — Claude combines all extracted findings into one formatted summary, rendered with ReactMarkdown.
- Real-time Streaming — Server-Sent Events push each source's findings to the frontend as they finish, followed by the final synthesis.
- Example Queries — The home page ships with presets like 'What is quantum computing?' and 'Latest developments in AI' for instant demos.
- Vercel-First Deployment — The repository includes a Vercel Marketplace integration that automatically prompts you to set up Browserbase during deploy.
Who is it for?
- Developers building AI agents — Use this as a base for any multi-session browser automation project, not just research; the parallel-session pattern is reusable.
- Product teams prototyping research tools — The SSE streaming and structured extraction schemas can be adapted for dashboards, internal search, or monitoring products.
- Hackathon participants — One-click Vercel deployment with automatic Browserbase provisioning lets you get a working demo running in minutes without managing cloud infrastructure.
What can you do with it?
- Research assistants: Automate collection of information from five web sources at once and get a single synthesized answer for topics like 'How does blockchain work?'.
- Competitive intelligence: Modify the router to point sessions at competitor websites and stream structured findings into a report.
- Data extraction agents: Customize the Claude extraction schemas to pull specific data points (headlines, prices, stats) from a defined set of URLs.
How does it work?
The flow is: enter a query → the API route creates 5 parallel Stagehand sessions on Browserbase → each session navigates to its assigned source and uses Claude to extract relevant data → findings stream back to the UI via SSE → a final Claude call synthesizes everything into a Markdown summary.
FAQ
Does the Stagehand Research Agent require paid services?
Yes. It requires a Browserbase account and API key and a Vercel AI Gateway API key, both of which have their own pricing and quotas. The template code itself is free under the MIT license.
What AI model does it use?
The backend uses Claude Sonnet via Vercel AI Gateway. Both the extraction and synthesis steps rely on Claude with structured schemas.
Can I deploy it outside Vercel?
The code is standard Next.js, but the API route is configured for a 300-second max duration, which matches Vercel's serverless limits. Running elsewhere would require adjusting runtime settings for long-running functions.
How long does research take?
Results stream as each source completes, so partial findings appear before all five sessions finish. Total time depends on Browserbase session startup and page load speeds, but the parallel design reduces wall-clock time compared to sequential browsing.
What are the example queries?
The repo includes three presets: 'What is quantum computing?', 'Latest developments in AI', and 'How does blockchain work?'.








