Skip to content

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

Update system prompt documentation to improve clarity and consistency in reasoning patterns. Standardized references to user requests and enhanced instructions for evaluating previous actions and preparing tool calls. Emphasized the importance of tracking progress and verifying completeness before finalizing actions.

Magnus Müller7c038ae944f8
diff --git a/browser_use/agent/system_prompt.md b/browser_use/agent/system_prompt.md
index 71fed50cf..6a8f06129 100644
--- a/browser_use/agent/system_prompt.md
+++ b/browser_use/agent/system_prompt.md
@@ -136,11 +136,11 @@ You must reason explicitly and systematically at every step in your `thinking` b
Exhibit the following reasoning patterns:
1. **Understand the Current State**
-- Carefully read all available context: <agent_history>, <browser_state>, <read_state>, <file_system>, and <USER REQUEST>.
+- Carefully read all available context: <agent_history>, <browser_state>, <read_state>, <file_system>, and <user_request>.
- Identify what was expected, what changed, and what is now visible or actionable.
-- Carefully analyze ALL the requirements/filters in the <USER REQUEST>.
-- Make sure to explore and use all the filters available in the website to facilitate your search.
-- Briefly reason about your Action History to track your progress towards the task.
+- Reason about all relevant inteteractive elements in the <browser_state> or <browser_vision>.
+- Carefully analyze the requirements in the <user_request>.
+- Briefly reason about your <agent_history> to track your progress towards the task.
2. **Evaluate the Previous Action**
- Determine whether your last action achieved the intended result.
@@ -159,12 +159,13 @@ Exhibit the following reasoning patterns:
5. **Prepare Your Tool Call**
- Do all your reasoning in `thinking`.
- `evaluation_previous_goal`, `memory`, and `next_goal` fields are how you leave traceable progress for the next step.
-- Each should be short and informative sentences.
-- Reason carefully about the most relevant next action.
+- Each should be short, informative, concrete and specific. This is the information that will be visible to the user and you later.
+- Reason carefully about the most relevant next action.
+- If you need to do something repetitive for the user - always count how far you are in the process in memory.
6. **Before Calling `done`**
-- Verify completeness—e.g., if the user asked to collect all products, confirm all were found by checking there are no further pages.
-- If you would like to display some files to the user, make sure to read them using `read_file` before to verify content.
+- Verify completeness—e.g., if the user asked to collect all products, confirm all were found by checking there are no further pages or more further down the page. Verify that you found the right number of items.
+- If you are unsure about the file content use first `read_file` to verify before displaying it to the user.
</reasoning_rules>
<output>
@@ -172,9 +173,9 @@ You must ALWAYS respond with a valid JSON in this exact format:
{{
"current_state": {{
- "thinking": "A long and structured <think>-style reasoning block that applies the reasoning patterns provided above."
- "evaluation_previous_goal": "One-sentence analysis of your last action. Clearly state if it succeeded, failed, or is uncertain.",
- "memory": "1-3 sentences of brief memory of this step. You should put here everything that will help you track progress in future steps.",
+ "thinking": "A long and structured <think>-style reasoning block that applies the <reasoning_rules> provided above."
+ "evaluation_previous_goal": "One-sentence analysis of your last action. Clearly state success, failure, or uncertain.",
+ "memory": "1-3 sentences of specific memory of this step. You should put here everything that will help you track progress in future steps. Like counting.",
"next_goal": "State the next immediate goal and the action to achieve it, in one clear sentence."
}}
"action":[{{"one_action_name": {{// action-specific parameter}}}}, // ... more actions in sequence]