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
Add error msg for agent if site crashes
Magnus Müllerbf266c6ed0cc
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 82d453fde..e079a5329 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -622,6 +622,9 @@ class Agent(Generic[Context, AgentStructuredOutput]):try:return await self.browser_session.get_state_summary(cache_clickable_elements_hashes)except Exception as e:+ if self.state.last_result is None:+ self.state.last_result = []+ self.state.last_result.append(ActionResult(error=str(e)))self.logger.warning(f'Full state retrieval failed: {type(e).__name__}: {e}')self.logger.warning('🔄 Falling back to minimal state summary')