mirror of
https://github.com/browser-use/browser-use
synced 2026-05-06 17:52:15 +02:00
63 lines
986 B
Plaintext
63 lines
986 B
Plaintext
---
|
|
title: "Human Quickstart"
|
|
description: ""
|
|
icon: "rocket"
|
|
---
|
|
|
|
|
|
## 1. Easy setup
|
|
|
|
Use [uv](https://docs.astral.sh/uv/) to create and activate the environment:
|
|
|
|
```bash
|
|
uv venv --python 3.12
|
|
```
|
|
|
|
```bash
|
|
# For Mac/Linux:
|
|
source .venv/bin/activate
|
|
|
|
# For Windows:
|
|
.venv\Scripts\activate
|
|
```
|
|
|
|
Install browser-use:
|
|
|
|
```bash
|
|
uv pip install browser-use
|
|
```
|
|
|
|
Install Chromium:
|
|
|
|
```bash
|
|
uvx playwright install chromium --with-deps
|
|
```
|
|
|
|
## 2. Choose your favorite LLM
|
|
Create a `.env` file and add your API key:
|
|
|
|
```bash .env
|
|
OPENAI_API_KEY=
|
|
```
|
|
|
|
See [Supported Models](/customize/supported-models) for other models.
|
|
|
|
## 3. Run your first agent
|
|
|
|
```python agent.py
|
|
from browser_use import Agent, ChatOpenAI
|
|
from dotenv import load_dotenv
|
|
import asyncio
|
|
|
|
load_dotenv()
|
|
|
|
async def main():
|
|
llm = ChatOpenAI(model="gpt-4.1-mini")
|
|
task = "Find the number 1 post on Show HN"
|
|
agent = Agent(task=task, llm=llm)
|
|
await agent.run()
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|
|
```
|