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
Removes redundant scrolling instruction
Daniel T.25a40fb179e0
diff --git a/browser_use/agent/system_prompt.md b/browser_use/agent/system_prompt.mdindex 0506c59a6..516b0fc48 100644--- a/browser_use/agent/system_prompt.md+++ b/browser_use/agent/system_prompt.md@@ -77,7 +77,6 @@ Strictly follow these rules while using the browser and navigating the web:- If research is needed, open a **new tab** instead of reusing the current one.- If the page changes after, for example, an input text action, analyse if you need to interact with new elements, e.g. selecting the right option from the list.- By default, only elements in the visible viewport are listed. Use scrolling tools if you suspect relevant content is offscreen which you need to interact with. Scroll ONLY if there are more pixels below or above the page. The extract content action gets the full loaded page content.-- You can scroll by a specific number of pages using the num_pages parameter (e.g., 0.5 for half page, 2.0 for two pages), or scroll by one page if no num_pages is specified.- If a captcha appears, attempt solving it if possible. If not, use fallback strategies (e.g., alternative site, backtrack).- If expected elements are missing, try refreshing, scrolling, or navigating back.- If the page is not fully loaded, use the wait action.@@ -92,7 +91,7 @@ Strictly follow these rules while using the browser and navigating the web:- There are 2 types of tasks always first think which type of request you are dealing with:1. Very specific step by step instructions:- Follow them as very precise and don't skip steps. Try to complete everything as requested.-2. Open ended tasks. Plan yourself, be creative in achieving them.+1. Open ended tasks. Plan yourself, be creative in achieving them.- If you get stuck e.g. with logins or captcha in open-ended tasks you can re-evaluate the task and try alternative ways, e.g. sometimes accidentally login pops up, even though there some part of the page is accessible or you get some information via web search.</browser_rules>diff --git a/browser_use/agent/system_prompt_no_thinking.md b/browser_use/agent/system_prompt_no_thinking.mdindex 49a8938cd..aadd944f9 100644--- a/browser_use/agent/system_prompt_no_thinking.md+++ b/browser_use/agent/system_prompt_no_thinking.md@@ -77,7 +77,6 @@ Strictly follow these rules while using the browser and navigating the web:- If research is needed, open a **new tab** instead of reusing the current one.- If the page changes after, for example, an input text action, analyse if you need to interact with new elements, e.g. selecting the right option from the list.- By default, only elements in the visible viewport are listed. Use scrolling tools if you suspect relevant content is offscreen which you need to interact with. Scroll ONLY if there are more pixels below or above the page. The extract content action gets the full loaded page content.-- You can scroll by a specific number of pages using the num_pages parameter (e.g., 0.5 for half page, 2.0 for two pages), or scroll by one page if no num_pages is specified.- If a captcha appears, attempt solving it if possible. If not, use fallback strategies (e.g., alternative site, backtrack).- If expected elements are missing, try refreshing, scrolling, or navigating back.- If the page is not fully loaded, use the wait action.diff --git a/browser_use/controller/registry/service.py b/browser_use/controller/registry/service.pyindex 5a8dafc5a..49ec2c412 100644--- a/browser_use/controller/registry/service.py+++ b/browser_use/controller/registry/service.py@@ -329,16 +329,11 @@ class Registry(Generic[Context]):action = self.registry.actions[action_name]try:- # Remove special parameters from params to avoid double kwarg conflicts- # Special parameters will be passed via special_context instead- special_param_names = set(self._get_special_param_types().keys())- cleaned_params = {k: v for k, v in params.items() if k not in special_param_names}-- # Create the validated Pydantic model with cleaned params+ # Create the validated Pydantic modeltry:- validated_params = action.param_model(**cleaned_params)+ validated_params = action.param_model(**params)except Exception as e:- raise ValueError(f'Invalid parameters {cleaned_params} for action {action_name}: {type(e)}: {e}') from e+ raise ValueError(f'Invalid parameters {params} for action {action_name}: {type(e)}: {e}') from eif sensitive_data:# Get current URL if browser_session is provided