Skip to content

TheAgenticWeb/web-agent-template

Repository files navigation

Web Agent Starter Kit

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.

Deploy with Vercel

Getting Started

First, install the dependencies for this repository. This requires pnpm.

pnpm install

Next, copy the example environment variables:

cp .env.example .env.local

You'll need to set up your API keys:

  1. Get your OpenAI API key from OpenAI's dashboard
  2. Get your Browserbase API key and project ID from Browserbase

Update .env.local with your API keys:

  • OPENAI_API_KEY: Your OpenAI API key
  • BROWSERBASE_API_KEY: Your Browserbase API key
  • BROWSERBASE_PROJECT_ID: Your Browserbase project ID
  • GOOGLE_GENERATIVE_AI_API_KEY: Your Google Generative AI API key (optional, for Gemini)

Then, run the development server:

pnpm dev

Open http://localhost:3000 with your browser to see the Web Agent in action.

How It Works

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.

Key Technologies

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.

Contributing

We welcome contributions! Whether it's:

  • Adding new features
  • Improving documentation
  • Reporting bugs
  • Suggesting enhancements

Please feel free to open issues and pull requests.

License

This Web Agent Starter Kit is open source software licensed under the MIT license.

About The Agentic Web

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.

About

A web agent that can use a browser to perform tasks on your behalf.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages