Close Chrome completely before running to avoid conflicts.
Chrome Profile Paths by OS
OS
User Data Dir
macOS
~/Library/Application Support/Google/Chrome
Windows
%LOCALAPPDATA%\Google\Chrome\User Data
Linux
~/.config/google-chrome
2. Use Persistent Browser Session
For production, use a dedicated user data directory:
from openbrowser import Agent, Browser, ChatGoogleimport tempfile# Create persistent browser with custom user databrowser = Browser( user_data_dir='./browser_data', # Persists between runs headless=False, # Set True for production)agent = Agent( task="Login to example.com and check notifications", browser=browser, llm=ChatGoogle(model="gemini-3-flash-preview"))await agent.run()
3. Remote Browser via CDP
Connect to a remote browser using Chrome DevTools Protocol: