Vault: sign-ins for agents
Datum Vault keeps your organization’s sign-ins. Every browser you start fills a sign-in form by itself when the vault has a credential for that site, and your agent can ask it to fill at any moment over the CDP connection it already has. The password stays out of your agent’s prompt, its code and its logs.
Add a credential
Section titled “Add a credential”On the dashboard’s Vault page, Add credential:
- Name: yours, such as “GitHub, deploy bot”.
- Sites: where it may be filled.
github.comcovershttps://github.comand its subdomains. Write a port when the site has its own (example.com:8443), and the whole address for plain HTTP (http://localhost:3000). A pasted address is cut down to its site. - Username and password.
- Authenticator (optional): the setup key the site shows when you turn on two-step sign-in with an app, or the
whole
otpauth://address behind its QR code. The vault then fills the current six-digit code too. - Fill: by itself when its sign-in form appears, or only when the agent asks.
Or from code, with your secret key (API reference):
curl -X POST https://browser.datum.network/api/v4/vault/credentials \ -H "X-Browser-Use-API-Key: $DATUM_API_KEY" -H "Content-Type: application/json" \ -d '{"sites": ["github.com"], "username": "deploy@acme.dev", "password": "…"}'The API takes passwords and never answers one.
That is all the set-up: there is nothing to pass when you create a browser. A browser already running picks up your first credential within a minute, and later changes within seconds.
What happens in the browser
Section titled “What happens in the browser”page.goto("https://github.com/login")page.wait_for_function("document.querySelector('#password').value !== ''") # filled by the vaultpage.click("[type=submit]")- A sign-in form on one of a credential’s sites is filled as soon as it shows: a form in two steps (email, then password), a form a script builds later, a form in a frame, a code field after the password.
- Nothing is submitted for you. Your agent presses the button, or asks the vault to (
submitbelow). - Sign-up forms, change-password forms and newsletter boxes are left alone.
- When several credentials fit the same site equally, none is filled: your agent says which (
credentialId). - A credential is only ever filled into a page of its own sites. A look-alike page on another address gets nothing, even when your agent asks.
Ask from your agent
Section titled “Ask from your agent”Three commands on a page’s CDP session. They are answered by BrowserReal and never reach Chrome, so a page cannot see them.
cdp = page.context.new_cdp_session(page)
cdp.send("DatumVault.list")# { "url": "https://github.com/login",# "credentials": [{ "id": "…", "name": "GitHub, deploy bot", "username": "deploy@acme.dev",# "sites": ["github.com"], "hasTotp": true, "autofill": "auto", "forThisPage": true }],# "fields": [{ "frameUrl": "https://github.com/login", "username": true, "password": true, "totp": false }] }
cdp.send("DatumVault.fill") # the vault picks the credential and the fieldscdp.send("DatumVault.fill", {"submit": True}) # and submits
cdp.send("DatumVault.fill", { # or say which credential and which fields "credentialId": "…", "username": "#email", "password": "#pass", "totp": "input[name=code]",})# { "credential": { "id": "…", "name": "GitHub, deploy bot", "username": "deploy@acme.dev" },# "filled": { "username": true, "password": true, "totp": false }, "submitted": false,# "frameUrl": "https://github.com/login" }const cdp = await page.context().newCDPSession(page);await cdp.send('DatumVault.fill' as any, { submit: true });| Command | Parameters | |
|---|---|---|
DatumVault.status |
Whether the vault is on in this browser, and how many credentials it has. | |
DatumVault.list |
all: true for every credential, not only this page’s |
The credentials for the page and the sign-in fields it shows. Never a password. |
DatumVault.fill |
credentialId, username, password, totp (CSS selectors), submit, targetId |
Fills, and says what it filled. |
A failure is a CDP error with a sentence that says what to do, such as The vault has no credential for example.com,
No sign-in field found on this page: name the fields (username, password, totp selectors) or
Several credentials are for example.com (…): pass credentialId.
Use DatumVault.fill with selectors when a site’s form is unusual and is not filled by itself.
With profiles
Section titled “With profiles”A profile keeps you signed in between sessions; the vault signs you in again when the site has signed you out. They work together: start browsers with a profile, and let the vault handle the sign-in page when it comes back.
What to know about security
Section titled “What to know about security”- Passwords and authenticator secrets are encrypted at rest with a key of your organization’s own. A browser is given an authenticator’s current code, never its secret.
- A credential leaves the vault only for one of your own running browsers, on a page of the credential’s sites, at the moment it is filled. The Vault page lists every use, and every time a member had a password shown.
- Your agent can still read what was filled. It drives the browser, so it can read a field’s value if it looks. The vault keeps secrets out of prompts, code and logs; it is not a wall between the secret and the agent. Give an agent’s account no more rights on the site than the agent should have.
- A recording shows a password field as the site does: dots.