π Browser-use is the easiest way to connect your AI agents with the browser.
π‘ See what others are building and share your projects in our Discord! Want Swag? Check out our Merch store.
π€οΈ Skip the setup - try our hosted version for instant browser automation! Try the cloud βοΈ.
With pip (Python>=3.11):
pip install browser-use
For memory functionality (requires Python<3.13 due to PyTorch compatibility):
pip install "browser-use[memory]"
Install the browser:
playwright install chromium --with-deps --no-shell
Spin up your agent:
import asyncio
from dotenv import load_dotenv
load_dotenv()
from browser_use import Agent
from langchain_openai import ChatOpenAI
async def main():
agent = Agent(
task="Compare the price of gpt-4o and DeepSeek-V3",
llm=ChatOpenAI(model="gpt-4o"),
)
await agent.run()
asyncio.run(main())
Add your API keys for the provider you want to use to your .env
file.
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
AZURE_OPENAI_ENDPOINT=
AZURE_OPENAI_KEY=
GOOGLE_API_KEY=
DEEPSEEK_API_KEY=
GROK_API_KEY=
NOVITA_API_KEY=
For other settings, models, and more, check out the documentation π.
You can test browser-use using its Web UI or Desktop App.
You can also use our browser-use
interactive CLI (similar to claude
code):
pip install browser-use[cli]
browser-use
Task: Add grocery items to cart, and checkout.
Prompt: Add my latest LinkedIn follower to my leads in Salesforce.
Prompt: Read my CV & find ML jobs, save them to a file, and then start applying for them in new tabs, if you need help, ask me.'
https://github.com/user-attachments/assets/171fb4d6-0355-46f2-863e-edb04a828d04
Prompt: Write a letter in Google Docs to my Papa, thanking him for everything, and save the document as a PDF.
Prompt: Look up models with a license of cc-by-sa-4.0 and sort by most likes on Hugging face, save top 5 to file.
https://github.com/user-attachments/assets/de73ee39-432c-4b97-b4e8-939fd7f323b3
For more examples see the examples folder or join the Discord and show off your project. You can also see our awesome-prompts
repo for prompting inspiration.
Tell your computer what to do, and it gets it done.
We love contributions! Feel free to open issues for bugs or feature requests. To contribute to the docs, check out the /docs
folder.
To learn more about the library, check out the local setup π.
main
is the primary development branch with frequent changes. For production use, install a stable versioned release instead.
Want to show off your Browser-use swag? Check out our Merch store. Good contributors will receive swag for free π.
If you use Browser Use in your research or project, please cite:
@software{browser_use2024,
author = {MΓΌller, Magnus and Ε½uniΔ, Gregor},
title = {Browser Use: Enable AI to control your browser},
year = {2024},
publisher = {GitHub},
url = {https://github.com/browser-use/browser-use}
}