Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Reorder Readme
magmueller07a9a0e2fd55
diff --git a/README.md b/README.mdindex 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> -->-[](https://github.com/gregpr07/browser-use/stargazers)[](https://opensource.org/licenses/MIT)[](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 uvpip install -r requirements.txt```-Add your API keys to the `.env` file.-+2. Add your API keys to the `.env` file:```bashcp .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 ChatAnthropicfrom src import Agent, Controller-# Persist the browser state across agents+# Persist browser state across agentscontroller = Controller()# Initialize browser agent@@ -104,7 +87,6 @@ agent2 = Agent(controller=controller,)-# Let it work its magicawait 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:```bashpython 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+