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
file parameter naming
Magnus Müller50f97000e4a0
diff --git a/browser_use/tools/service.py b/browser_use/tools/service.pyindex 829a4533a..6e4502cc6 100644--- a/browser_use/tools/service.py+++ b/browser_use/tools/service.py@@ -1160,10 +1160,10 @@ You will be given a query and the markdown of a webpage that has been filtered tmemory += f' - {len_text - len_max_memory} more characters'attachments = []- if params.files:+ if params.files_to_display:if self.display_files_in_done_text:file_msg = ''- for file_name in params.files:+ for file_name in params.files_to_display:if file_name == 'todo.md':continuefile_content = file_system.display_file(file_name)@@ -1176,7 +1176,7 @@ You will be given a query and the markdown of a webpage that has been filtered telse:logger.warning('Agent wanted to display files but none were found')else:- for file_name in params.files:+ for file_name in params.files_to_display:if file_name == 'todo.md':continuefile_content = file_system.display_file(file_name)diff --git a/browser_use/tools/views.py b/browser_use/tools/views.pyindex 222679f23..105530a8c 100644--- a/browser_use/tools/views.py+++ b/browser_use/tools/views.py@@ -39,7 +39,7 @@ class InputTextAction(BaseModel):class DoneAction(BaseModel):text: str = Field(description='summary for user')success: bool = Field(description='True if user_request completed successfully')- files: list[str] | None = Field(default=[], description='files to display')+ files_to_display: list[str] | None = Field(default=[])T = TypeVar('T', bound=BaseModel)