From beaede963118e00b17a40caac77e062f3900a190 Mon Sep 17 00:00:00 2001 From: mertunsall Date: Fri, 15 Aug 2025 00:18:12 +0100 Subject: [PATCH] small additions --- browser_use/agent/prompts.py | 3 ++- browser_use/agent/system_prompt.md | 1 + browser_use/agent/system_prompt_flash.md | 1 + browser_use/agent/system_prompt_no_thinking.md | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/browser_use/agent/prompts.py b/browser_use/agent/prompts.py index 946bab866..4e033aebc 100644 --- a/browser_use/agent/prompts.py +++ b/browser_use/agent/prompts.py @@ -220,7 +220,8 @@ Available tabs: agent_state += f'\n{step_info_description}\n\n' if self.available_file_paths: - agent_state += '\n' + '\n'.join(self.available_file_paths) + '\n\n' + available_file_paths_text = '\n'.join(self.available_file_paths) + agent_state += f'\n{available_file_paths_text}\nUse absolute full paths when referencing these files.\n\n' return agent_state @observe_debug(ignore_input=True, ignore_output=True, name='get_user_message') diff --git a/browser_use/agent/system_prompt.md b/browser_use/agent/system_prompt.md index bc6b29eb9..46166ddb4 100644 --- a/browser_use/agent/system_prompt.md +++ b/browser_use/agent/system_prompt.md @@ -115,6 +115,7 @@ The `done` action is your opportunity to terminate and share your findings with - Set `success` to `true` only if the full USER REQUEST has been completed with no missing components. - If any part of the request is missing, incomplete, or uncertain, set `success` to `false`. - You can use the `text` field of the `done` action to communicate your findings and `files_to_display` to send file attachments to the user, e.g. `["results.md"]`. +- Put ALL the relevant information you found so far in the `text` field when you call `done` action. - Combine `text` and `files_to_display` to provide a coherent reply to the user and fulfill the USER REQUEST. - 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. diff --git a/browser_use/agent/system_prompt_flash.md b/browser_use/agent/system_prompt_flash.md index efb24c242..76acc38ad 100644 --- a/browser_use/agent/system_prompt_flash.md +++ b/browser_use/agent/system_prompt_flash.md @@ -113,6 +113,7 @@ The `done` action is your opportunity to terminate and share your findings with - Set `success` to `true` only if the full USER REQUEST has been completed with no missing components. - If any part of the request is missing, incomplete, or uncertain, set `success` to `false`. - You can use the `text` field of the `done` action to communicate your findings and `files_to_display` to send file attachments to the user, e.g. `["results.md"]`. +- Put ALL the relevant information you found so far in the `text` field when you call `done` action. - Combine `text` and `files_to_display` to provide a coherent reply to the user and fulfill the USER REQUEST. - 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. diff --git a/browser_use/agent/system_prompt_no_thinking.md b/browser_use/agent/system_prompt_no_thinking.md index d3368ff6c..3daa475c6 100644 --- a/browser_use/agent/system_prompt_no_thinking.md +++ b/browser_use/agent/system_prompt_no_thinking.md @@ -115,6 +115,7 @@ The `done` action is your opportunity to terminate and share your findings with - Set `success` to `true` only if the full USER REQUEST has been completed with no missing components. - If any part of the request is missing, incomplete, or uncertain, set `success` to `false`. - You can use the `text` field of the `done` action to communicate your findings and `files_to_display` to send file attachments to the user, e.g. `["results.md"]`. +- Put ALL the relevant information you found so far in the `text` field when you call `done` action. - Combine `text` and `files_to_display` to provide a coherent reply to the user and fulfill the USER REQUEST. - 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.