diff --git a/browser-use-node/package.json b/browser-use-node/package.json index 0844478a..fe084a33 100644 --- a/browser-use-node/package.json +++ b/browser-use-node/package.json @@ -1,6 +1,6 @@ { "name": "browser-use-sdk", - "version": "3.4.2", + "version": "3.4.3", "description": "Official TypeScript SDK for the Browser Use API", "author": "Browser Use", "license": "MIT", diff --git a/browser-use-node/src/generated/v3/types.ts b/browser-use-node/src/generated/v3/types.ts index 7e2fe652..e367ccb3 100644 --- a/browser-use-node/src/generated/v3/types.ts +++ b/browser-use-node/src/generated/v3/types.ts @@ -1128,6 +1128,13 @@ export interface components { * @default false */ enableScheduledTasks: boolean; + /** + * Sensitivedata + * @description Key-value pairs of sensitive data (e.g. passwords, API keys) that the agent can use via secure placeholders. Keys are exposed to the LLM; values are never shown. The agent uses `key` placeholders in browser_type_text to securely enter values. WARNING: sensitive data may be visible in screenshots if the page renders values in unmasked form fields. + */ + sensitiveData?: { + [key: string]: string; + } | null; /** * Enablerecording * @description If true, records a video of the browser session. The recording URLs will be available in the `recordingUrls` field of the session response after the task completes. diff --git a/browser-use-python/pyproject.toml b/browser-use-python/pyproject.toml index 2b04eb63..22cb7cf2 100644 --- a/browser-use-python/pyproject.toml +++ b/browser-use-python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "browser-use-sdk" -version = "3.4.2" +version = "3.4.3" description = "Python SDK for the Browser Use cloud API" readme = "README.md" license = "MIT" diff --git a/browser-use-python/src/browser_use_sdk/generated/v3/models.py b/browser-use-python/src/browser_use_sdk/generated/v3/models.py index 4d0bfc3b..ff10c181 100644 --- a/browser-use-python/src/browser_use_sdk/generated/v3/models.py +++ b/browser-use-python/src/browser_use_sdk/generated/v3/models.py @@ -747,6 +747,12 @@ class RunTaskRequest(BaseModel): description='If true, the agent can create scheduled tasks that run on a recurring basis (e.g. "every Monday morning, check my inbox and summarize new emails"). Scheduled tasks are tied to your project and persist beyond the session. Note: all scheduled tasks are visible project-wide, so avoid enabling this in multi-user setups where task isolation is needed.', title='Enablescheduledtasks', ) + sensitive_data: Dict[str, str] | None = Field( + None, + alias='sensitiveData', + description='Key-value pairs of sensitive data (e.g. passwords, API keys) that the agent can use via secure placeholders. Keys are exposed to the LLM; values are never shown. The agent uses `key` placeholders in browser_type_text to securely enter values. WARNING: sensitive data may be visible in screenshots if the page renders values in unmasked form fields.', + title='Sensitivedata', + ) enable_recording: bool | None = Field( False, alias='enableRecording', diff --git a/browser-use-python/src/browser_use_sdk/v3/client.py b/browser-use-python/src/browser_use_sdk/v3/client.py index 33615689..b0933743 100644 --- a/browser-use-python/src/browser_use_sdk/v3/client.py +++ b/browser-use-python/src/browser_use_sdk/v3/client.py @@ -96,6 +96,7 @@ def run( profile_id: str | None = ..., proxy_country_code: str | None = ..., workspace_id: str | None = ..., + sensitive_data: dict[str, str] | None = ..., enable_recording: bool | None = ..., cache_script: bool | None = ..., **extra: Any, @@ -114,6 +115,7 @@ def run( profile_id: str | None = None, proxy_country_code: str | None = _UNSET, # type: ignore[assignment] workspace_id: str | None = None, + sensitive_data: dict[str, str] | None = None, enable_recording: bool | None = None, cache_script: bool | None = None, **extra: Any, @@ -156,6 +158,7 @@ def run( proxy_country_code=proxy_country_code, output_schema=schema_dict, workspace_id=workspace_id, + sensitive_data=sensitive_data, enable_recording=enable_recording, cache_script=cache_script, **extra, @@ -175,6 +178,7 @@ def stream( profile_id: str | None = None, proxy_country_code: str | None = _UNSET, # type: ignore[assignment] workspace_id: str | None = None, + sensitive_data: dict[str, str] | None = None, enable_recording: bool | None = None, cache_script: bool | None = None, **extra: Any, @@ -222,6 +226,7 @@ def stream( proxy_country_code=proxy_country_code, output_schema=schema_dict, workspace_id=workspace_id, + sensitive_data=sensitive_data, enable_recording=enable_recording, cache_script=cache_script, **extra, @@ -331,6 +336,7 @@ def run( profile_id: str | None = None, proxy_country_code: str | None = _UNSET, # type: ignore[assignment] workspace_id: str | None = None, + sensitive_data: dict[str, str] | None = None, enable_recording: bool | None = None, cache_script: bool | None = None, **extra: Any, @@ -384,6 +390,7 @@ async def create_fn() -> SessionResponse: proxy_country_code=proxy_country_code, output_schema=schema_dict, workspace_id=workspace_id, + sensitive_data=sensitive_data, enable_recording=enable_recording, cache_script=cache_script, **extra, diff --git a/browser-use-python/src/browser_use_sdk/v3/resources/sessions.py b/browser-use-python/src/browser_use_sdk/v3/resources/sessions.py index 99964fec..03fefabd 100644 --- a/browser-use-python/src/browser_use_sdk/v3/resources/sessions.py +++ b/browser-use-python/src/browser_use_sdk/v3/resources/sessions.py @@ -33,6 +33,7 @@ def create( output_schema: dict[str, Any] | None = None, workspace_id: str | None = None, enable_scheduled_tasks: bool | None = None, + sensitive_data: dict[str, str] | None = None, enable_recording: bool | None = None, cache_script: bool | None = None, **extra: Any, @@ -59,6 +60,8 @@ def create( body["workspaceId"] = workspace_id if enable_scheduled_tasks is not None: body["enableScheduledTasks"] = enable_scheduled_tasks + if sensitive_data is not None: + body["sensitiveData"] = sensitive_data if enable_recording is not None: body["enableRecording"] = enable_recording if cache_script is not None: @@ -170,6 +173,7 @@ async def create( output_schema: dict[str, Any] | None = None, workspace_id: str | None = None, enable_scheduled_tasks: bool | None = None, + sensitive_data: dict[str, str] | None = None, enable_recording: bool | None = None, cache_script: bool | None = None, **extra: Any, @@ -196,6 +200,8 @@ async def create( body["workspaceId"] = workspace_id if enable_scheduled_tasks is not None: body["enableScheduledTasks"] = enable_scheduled_tasks + if sensitive_data is not None: + body["sensitiveData"] = sensitive_data if enable_recording is not None: body["enableRecording"] = enable_recording if cache_script is not None: diff --git a/browser-use-python/uv.lock b/browser-use-python/uv.lock index 93aedad4..bb0a5008 100644 --- a/browser-use-python/uv.lock +++ b/browser-use-python/uv.lock @@ -31,7 +31,7 @@ wheels = [ [[package]] name = "browser-use-sdk" -version = "3.4.2" +version = "3.4.3" source = { editable = "." } dependencies = [ { name = "httpx" }, diff --git a/docs/cloud/openapi/v3.json b/docs/cloud/openapi/v3.json index a13b23de..98acdc80 100644 --- a/docs/cloud/openapi/v3.json +++ b/docs/cloud/openapi/v3.json @@ -2998,6 +2998,21 @@ "description": "If true, the agent can create scheduled tasks that run on a recurring basis (e.g. \"every Monday morning, check my inbox and summarize new emails\"). Scheduled tasks are tied to your project and persist beyond the session. Note: all scheduled tasks are visible project-wide, so avoid enabling this in multi-user setups where task isolation is needed.", "default": false }, + "sensitiveData": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Sensitivedata", + "description": "Key-value pairs of sensitive data (e.g. passwords, API keys) that the agent can use via secure placeholders. Keys are exposed to the LLM; values are never shown. The agent uses `key` placeholders in browser_type_text to securely enter values. WARNING: sensitive data may be visible in screenshots if the page renders values in unmasked form fields." + }, "enableRecording": { "type": "boolean", "title": "Enablerecording", @@ -3027,6 +3042,18 @@ ], "title": "Cachescript", "description": "Controls deterministic script caching. `null` (default): auto-detected \u2014 enabled when the task contains `@{{value}}` brackets and a workspace is attached. `true`: force-enable script caching even without brackets (caches the exact task). `false`: force-disable, even if brackets are present. When active, the first call runs the full agent and saves a reusable script. Subsequent calls with the same task template execute the cached script with $0 LLM cost. Requires workspace_id when enabled. Example: \"Get prices from @{{https://example.com}} for @{{electronics}}\"." + }, + "useOwnKey": { + "type": "boolean", + "title": "Useownkey", + "description": "If true, uses your own LLM API key (configured in project settings) instead of Browser Use managed keys. You pay your provider directly for inference; Browser Use charges a reduced orchestration fee (0.2\u00d7 of provider list prices). If no key is configured for the model's provider, the request is rejected.", + "default": false + }, + "autoHeal": { + "type": "boolean", + "title": "Autoheal", + "description": "When cache_script is active, controls whether a lightweight LLM validates the cached script output. If the output looks incorrect (empty, error, wrong structure), the system automatically re-triggers the full agent to generate a new version of the script. Set to false to disable validation and always return the raw script output.", + "default": true } }, "type": "object", diff --git a/docs/openapi/v3.json b/docs/openapi/v3.json index a8b15c62..2e715c87 100644 --- a/docs/openapi/v3.json +++ b/docs/openapi/v3.json @@ -2999,6 +2999,21 @@ "description": "If true, the agent can create scheduled tasks that run on a recurring basis (e.g. \"every Monday morning, check my inbox and summarize new emails\"). Scheduled tasks are tied to your project and persist beyond the session. Note: all scheduled tasks are visible project-wide, so avoid enabling this in multi-user setups where task isolation is needed.", "default": false }, + "sensitiveData": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Sensitivedata", + "description": "Key-value pairs of sensitive data (e.g. passwords, API keys) that the agent can use via secure placeholders. Keys are exposed to the LLM; values are never shown. The agent uses `key` placeholders in browser_type_text to securely enter values. WARNING: sensitive data may be visible in screenshots if the page renders values in unmasked form fields." + }, "enableRecording": { "type": "boolean", "title": "Enablerecording",