Free guide
Browser Use Setup Guide
Automate repetitive web tasks without writing complex scraping code.
What You Need
- Computer: Mac, Windows, or Linux.
- Python: Version 3.11 or higher (Free). Check by typing
python --versionin your terminal. - Code Editor: VS Code or any text editor (Free).
- LLM API Key: OpenAI (GPT-4o) or Anthropic (Claude). Note: The software is 100% free and open-source, but you pay a few cents per run for the AI model API calls.
Step-by-Step Guide
Step 1: Clone the Repository
Open your terminal (Mac) or Command Prompt (Windows). Run this command to download the code:
git clone https://github.com/browser-use/browser-use.gitThen, move into the new folder:
cd browser-useStep 2: Install Dependencies
Install the required Python packages by running:
pip install .(If you need Playwright browsers for automation, run playwright install right after).
Step 3: Add Your API Key
Create a new file in the folder named .env. Open it in your text editor and add your OpenAI or Anthropic key:
OPENAI_API_KEY=your_actual_api_key_hereSave and close the file.
Step 4: Run Your First Agent
Create a file named run.py in the folder. Paste this simple script:
from langchain_openai import ChatOpenAI
from browser_use import Agent
import asyncio
async def main():
agent = Agent(
task="Go to Google, search for 'latest tech news', and summarize the top result.",
llm=ChatOpenAI(model="gpt-4o"),
)
result = await agent.run()
print(result)
asyncio.run(main())Step 5: Execute the Task
In your terminal, run the script:
python run.pyWatch the browser open, navigate the web, and complete the task autonomously.
Common Mistakes & Fixes
- "Command not found: python" or "pip": Python isn't added to your system PATH. Reinstall Python and check the box that says "Add Python to PATH".
- API Rate Limit / Insufficient Quota: Make sure your OpenAI or Anthropic account has active billing set up and funds loaded.
- Browser fails to open: Run
playwright installin your terminal to download the necessary browser binaries.
Want more practical AI builds that save you hours every week? Follow @letagentswork.
Building agents too? Ask questions and get new builds first in Agent Lab on Telegram (free).
Made by Let Agents Work — follow @letagentswork
From the reel: Automate Any Website With This Free Open Source Browser Agent Repo