Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix type hinter

Nick Sweetingc6dae628b7ae
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index cd6008d33..888450f31 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -457,6 +457,7 @@ class Agent(Generic[Context]):
self.logger.info(f'💬 Saving conversation to {_log_pretty_path(self.settings.save_conversation_path)}')
# Initialize download tracking
+ assert self.browser_session is not None, 'BrowserSession is not set up'
self.has_downloads_path = self.browser_session.browser_profile.downloads_path is not None
if self.has_downloads_path:
self._last_known_downloads: list[str] = []