Skip to content

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

document the keep_alive flag

Nick Sweetingd6a7b9e2c421
diff --git a/docs/customize/browser-settings.mdx b/docs/customize/browser-settings.mdx
index 65bdb7c50..6a290d2ac 100644
--- a/docs/customize/browser-settings.mdx
+++ b/docs/customize/browser-settings.mdx
@@ -41,6 +41,9 @@ agent = Agent(
- **disable_security** (default: `False`)
Disables browser security features. While this can fix certain functionality issues (like cross-site iFrames), it should be used cautiously, especially when visiting untrusted websites.
+- **keep_alive** (default: `False`)
+ Keeps the browser alive after the agent has finished running. This is useful when you need to run multiple tasks with the same browser instance.
+
### Additional Settings
- **extra_browser_args** (default: `[]`)
@@ -173,6 +176,11 @@ async def run_search():
List of allowed domains that the agent can access. If None, all domains are allowed.
Example: ['google.com', 'wikipedia.org'] - Here the agent will only be able to access google and wikipedia.
+### Session Management
+
+- **keep_alive** (default: `False`)
+ Keeps the browser context (tab/session) alive after an agent task has completed. This is useful for maintaining session state across multiple tasks.
+
### Debug and Recording
- **save_recording_path** (default: `None`)