Let Agents WorkREPO

Free guide

Browser Use Setup Guide

Automate repetitive web tasks without writing complex scraping code.

What You Need


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.git

Then, move into the new folder:

cd browser-use

Step 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_here

Save 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.py

Watch the browser open, navigate the web, and complete the task autonomously.


Common Mistakes & Fixes


Want more practical AI builds that save you hours every week? Follow @letagentswork.

Best AI agents this week, every Friday

One short email: the agents and workflows we built, with the free guides. No spam.

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