Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Reorder Readme

magmueller07a9a0e2fd55
diff --git a/README.md b/README.md
index 6f0cceef6..687d263b7 100644
--- a/README.md
+++ b/README.md
@@ -1,32 +1,31 @@
<div align="center">
# 🌐 Browser-Use
-
### Open-Source Web Automation with LLMs
-<!-- <p align="center">
- <img src="assets/demo.gif" alt="Browser-Use Demo" width="600">
-</p> -->
-
[![GitHub stars](https://img.shields.io/github/stars/gregpr07/browser-use?style=social)](https://github.com/gregpr07/browser-use/stargazers)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
-_Let LLMs interact with websites naturally_
+</div>
-[Key Features](#-key-features) β€’
-[Live Demos](#-live-demos) β€’
-[Quick Start](#-quick-start) β€’
-[Examples](#-examples) β€’
-[Models](#-supported-models)
+Let LLMs interact with websites through a simple interface.
-</div>
+## Short Example
----
+```python
+from src import Agent
+from langchain_openai import ChatOpenAI
-## πŸŽ₯ Live Demos
+agent = Agent(
+ task='Find cheapest flight from London to Kyrgyzstan and return the url.',
+ llm=ChatOpenAI(model='gpt-4o'),
+)
+
+await agent.run()
+```
-Watch Browser-Use tackle real-world tasks:
+## Demo
<div style="display: flex; justify-content: space-between;">
<div style="flex: 1; margin-right: 10px;">
@@ -35,51 +34,35 @@ Watch Browser-Use tackle real-world tasks:
</div>
<div style="flex: 1; margin-left: 10px;">
<img style="max-width:100%;" src="./static/photos.gif" alt="Photos search demo">
- <p><i>Prompt: Opening new tabs and searching for images for these people: Albert Einstein, Oprah Winfrey, Steve Jobs. Then ask me for further instructions.</i></p>
+ <p><i>Prompt: Opening new tabs and searching for images for these people: Albert Einstein, Oprah Winfrey, Steve Jobs.</i></p>
</div>
</div>
-## πŸš€ Key Features
-
-- πŸ€– **Universal LLM Support** - Works with any Language Model
-- 🎯 **Smart Element Detection** - Automatically finds interactive elements
-- πŸ“‘ **Multi-Tab Management** - Seamless handling of browser tabs
-- πŸ” **XPath Extraction** - No more manual DevTools inspection
-- πŸ‘οΈ **Vision Model Support** - Process visual page information
-- πŸ› οΈ **Customizable Actions** - Add your own browser interactions
-
-## πŸ’» Quick Start
-
-Create a virtual environment and install the dependencies:
+## Setup
+1. Create a virtual environment and install dependencies:
```bash
# I recommend using uv
pip install -r requirements.txt
```
-Add your API keys to the `.env` file.
-
+2. Add your API keys to the `.env` file:
```bash
cp .env.example .env
```
-You can use any LLM model that is supported by LangChain by adding correct environment variables. Head over to the [langchain models](https://python.langchain.com/docs/integrations/chat/) page to see all available models.
+You can use any LLM model supported by LangChain by adding the appropriate environment variables. See [langchain models](https://python.langchain.com/docs/integrations/chat/) for available options.
-## πŸ“ Examples
+## Features
-```python
-from src import Agent
-from langchain_openai import ChatOpenAI
+- Universal LLM Support - Works with any Language Model
+- Interactive Element Detection - Automatically finds interactive elements
+- Multi-Tab Management - Seamless handling of browser tabs
+- XPath Extraction for scraping functions - No more manual DevTools inspection
+- Vision Model Support - Process visual page information
+- Customizable Actions - Add your own browser interactions (e.g. add data to database which the LLM can use)
-# Initialize browser agent
-agent = Agent(
- task='Find cheapest flight from London to Kyrgyzstan and return the url.',
- llm=ChatOpenAI(model='gpt-4o'),
-)
-
-# Let it work its magic
-await agent.run()
-```
+## Advanced Examples
### Chain of Agents
@@ -89,7 +72,7 @@ You can persist the browser across multiple agents and chain them together.
from langchain_anthropic import ChatAnthropic
from src import Agent, Controller
-# Persist the browser state across agents
+# Persist browser state across agents
controller = Controller()
# Initialize browser agent
@@ -104,7 +87,6 @@ agent2 = Agent(
controller=controller,
)
-# Let it work its magic
await agent1.run()
founders, history = await agent2.run()
@@ -113,9 +95,8 @@ print(founders)
You can use the `history` to run the agents again deterministically.
-## Simple Run
-
-You can run any of the examples using the command line interface:
+## Command Line Usage
+Run examples directly from the command line:
```bash
python examples/try.py "Your query here" --provider [openai|anthropic]
@@ -139,18 +120,23 @@ python examples/try.py "Search for top AI companies" --provider openai
## πŸ€– Supported Models
-All LangChain chat models are supported.
-
-### Tested
-
+All LangChain chat models are supported. Tested with:
- GPT-4o
- GPT-4o Mini
- Claude 3.5 Sonnet
- LLama 3.1 405B
-## 🀝 Contributing
+## Roadmap
+
+- [x] Save agent actions and execute them deterministically
+- [ ] Pydantic forced output
+- [ ] Third party SERP API for faster Google Search results
+- [ ] Multi-step action execution
+- [ ] Add more browser actions
-Contributions are welcome! Also feel free to open issues for any bugs or feature requests.
+## Contributing
+
+Contributions are welcome! Feel free to open issues for bugs or feature requests.
---
@@ -164,3 +150,4 @@ Contributions are welcome! Also feel free to open issues for any bugs or feature
- [x] Save agent actions and execute them deterministically (for QA testing etc)
- [ ] Pydantic forced output
- [ ] Third party SERP API for faster Google Search results
+