Skip to content

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

remove manual event loop policy override on Windows (Python ≥3.11 uses Proactor by default)

Anirudha61946e495a3b098
diff --git a/browser_use/__init__.py b/browser_use/__init__.py
index 416200bea..5a3a74502 100644
--- a/browser_use/__init__.py
+++ b/browser_use/__init__.py
@@ -1,17 +1,7 @@
-import asyncio
-import sys
-
from browser_use.logging_config import setup_logging
logger = setup_logging()
-# Set Windows event loop policy for Playwright compatibility
-if sys.platform.startswith('win'):
- try:
- asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
- except Exception as e:
- logger.error(f'❌ Failed to set Windows event loop policy: {type(e).__name__}: {e}')
-
from browser_use.agent.prompts import SystemPrompt
from browser_use.agent.service import Agent
from browser_use.agent.views import ActionModel, ActionResult, AgentHistoryList