What you need
- a
KERNEL_API_KEY, set in the environment where your agent runs the cli. don’t paste the key into its prompt. - the KERNEL cli, with
vaults credentialsandfillsupport.
Try it with your agent
copy this prompt into your coding agent. it uses hacker news as an example login form. your agent will navigate to hacker news, then ask you to securely enter your login in a collection form rather than sharing the raw username and password in the conversation. the agent can then fill and complete the login flow for you.1. Create a vault per end-user
a vault groups one user’s credentials. use an immutable name tied to that user in your application. the prompt above creates a temporary vault instead so you can delete the demo afterward. all examples use the default project; use the same project for the vault and browser if you select a different one.2. Create a browser with the vault attached
attach the vault when you create the browser. the attachment can’t change afterward and grants access to all items in that vault, including credentials added later.read saves it for the shell examples below; an agent can retain the returned id directly.
3. Encounter a credential form
navigate to the login page and inspect the inputs before defining the credential item. hacker news has both login and create-account forms with the same input names. use selectors specific to the login form, and recheck them if the page changes. create a field definition for each required input, leaving its value unset. use only the recognizable site name fordescription, and mark ordinary usernames or email addresses sensitive: false.
pending_collection and returns a collection url. present it to the user and wait for their confirmation before continuing. in an application, render the url directly in the user’s authenticated interface. the cli prompt above instead relays the link in a private conversation. don’t open collection in the agent-controlled browser.
an existing ready item may omit the action. reuse it, or invoke the advertised collect operation to reopen the form without clearing values. see credential collection for expiry and editing behavior.
4. Fill credentials
retrieve the item after the user confirms collection.ready means required values exist, not that login succeeded. invoke only an advertised fill operation, with the exact current page url and unique input selectors. no credential values appear in the fill request.
completed, the agent can submit login once and inspect the site’s response. filling doesn’t submit the form or confirm authentication. if the operation fails, returns unknown, or loses its response, stop instead of retrying. the fill guide explains partial outcomes.
when the temporary demo is finished, delete its browser and vault. retain per-user vaults in your application according to your retention policy. for passwords on other sites, repeat the same flow with the fields and selectors you observe there; don’t reuse a credential on a different destination without the user’s authorization.