From The Agentic Web, this starter kit is your launchpad for building agentic AI on the web. It provides a clean architecture that's ready-to-fork and production-focused, inspired by OpenAI's Operator concept.
This template gives you a practical starting point for creating a web agent that can use a browser to perform tasks on your behalf.
First, install the dependencies for this repository. This requires pnpm.
pnpm installNext, copy the example environment variables:
cp .env.example .env.localYou'll need to set up your API keys:
- Get your OpenAI API key from OpenAI's dashboard
- Get your Browserbase API key and project ID from Browserbase
Update .env.local with your API keys:
OPENAI_API_KEY: Your OpenAI API keyBROWSERBASE_API_KEY: Your Browserbase API keyBROWSERBASE_PROJECT_ID: Your Browserbase project IDGOOGLE_GENERATIVE_AI_API_KEY: Your Google Generative AI API key (optional, for Gemini)
Then, run the development server:
pnpm devOpen http://localhost:3000 with your browser to see the Web Agent in action.
This starter kit demonstrates a core agentic pattern: converting a user's natural language intent into browser operations. It uses a simple agent loop that takes a high-level goal, breaks it down, and executes it in a headless browser.
This approach provides a robust foundation for building more complex agents. You can extend it with more tools, memory, and multi-agent workflows as described in the Agentic Patterns Library.
This starter kit integrates battle-tested technologies to provide a production-ready starting point:
- Next.js: Provides the modern web framework foundation.
- OpenAI: Enables natural language understanding and decision-making.
- Browserbase: Powers the core browser automation and interaction capabilities.
- Stagehand: Handles precise DOM manipulation and state extraction.
We welcome contributions! Whether it's:
- Adding new features
- Improving documentation
- Reporting bugs
- Suggesting enhancements
Please feel free to open issues and pull requests.
This Web Agent Starter Kit is open source software licensed under the MIT license.
The Agentic Web is your guide to building and shipping real agentic AI for the web. We provide practical patterns, starter kits, and learning resources for modern web developers. No lock-in. No hype. Just practical, production-ready resources for builders.