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
Update efficiency guidelines to include new scrolling instructions for extracting structured data. Clarified usage of the scroll action to enhance clarity and efficiency in multi-step processes.
Magnus Müllerb9ab642d0c26
diff --git a/browser_use/agent/system_prompt.md b/browser_use/agent/system_prompt.mdindex c74d947ef..36b969949 100644--- a/browser_use/agent/system_prompt.md+++ b/browser_use/agent/system_prompt.md@@ -140,12 +140,11 @@ You can output multiple actions in one step. Try to be efficient where it makes- `input_text` + `click_element_by_index` → Fill form field and submit/search in one step- `input_text` + `input_text` → Fill form fields- `click_element_by_index` + `click_element_by_index` → Navigate through multi-step flows+- `scroll` with num_pages 10 + `extract_structured_data` → Scroll to the bottom of the page to load more content before extracting structured data- File operations + browser actionsDo not try multiple different paths in one step. Always have one clear goal per step.Its important that you see in the next step if your action was successful, so do not chain actions which change the browser state multiple times, like do not use click and then go to url, because you would not see if the click was successful or not.--Scroll allows you with num_pages to directly execute it multiple times.</efficiency_guidelines><reasoning_rules>diff --git a/browser_use/agent/system_prompt_flash.md b/browser_use/agent/system_prompt_flash.mdindex e73937682..3161b6a68 100644--- a/browser_use/agent/system_prompt_flash.md+++ b/browser_use/agent/system_prompt_flash.md@@ -137,12 +137,11 @@ You can output multiple actions in one step. Try to be efficient where it makes- `input_text` + `click_element_by_index` → Fill form field and submit/search in one step- `input_text` + `input_text` → Fill form fields- `click_element_by_index` + `click_element_by_index` → Navigate through multi-step flows+- `scroll` with num_pages 10 + `extract_structured_data` → Scroll to the bottom of the page to load more content before extracting structured data- File operations + browser actionsDo not try multiple different paths in one step. Always have one clear goal per step.Its important that you see in the next step if your action was successful, so do not chain actions which change the browser state multiple times, like do not use click and then go to url, because you would not see if the click was successful or not.--Scroll allows you with num_pages to directly execute it multiple times.</efficiency_guidelines><reasoning_rules>diff --git a/browser_use/agent/system_prompt_no_thinking.md b/browser_use/agent/system_prompt_no_thinking.mdindex 85157fdf2..cf2803d2a 100644--- a/browser_use/agent/system_prompt_no_thinking.md+++ b/browser_use/agent/system_prompt_no_thinking.md@@ -139,12 +139,11 @@ You can output multiple actions in one step. Try to be efficient where it makes- `input_text` + `click_element_by_index` → Fill form field and submit/search in one step- `input_text` + `input_text` → Fill form fields- `click_element_by_index` + `click_element_by_index` → Navigate through multi-step flows+- `scroll` with num_pages 10 + `extract_structured_data` → Scroll to the bottom of the page to load more content before extracting structured data- File operations + browser actionsDo not try multiple different paths in one step. Always have one clear goal per step.Its important that you see in the next step if your action was successful, so do not chain actions which change the browser state multiple times, like do not use click and then go to url, because you would not see if the click was successful or not.--Scroll allows you with num_pages to directly execute it multiple times.</efficiency_guidelines><reasoning_rules>diff --git a/browser_use/tools/service.py b/browser_use/tools/service.pyindex 204fd5796..d0ef4d93c 100644--- a/browser_use/tools/service.py+++ b/browser_use/tools/service.py@@ -647,8 +647,8 @@ Provide the extracted information in a clear, structured format."""raise RuntimeError(str(e))@self.registry.action(- """Scroll the page by specified number of pages (set down=True to scroll down, down=False to scroll up, num_pages=number of pages to scroll like 0.5 for half page, 3.0 for three pages, etc.). Optional index parameter to scroll within a specific element or its scroll container (works well for dropdowns and custom UI components). Don't use index to scroll the entire page.- Instead of scrolling multiple step after step, use a high number of pages at once like 10 to get to the bottom of the page.+ """Scroll the page by specified number of pages (set down=True to scroll down, down=False to scroll up, num_pages=number of pages to scroll like 0.5 for half page, 10.0 for ten pages, etc.). Optional index parameter to scroll within a specific element or its scroll container (works well for dropdowns and custom UI components). If you want to scroll the entire page, don't use index.+ Instead of scrolling step after step, use a high number of pages at once like 10 to get to the bottom of the page.""",param_model=ScrollAction,)