commita9cf53a1b1Merge:5aa62c110f9ffa10Author: Magnus Müller <67061560+MagMueller@users.noreply.github.com> Date: Fri Jun 20 10:41:19 2025 +0200 Set user_data_dir to None (#2015) <!-- This is an auto-generated description by cubic. --> Changed browser session setup to use incognito mode by setting user_data_dir to None, preventing persistent state between evaluation runs. <!-- End of auto-generated description by cubic. --> commit0f9ffa1072Author: Magnus Müller <67061560+MagMueller@users.noreply.github.com> Date: Fri Jun 20 10:38:01 2025 +0200 Set user_data_dir to None commit5aa62c1113Merge:d8a9d21be559ff5eAuthor: Nick Sweeting <git@sweeting.me> Date: Thu Jun 19 23:01:49 2025 -0700 Fix cross-origin iframe DOM retrieval (#1965) commitd8a9d21b00Merge:3e5f3049b6be1583Author: Nick Sweeting <git@sweeting.me> Date: Thu Jun 19 23:01:21 2025 -0700 Fix critical domain restriction bypass vulnerability (#2006) commitb6be158319Author: Sahar <saharhashai@gmail.com> Date: Thu Jun 19 02:28:34 2025 -0700 Delete tests/ci/test_security_url_validation.py commitaca4b57329Author: Sahar <saharhashai@gmail.com> Date: Thu Jun 19 02:27:57 2025 -0700 Delete SECURITY_FIX_REPORT.md commit45872c1e45Author: Your Name <your.email@example.com> Date: Thu Jun 19 11:24:50 2025 +0200 fix(security): prevent domain restriction bypass in controller actions - Add domain validation to controller.click() and controller.type() methods - Implement comprehensive security checks before executing actions - Prevent potential prompt injection and unauthorized data access - Add extensive test coverage for domain validation scenarios - Update documentation with security considerations This critical fix prevents complete bypass of domain restrictions that could enable attackers to perform unauthorized actions on any domain. commite559ff5eaaMerge:19ae8a11f348e0c5Author: Nick Sweeting <git@sweeting.me> Date: Sat Jun 14 01:56:09 2025 -0700 Merge branch 'main' into main commit19ae8a1146Merge:e1b3ff9e08ed0be3Author: Nick Sweeting <git@sweeting.me> Date: Sat Jun 14 00:31:30 2025 -0700 Merge branch 'main' into main commite1b3ff9e9dAuthor: Ilya Biryukov <ilbiryuk@microsoft.com> Date: Thu Jun 12 17:40:40 2025 -0700 Revert changes to examples/features/multiple_agents_same_browser.py commitd20a3b55d6Author: Ilya Biryukov <ilbiryuk@microsoft.com> Date: Thu Jun 12 17:30:59 2025 -0700 Fix pre-commit lint issues and compile error in multiple_agents_same_browser commit13d5468aa2Author: Ilya Biryukov <ilbiryuk@microsoft.com> Date: Thu Jun 12 14:07:21 2025 -0700 Fix cross-origin iframe DOM retrieval
Enable AI to control your browser 🤖
🌐 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 ☁︎.
Quick start
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 📕.
Test with UI
You can test browser-use using its Web UI or Desktop App.
Test with an interactive CLI
You can also use our browser-use interactive CLI (similar to claude code):
pip install browser-use[cli]
browser-use
Demos
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
More examples
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.
Vision
Tell your computer what to do, and it gets it done.
Roadmap
Agent
- Improve agent memory to handle +100 steps
- Enhance planning capabilities (load website specific context)
- Reduce token consumption (system prompt, DOM state)
DOM Extraction
- Enable detection for all possible UI elements
- Improve state representation for UI elements so that all LLMs can understand what's on the page
Workflows
- Let user record a workflow - which we can rerun with browser-use as a fallback
- Make rerunning of workflows work, even if pages change
User Experience
- Create various templates for tutorial execution, job application, QA testing, social media, etc. which users can just copy & paste.
- Improve docs
- Make it faster
Parallelization
- Human work is sequential. The real power of a browser agent comes into reality if we can parallelize similar tasks. For example, if you want to find contact information for 100 companies, this can all be done in parallel and reported back to a main agent, which processes the results and kicks off parallel subtasks again.
Contributing
We love contributions! Feel free to open issues for bugs or feature requests. To contribute to the docs, check out the /docs folder.
🧪 How to make your agents robust?
We offer to run your tasks in our CI—automatically, on every update!
- Add your task: Add a YAML file in
tests/agent_tasks/(see theREADME therefor details). - Automatic validation: Every time we push updates, your task will be run by the agent and evaluated using your criteria.
Local Setup
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.
Swag
Want to show off your Browser-use swag? Check out our Merch store. Good contributors will receive swag for free 👀.
Citation
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}
}