Skip to main content
This recipe combines three primitives so an autonomous browser agent can operate inside an authenticated account without ever seeing plaintext passwords:
  1. Pre-created browser session attached to an encrypted Vault and short-lived Live View token (liveViewTtlSeconds).
  2. Credential Fill so secrets are decrypted only on the browser host and typed into allowed origins.
  3. Browser Use running against sessionId with keepBrowserOpen: true so a human can inspect or intervene via session.liveUrl.
Required API key scopes: browser.sessions.create, browser.sessions.update, browser.sessions.stop, secrets.use, agents.browser-use.run, agents.browser-use.read.

Prerequisites

  • HYPERBROWSER_API_KEY exported in your shell and a pre-created vault named portal-login containing USERNAME and PASSWORD entries with allowedOrigins configured for https://portal.example.com.
  • @hyperbrowser/sdk (TypeScript) or hyperbrowser (Python) installed.

End-to-End Flow

Need a read-only observer link for dashboards or audit viewers? Pass viewOnlyLiveView: true when creating the session.

Expected output

  • Logs the 30-minute Human-in-the-loop Live View URL for operator takeover or audit inspection.
  • Prints per-field credential fill statuses (filled) without returning plaintext secret values, followed by the extracted invoice number and amount from task.data.finalResult.

Next Steps

  • Credential Fill — TOTP one-time codes, 1Password references, and origin allowlists.
  • Live View — short-lived tokens and read-only observer links.