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
set windows async event loop policy to fix playwright async issues
Nick Sweeting02254d810741
diff --git a/browser_use/__init__.py b/browser_use/__init__.pyindex 46612163d..c7ec40c0c 100644--- a/browser_use/__init__.py+++ b/browser_use/__init__.py@@ -1,7 +1,14 @@+import asyncio+import sys+from browser_use.logging_config import setup_loggingsetup_logging()+# Set Windows event loop policy for Playwright compatibility+if sys.platform.startswith('win'):+ asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())+from browser_use.agent.prompts import SystemPromptfrom browser_use.agent.service import Agentfrom browser_use.agent.views import ActionModel, ActionResult, AgentHistoryList