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
Remove brief delay in agent session initialization to streamline task dispatching
Magnus Müller1f1df8b9bb99
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 583d01647..25442d0e5 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -1461,9 +1461,6 @@ class Agent(Generic[Context, AgentStructuredOutput]):# Emit CreateAgentSessionEvent at the START of run()self.eventbus.dispatch(CreateAgentSessionEvent.from_agent(self))- # Brief delay to ensure session is created in backend before sending task- await asyncio.sleep(0.2)-self.state.session_initialized = Trueself.logger.debug('📡 Dispatching CreateAgentTaskEvent...')