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
Simple example
Magnus Müller8ee41dbb5f36
diff --git a/examples/simple.py b/examples/simple.pyindex 8e5a8d262..e6c04da4b 100644--- a/examples/simple.py+++ b/examples/simple.py@@ -2,28 +2,26 @@ import asyncioimport osimport sys-from browser_use.llm.openai.chat import ChatOpenAI-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))from dotenv import load_dotenvload_dotenv()+from browser_use import Agent, ChatOpenAI-from browser_use import Agent--# Initialize the model-llm = ChatOpenAI(- model='gpt-5-mini',-)+async def main():+ # Choose your model+ llm = ChatOpenAI(model='gpt-5-mini')-task = 'Go and find the founders of browser-use'-agent = Agent(task=task, llm=llm)+ # Define your task+ task = 'Go and find the founders of browser-use'+ # Create the agent+ agent = Agent(task=task, llm=llm)-async def main():+ # Startawait agent.run()