password, and the session picks the item from the page URL and types the value into the page, outside the agent’s context. No endpoint returns secrets. To start already signed in, use a browser profile.
Set up a vault
A vault does nothing until a browser environment binds it withvault_id. Create the vault, then bind it inline in an agent’s environments or on a catalog environment. When a vault credential matches the current page, the agent is offered a fill_secret_at action to sign in.
- Cloud browsers only, since secrets never leave H’s infrastructure.
- Manage vaults (list, update, rotate a 1Password token, delete, health-check) from the Vaults endpoints, and an H-hosted vault’s items from the item endpoints.
1Password
H-hosted
Create the vault, add one item per login, then bind it the same way:What an item holds
An item carries up to five fields, each a value the agent can fill:username, password, email, totp, and api_key. For totp, fill_secret_at types the current code, never the secret.
In an H-hosted vault, set them in the item’s values. For totp, store the authenticator secret (base32, or an otpauth://totp/ URI).
In 1Password, each one maps to a field on the item. Other fields are ignored:
How secrets are matched
Agents never name an item. The page URL picks one item, using the sites stored on it (a 1Password item’s websites, or an H-hosted vault item’surls), and the agent can fill only that item’s fields:
In an H-hosted vault, two items that still tie resolve to the most recently created one. Store one item per login so matching stays unambiguous.
Handle two-factor authentication
Authenticator apps via a vault
For a TOTP authenticator, store its secret in 1Password or as an H-hosted vault item’stotp value, then bind the vault. On a matching page, the session generates the code from the TOTP secret and fill_secret_at with totp types it in. The agent never sees the code.
Email, SMS, and confirmation links
The SDKs ship a custom tool for this: the agent callsrequest_otp, your process resolves the code or link, and the session continues with that single value. Pass otp_tool / otpTool in tools with the handler that matches where the code arrives:
Read the code from email
The IMAP handler runs in your process. It polls unread mail (newest first), extracts a code or confirmation link, marks that message read so a retry can’t reuse a stale code, and returns only that value. IMAP credentials never leave your machine, and the agent never sees mailbox contents, subjects, or senders. For Gmail or Google Workspace, use an app password.What the agent sends
Your handler receives the tool’s fixed input schema as anOtpRequest:
Return a non-empty string. An empty value fails as a tool error, so the agent can retry or stop cleanly.