Secret values allow you to securely pass credentials, API keys, and other sensitive data to AI agents during task execution. These values are automatically handled at type-time, never logged, and never exposed to the AI model. Secret values work with all agent types:Documentation Index
Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
Use this file to discover all available pages before exploring further.
browser-use, openai-cua, anthropic-cua, and gemini-computer-use.
Basic Usage
Pass credentials as key-value pairs insecretValues. The agent will securely use these values when logging into websites or filling forms.
Domain-Scoped Secrets
For enhanced security, you can scope secrets to specific domains. Secrets will only be available when the browser is on a matching domain - preventing credential exposure on the wrong site.Domain Pattern Examples
| Pattern | Matches |
|---|---|
*.linkedin.com | www.linkedin.com, login.linkedin.com |
linkedin.com | linkedin.com, www.linkedin.com |
https://*.google.com | Only HTTPS Google subdomains |
* | All domains (use sparingly) |
TOTP / Two-Factor Authentication
Secret values support automatic TOTP code generation for 2FA. Use thebu_2fa_code suffix for your TOTP secret key:
Best Practices
Use Environment Variables
Never hardcode secrets in your code. Always load from environment variables or a secrets manager.
Scope to Domains
Use domain-scoped secrets for multi-site tasks to prevent credential leakage.
Meaningful Key Names
Use clear, descriptive key names like
LINKEDIN_PASSWORD instead of PASS1.Minimal Exposure
Only include secrets that the task actually needs.
Security Guarantees
| Guarantee | Description |
|---|---|
| Never logged | Secret values are excluded from all logs and telemetry |
| Never sent to AI | Real values are never visible to the AI model |
| Type-time replacement | Secrets are only used at the moment of typing |
| Domain isolation | Domain-scoped secrets are only available on matching URLs |
| No storage | Secrets are processed in-memory and never persisted |

