Skip to content

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

change default user_data_dir to be None

Nick Sweetinge71f8719f97b
diff --git a/browser_use/browser/profile.py b/browser_use/browser/profile.py
index 6764cb557..8914b0ee1 100644
--- a/browser_use/browser/profile.py
+++ b/browser_use/browser/profile.py
@@ -534,7 +534,7 @@ class BrowserLaunchPersistentContextArgs(BrowserLaunchArgs, BrowserContextArgs):
model_config = ConfigDict(extra='ignore', validate_assignment=False, revalidate_instances='always')
# Required parameter specific to launch_persistent_context, but can be None to use incognito temp dir
- user_data_dir: str | Path | None = BROWSERUSE_PROFILES_DIR / 'default'
+ user_data_dir: str | Path | None = None
class BrowserProfile(BrowserConnectArgs, BrowserLaunchPersistentContextArgs, BrowserLaunchArgs, BrowserNewContextArgs):