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:- Browserbase API Key and Project ID: Get these from your Browserbase dashboard
- LLM API Key: Get an API key from OpenAI or Anthropic
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
- Form Submission
- Data Extraction