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
Enhance documentation for file writing action and improve field descriptions
Magnus Müller6098685bcaa7
diff --git a/browser_use/tools/service.py b/browser_use/tools/service.pyindex 95f7c9fd7..040650473 100644--- a/browser_use/tools/service.py+++ b/browser_use/tools/service.py@@ -930,7 +930,9 @@ You will be given a query and the markdown of a webpage that has been filtered t# File System Actions- @self.registry.action('')+ @self.registry.action(+ 'Write content to a file. Supports multiple formats: .txt, .md, .json, .jsonl, .csv, .pdf. For PDF files, write content in markdown format and it will be automatically converted to a properly formatted PDF document.'+ )async def write_file(file_name: str,content: str,diff --git a/browser_use/tools/views.py b/browser_use/tools/views.pyindex dddcd99f3..a6a5cd77d 100644--- a/browser_use/tools/views.py+++ b/browser_use/tools/views.py@@ -37,7 +37,7 @@ class InputTextAction(BaseModel):class DoneAction(BaseModel):- text: str = Field(description='summary for user')+ text: str = Field(description='summary for user in the format the user requested')success: bool = Field(default=True, description='True if user_request completed successfully')files_to_display: list[str] | None = Field(default=[])@@ -46,8 +46,8 @@ T = TypeVar('T', bound=BaseModel)class StructuredOutputAction(BaseModel, Generic[T]):- success: bool = Field(default=True, description='1=done')- data: T+ success: bool = Field(default=True, description='True if user_request completed successfully')+ data: T = Field(description='The actual output data matching the requested schema')class SwitchTabAction(BaseModel):