Skip to content

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

switched to bu-2-0 in all the examples

Saurav Panda20f4f2a98452
diff --git a/examples/browser/cloud_browser.py b/examples/browser/cloud_browser.py
index 8bdb36a2a..72eebb9a9 100644
--- a/examples/browser/cloud_browser.py
+++ b/examples/browser/cloud_browser.py
@@ -21,7 +21,7 @@ async def basic():
agent = Agent(
task='Go to github.com/browser-use/browser-use and tell me the star count',
- llm=ChatBrowserUse(),
+ llm=ChatBrowserUse(model='bu-2-0'),
browser=browser,
)
@@ -39,7 +39,7 @@ async def full_config():
agent = Agent(
task='go and check my ip address and the location',
- llm=ChatBrowserUse(),
+ llm=ChatBrowserUse(model='bu-2-0'),
browser=browser,
)
diff --git a/examples/demo_mode_example.py b/examples/demo_mode_example.py
index 8664aa906..b6c540ba3 100644
--- a/examples/demo_mode_example.py
+++ b/examples/demo_mode_example.py
@@ -6,7 +6,7 @@ from browser_use import Agent, ChatBrowserUse
async def main() -> None:
agent = Agent(
task='Please find the latest commit on browser-use/browser-use repo and tell me the commit message. Please summarize what it is about.',
- llm=ChatBrowserUse(),
+ llm=ChatBrowserUse(model='bu-2-0'),
demo_mode=True,
)
await agent.run(max_steps=5)
diff --git a/examples/features/judge_trace.py b/examples/features/judge_trace.py
index ec6542e45..c20030041 100644
--- a/examples/features/judge_trace.py
+++ b/examples/features/judge_trace.py
@@ -27,7 +27,7 @@ Round your result to the nearest 1000 hours and do not use any comma separators
async def main():
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
agent = Agent(
task=task,
llm=llm,
diff --git a/examples/features/rerun_history.py b/examples/features/rerun_history.py
index a3db07f08..af30cd1c1 100644
--- a/examples/features/rerun_history.py
+++ b/examples/features/rerun_history.py
@@ -59,7 +59,7 @@ async def main():
# Example task to demonstrate history saving and rerunning
history_file = Path('agent_history.json')
task = 'Go to https://browser-use.github.io/stress-tests/challenges/reference-number-form.html and fill the form with example data and submit and extract the refernence number.'
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
# Optional: Use custom LLMs for AI features during rerun
# Uncomment to use a custom LLM:
diff --git a/examples/getting_started/01_basic_search.py b/examples/getting_started/01_basic_search.py
index dcdce631a..a916287ab 100644
--- a/examples/getting_started/01_basic_search.py
+++ b/examples/getting_started/01_basic_search.py
@@ -19,7 +19,7 @@ from browser_use import Agent, ChatBrowserUse
async def main():
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
task = "Search Google for 'what is browser automation' and tell me the top 3 results"
agent = Agent(task=task, llm=llm)
await agent.run()
diff --git a/examples/getting_started/02_form_filling.py b/examples/getting_started/02_form_filling.py
index c83909ad8..97e44d78d 100644
--- a/examples/getting_started/02_form_filling.py
+++ b/examples/getting_started/02_form_filling.py
@@ -30,7 +30,7 @@ from browser_use import Agent, ChatBrowserUse
async def main():
# Initialize the model
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
# Define a form filling task
task = """
diff --git a/examples/getting_started/03_data_extraction.py b/examples/getting_started/03_data_extraction.py
index 28e913776..18c8b51cd 100644
--- a/examples/getting_started/03_data_extraction.py
+++ b/examples/getting_started/03_data_extraction.py
@@ -30,7 +30,7 @@ from browser_use import Agent, ChatBrowserUse
async def main():
# Initialize the model
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
# Define a data extraction task
task = """
diff --git a/examples/getting_started/04_multi_step_task.py b/examples/getting_started/04_multi_step_task.py
index 7af10128c..5855f9087 100644
--- a/examples/getting_started/04_multi_step_task.py
+++ b/examples/getting_started/04_multi_step_task.py
@@ -30,7 +30,7 @@ from browser_use import Agent, ChatBrowserUse
async def main():
# Initialize the model
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
# Define a multi-step task
task = """
diff --git a/examples/integrations/agentmail/2fa.py b/examples/integrations/agentmail/2fa.py
index cf1c0839f..60c1ff83f 100644
--- a/examples/integrations/agentmail/2fa.py
+++ b/examples/integrations/agentmail/2fa.py
@@ -28,7 +28,7 @@ async def main():
tools = EmailTools(email_client=email_client, inbox=inbox)
# Initialize the LLM for browser-use agent
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
# Set your local browser path
browser = Browser(executable_path='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome')
diff --git a/examples/models/browser_use_llm.py b/examples/models/browser_use_llm.py
index dc1031de1..b5b00a4e8 100644
--- a/examples/models/browser_use_llm.py
+++ b/examples/models/browser_use_llm.py
@@ -22,7 +22,7 @@ if not os.getenv('BROWSER_USE_API_KEY'):
async def main():
agent = Agent(
task='Find the number of stars of the browser-use repo',
- llm=ChatBrowserUse(),
+ llm=ChatBrowserUse(model='bu-2-0'),
)
# Run the agent
diff --git a/examples/sandbox/example.py b/examples/sandbox/example.py
index 578113a0a..565a70035 100644
--- a/examples/sandbox/example.py
+++ b/examples/sandbox/example.py
@@ -37,7 +37,7 @@ async def pydantic_example(browser: Browser):
agent = Agent(
"""go and check my ip address and the location. return the result in json format""",
browser=browser,
- llm=ChatBrowserUse(),
+ llm=ChatBrowserUse(model='bu-2-0'),
)
res = await agent.run()
diff --git a/examples/sandbox/structured_output.py b/examples/sandbox/structured_output.py
index 7cbda97c1..14a8c70f5 100644
--- a/examples/sandbox/structured_output.py
+++ b/examples/sandbox/structured_output.py
@@ -29,7 +29,7 @@ async def get_ip_location(browser: Browser) -> AgentHistoryList:
agent = Agent(
task='Go to ipinfo.io and extract my IP address and location details (country, city, region)',
browser=browser,
- llm=ChatBrowserUse(),
+ llm=ChatBrowserUse(model='bu-2-0'),
output_model_schema=IPLocation,
)
return await agent.run(max_steps=10)
diff --git a/examples/use-cases/buy_groceries.py b/examples/use-cases/buy_groceries.py
index d21fbeb83..d2cb6852a 100644
--- a/examples/use-cases/buy_groceries.py
+++ b/examples/use-cases/buy_groceries.py
@@ -24,7 +24,7 @@ class GroceryCart(BaseModel):
async def add_to_cart(items: list[str] = ['milk', 'eggs', 'bread']):
browser = Browser(cdp_url='http://localhost:9222')
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
# Task prompt
task = f"""
diff --git a/examples/use-cases/pcpartpicker.py b/examples/use-cases/pcpartpicker.py
index af52fa5e8..c332c150f 100644
--- a/examples/use-cases/pcpartpicker.py
+++ b/examples/use-cases/pcpartpicker.py
@@ -6,7 +6,7 @@ from browser_use import Agent, Browser, ChatBrowserUse, Tools
async def main():
browser = Browser(cdp_url='http://localhost:9222')
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
tools = Tools()
diff --git a/examples/use-cases/phone_comparison.py b/examples/use-cases/phone_comparison.py
index b5d79f37d..65157d1c2 100644
--- a/examples/use-cases/phone_comparison.py
+++ b/examples/use-cases/phone_comparison.py
@@ -34,7 +34,7 @@ async def find(item: str = 'Used iPhone 12'):
"""
browser = Browser(cdp_url='http://localhost:9222')
- llm = ChatBrowserUse()
+ llm = ChatBrowserUse(model='bu-2-0')
# Task prompt
task = f"""