fill api call writes selected values from an item into browser fields, without exposing secrets to your application or agent. your application or agent owns navigation, field selection, submission, and recovery.
start with the end-user auth workflow cookbook for an end-to-end example of secure collection, browser attachment, the fill operation, form submission, and cleanup.
KERNEL collects credential values from the user or accepts them from a trusted backend. when invoking fill, your controller sends field names and selectors rather than credential values. KERNEL reads the encrypted item and returns value-free outcomes, keeping stored secrets out of agent prompts and browser-automation payloads.
fill only writes stored values into fields you select. it doesn’t discover fields, navigate, submit forms, verify authentication, monitor the session, or reauthenticate. your application or agent owns each of those steps.When to use it
Fill from Vault works best when:- a login or authentication prompt can appear in the middle of a workflow, in the same browser session.
- your product needs to control the credential collection experience.
- your application or agent already handles browser navigation and site-specific recovery.
- you don’t need KERNEL to monitor the session or reauthenticate it automatically.
How it works
these examples continue in order, using hacker news as the login destination. setKERNEL_API_KEY in your trusted backend environment. all examples use the default project; keep the vault and browser in the same project if you select a different one.
1
Create a Vault
create a vault for each end user or credential-sharing boundary. A vault groups the items that an attached browser session can use.
2
Attach the Vault to a Browser
attach the vault when you create the browser. The attachment can’t change during the session and grants access to every item in that vault.
3
Navigate and Collect Credentials
your application or agent navigates to the login page and identifies its fields before defining a credential item. hacker news has both login and create-account forms; the selectors in the next step target the login form. inspect the page and recheck them if it changes.present the collection url only in the intended user’s authenticated interface or private conversation. don’t log it or open it in the agent-controlled browser. wait for the user to finish before continuing. an existing ready item may omit the collection action; reuse it or follow credential collection to reopen the form.
4
Invoke the Fill Operation
retrieve the same item, require readiness and an advertised
fill operation, then invoke fill with field names and selectors. readiness means values exist, not that the website has accepted them. your application must authorize the destination before filling.completed means the selected fields were filled, not that login succeeded. if fill fails, returns an uncertain outcome, or loses its response, stop and inspect the outcome rather than automatically retrying.5
Submit and Handle the Response
after
fill completes, your application or agent submits the login form once and verifies the site’s response. fill doesn’t perform either step. handle any additional authentication prompts before continuing the task.delete the demo browser when finished, and delete the vault only if you created it for this demo and no longer need its credentials. see the cookbook for the complete agent handoff and cleanup guidance.Credential sources
you can collect values from an end user with KERNEL’s hosted collection form or copy them from an existing credential vault that your trusted backend can read. both paths produce a ready credential item and use the samefill operation.
today, copying values stores an encrypted KERNEL copy. fill doesn’t accept raw values or a third-party vault reference in its request.
Session state
fill completes one part of the workflow. it doesn’t monitor the resulting session or reauthenticate it later. if you want to reuse the authenticated state, create the browser with a profile and save its changes after the login succeeds.
Next steps
Credential Items
define fields, collect values, and update credentials without returning sensitive values.
Fill Browser Fields
map credential fields to browser inputs and handle completed, failed, or unknown outcomes.
Build an End-User Auth Workflow
follow the complete collection and browser fill workflow with the sdk or cli.