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
gif file naming
erikmuttersbache9ede54f9073
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex c29380a44..58468e3ba 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -73,6 +73,7 @@ class Agent:max_input_tokens: int = 128000,validate_output: bool = False,generate_gif: bool = True,+ gif_filename: str = 'agent_history.gif',include_attributes: list[str] = ['title','type',@@ -99,6 +100,7 @@ class Agent:self.include_attributes = include_attributesself.max_error_length = max_error_lengthself.generate_gif = generate_gif+ self.gif_filename = gif_filename# Controller setupself.controller = controllerself.max_actions_per_step = max_actions_per_step@@ -432,7 +434,7 @@ class Agent:await self.browser.close()if self.generate_gif:- self.create_history_gif()+ self.create_history_gif(output_path=self.gif_filename)def _too_many_failures(self) -> bool:"""Check if we should stop due to too many failures"""