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
fixed contradictory done condition
Saurav Panda70472eddd8a5
diff --git a/browser_use/agent/system_prompts/system_prompt.md b/browser_use/agent/system_prompts/system_prompt.mdindex 01f065a3b..18124d4d2 100644--- a/browser_use/agent/system_prompts/system_prompt.md+++ b/browser_use/agent/system_prompts/system_prompt.md@@ -106,9 +106,9 @@ The `done` action is your opportunity to terminate and share your findings with- You are ONLY ALLOWED to call `done` as a single action. Don't call it together with other actions.- If the user asks for specified format, such as "return JSON with following structure", "return a list of format...", MAKE sure to use the right format in your answer.- If the user asks for a structured output, your `done` action's schema will be modified. Take this schema into account when solving the task!-- When you reach 75% of your step budget, critically evaluate whether you can complete the full task.- If not, immediately save all partial results and call `done` with what you have.- Partial results are far more valuable than exhausting all steps with nothing saved.+- When you reach 75% of your step budget, critically evaluate whether you can complete the full task in the remaining steps.+ If completion is unlikely, shift strategy: save all progress gathered so far to files and focus on the highest-value remaining items.+ This ensures that when you do call `done` (at max_steps or earlier), you have meaningful partial results to deliver.- For large multi-item tasks (e.g. "search 50 items"), estimate the per-item cost from the first few items.If the task will exceed your budget, prioritize the most important items and save results incrementally.</task_completion_rules>diff --git a/browser_use/agent/system_prompts/system_prompt_anthropic.md b/browser_use/agent/system_prompts/system_prompt_anthropic.mdindex b69559931..3c0c6e6ae 100644--- a/browser_use/agent/system_prompts/system_prompt_anthropic.md+++ b/browser_use/agent/system_prompts/system_prompt_anthropic.md@@ -109,9 +109,9 @@ The `done` action is your opportunity to terminate and share your findings with- You are ONLY ALLOWED to call `done` as a single action. Don't call it together with other actions.- If the user asks for specified format, such as "return JSON with following structure", "return a list of format...", MAKE sure to use the right format in your answer.- If the user asks for a structured output, your `done` action's schema will be modified. Take this schema into account when solving the task!-- When you reach 75% of your step budget, critically evaluate whether you can complete the full task.- If not, immediately save all partial results and call `done` with what you have.- Partial results are far more valuable than exhausting all steps with nothing saved.+- When you reach 75% of your step budget, critically evaluate whether you can complete the full task in the remaining steps.+ If completion is unlikely, shift strategy: save all progress gathered so far to files and focus on the highest-value remaining items.+ This ensures that when you do call `done` (at max_steps or earlier), you have meaningful partial results to deliver.- For large multi-item tasks (e.g. "search 50 items"), estimate the per-item cost from the first few items.If the task will exceed your budget, prioritize the most important items and save results incrementally.</task_completion_rules>diff --git a/browser_use/agent/system_prompts/system_prompt_anthropic_no_thinking.md b/browser_use/agent/system_prompts/system_prompt_anthropic_no_thinking.mdindex 0a3e05a9f..b60cbce35 100644--- a/browser_use/agent/system_prompts/system_prompt_anthropic_no_thinking.md+++ b/browser_use/agent/system_prompts/system_prompt_anthropic_no_thinking.md@@ -109,9 +109,9 @@ The `done` action is your opportunity to terminate and share your findings with- You are ONLY ALLOWED to call `done` as a single action. Don't call it together with other actions.- If the user asks for specified format, such as "return JSON with following structure", "return a list of format...", MAKE sure to use the right format in your answer.- If the user asks for a structured output, your `done` action's schema will be modified. Take this schema into account when solving the task!-- When you reach 75% of your step budget, critically evaluate whether you can complete the full task.- If not, immediately save all partial results and call `done` with what you have.- Partial results are far more valuable than exhausting all steps with nothing saved.+- When you reach 75% of your step budget, critically evaluate whether you can complete the full task in the remaining steps.+ If completion is unlikely, shift strategy: save all progress gathered so far to files and focus on the highest-value remaining items.+ This ensures that when you do call `done` (at max_steps or earlier), you have meaningful partial results to deliver.- For large multi-item tasks (e.g. "search 50 items"), estimate the per-item cost from the first few items.If the task will exceed your budget, prioritize the most important items and save results incrementally.</task_completion_rules>