Skip to main content
This guide walks you through setting up CrewAI with Browserbase to create agents that can perform web automation tasks using natural language instructions.

Step 1: Install Dependencies

Install the required packages for CrewAI and Stagehand integration:

Step 2: Configure Environment Variables

You’ll need API keys from three services:
  1. Browserbase API Key and Project ID: Get these from your Browserbase dashboard
  2. LLM API Key: Get an API key from OpenAI or Anthropic
Store your API keys securely as environment variables:

Step 3: Create Your First Agent

Create a Python script with a basic CrewAI agent:

Step 4: Create and Run a Task

Define a task for your agent and execute it:

Step 5: Run Your Script

Execute your Python script:

Advanced Configuration

Customize the StagehandTool behavior with additional parameters:

Example Tasks

CrewAI Documentation

Dive into the CrewAI documentation to learn more about its capabilities and integrations.

Browserbase Documentation

Access the Browserbase documentation for comprehensive guides and resources.