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
add sensitive data example
mertunsall8880a2db37dd
diff --git a/examples/features/sensitive_data.py b/examples/features/sensitive_data.pyindex 33206cc7b..76184a457 100644--- a/examples/features/sensitive_data.py+++ b/examples/features/sensitive_data.py@@ -12,9 +12,16 @@ from browser_use import Agentfrom browser_use.browser import BrowserProfilefrom browser_use.llm import ChatOpenAI+try:+ from lmnr import Laminar++ Laminar.initialize(project_api_key=os.getenv('LMNR_PROJECT_API_KEY'))+except Exception as e:+ print(f'Error initializing Laminar: {e}')+# Initialize the modelllm = ChatOpenAI(- model='gpt-4o',+ model='gpt-4.1',temperature=0.0,)# Simple case: the model will see x_name and x_password, but never the actual values.@@ -35,7 +42,7 @@ sensitive_data: dict[str, str | dict[str, str]] = {'https://*.google.com': {'g_email': '[email protected]', 'g_pass': 'google_password'},}# Update task to use one of the credentials above-task = 'Go to example.com and login with company_username and company_password'+task = 'Go to google.com and put the login information in the search bar.'# Always set allowed_domains when using sensitive_data for securityfrom browser_use.browser.session import BrowserSession