Browser agents should know where they are allowed to go and when they need host confirmation.
Domain policy from the CLI
--allow-domain sec.gov constrains the browser run to the allowed domain. The CLI agent command exposes domain allow-listing only; use the SDK when you need the full policy object.
Domain policy in the SDK
Use domain policy for task scope, secret scope, and safer retries. For auth domains, redirect domains, origins, private access, downloads, uploads, and approval rules, see the policy reference.
Approval modes
CLI example:
SDK confirmation handler:
High-impact actions
Require clear approval before actions involving:
- Authentication.
- Account creation.
- Sensitive data.
- External submissions.
- Payments or purchases.
- Legal acceptance.
- Destructive changes.
- Permission changes.
- CAPTCHA resolution.
- File uploads.
- Out-of-scope navigation.
Approval policy is not a sandbox for arbitrary JavaScript. It is a browser-agent decision boundary. Use domain policy, server-side authorization, and application checks for defense in depth.
Reference: policy reference, agent contract, proxy reference, and security model.