From .env to a vault, step by step.
Part 1 works today with the AgentKit CLI. Part 2 describes the preview sync commands and Part 3 the agent commands (discovery in agentkit dev builds, the rest planned); each step is marked and its syntax may change before release. Parts 5 to 7 cover the browser dashboard and remote MCP, which are on in production by owner decision on 2026-11-01, before their release gate passed: pre-release, not for production credentials.
available works in the current ak CLI. preview ships hidden in the released CLI but is not a supported workflow; syntax may change. dev builds is in agentkit dev builds and coming in the next release, not in a released version. planned is designed but not released; do not script against it yet. The production sync API is live as a pre-release preview, enabled before the owner's review. The owner accepted the review gate on 2026-10-16 with no written findings; it is not an independent third-party review.
Keep secrets in the local vault available
Everything stays on this machine: values live in the OS keychain by default, or in an age-encrypted file vault, and agents read them through references you control.
Install the AgentKit CLI
availableThe local vault ships inside
ak, the AgentKit CLI. AgentKit is in closed beta; follow the install instructions at agentkit.best.Import an existing
available.envfileExisting keys are skipped unless you pass
--force. Check the result, then delete the plaintext file.$ ak secrets import-env .env $ ak secrets listAdd or replace a single secret
availablesetandrotateprompt for the value without echoing it, so it never lands in your shell history. They also accept--value=-from stdin or--value-file.$ ak secrets set OPENAI_API_KEY $ ak secrets rotate OPENAI_API_KEYInspect without revealing
availablegetshows metadata and prints the value as[redacted]. Add--revealonly when you need to see it; it asks you to confirm first.$ ak secrets get OPENAI_API_KEYReference secrets in agent configs
availablePut a reference where the value used to be.
akresolves it locally, and only for an agent binary you have granted.OPENAI_API_KEY=${secret:OPENAI_API_KEY}Decide which agents may read it
availableWhen an agent asks for a secret, the request waits for you. Answer it once, for a time window, or grant an agent fingerprint ahead of time. The audit ledger shows every access and the grant that allowed it.
$ ak secrets approve $ ak secrets grants $ ak secrets audit
Sync a second device preview
The end-to-end encrypted sync described on this site. A pre-release preview is live in production, enabled before the owner's review, which is not an independent third-party review. The steps below are not a supported workflow until every release gate is met, and production credentials do not belong in it yet.
Sign in to your AgentKit account
availableak loginexists today for your AgentKit account; the preview sync commands use that sign-in.$ ak loginOpt in to sync on your first device
previewSync stays off until you turn it on. Enabling it creates the vault key on this device, wraps it to your device key, a password-derived key and a recovery key, and uploads only ciphertext.
# PREVIEW: hidden in the released CLI, unsupported, syntax may change $ ak secrets sync enableSave your recovery key offline
previewYou will be shown a 32-byte recovery key, written in Crockford base32. Store it on paper or in a password manager you trust. If you lose every device, your password and this key, nobody can decrypt the vault.
Enroll a second device with a six-digit code
previewStart enrollment on the new device and approve it on one you already trust. Both screens show the same six digits; approve only if they match. A mismatch aborts. See how the code is derived.
Check that it worked
previewThe new device verifies the signed member list before it unwraps anything. Change a secret on one device and expect it on the other within about a minute on a healthy connection (a design target, not a measured result).
Let agents discover and use secrets dev builds and planned
Commands that let an agent find and request secrets without ever seeing values it was not granted. Discovery is in agentkit dev builds; request and run are planned.
Let agents find secrets by description
dev buildssearchfinds secrets by their metadata anddescribeshows one secret's profile and where each field came from, never a value. Both are available in agentkit dev builds and coming in the next release; no released version has them yet.# DEV BUILDS: available in agentkit dev builds, coming in the next release; syntax may change $ ak secrets search "openai" $ ak secrets describe OPENAI_API_KEYLet agents ask for what they need
plannedrequestis planned so an agent can ask for a secret it has not been granted, and the request waits for your approval.Run a process with secrets injected
plannedrunis planned to start a child process with the approved values in its environment. That process receives plaintext by design, so grant it only to software you trust.# PLANNED: not available yet, syntax may change $ ak secrets run -- npm start
If a device is lost or stolen
Some of this works today on the local vault; the device-removal and recovery steps are in preview.
Revoke the lost device
previewA removed device is checked on every request, so it is refused even with an unexpired token. Removal also moves the vault to a new key epoch before new writes. Removal and recovery need
v3.0.0-beta.31or later, which includes the removal-fence client; the service refuses them from older releases. On an older release, upgrade or revoke the lost device in your AgentKit account, which the service enforces on its next request.Rotate what it could read
availableRevocation cannot take back values the device already decrypted. Rotate sensitive credentials at the provider, then store the new value. This works today.
$ ak secrets rotate OPENAI_API_KEYCut off agents on that machine
availableRemove an agent fingerprint's grants on one secret, or all of them at once.
$ ak secrets revoke OPENAI_API_KEY --agent sha256:<fingerprint> $ ak secrets revoke --agent sha256:<fingerprint> --allLost every device? Recover with your password or recovery key
previewA fresh device can enroll itself through the encrypted recovery bundle, which also carries the owner's public trust anchor and the newest witnessed checkpoint so it does not have to trust the server. Needs
v3.0.0-beta.31or later; see the step above.
Use your vault from the browser pre-release
Pre-release, not for production credentials. The dashboard runs at https://vault.agentkit.best/app with your AgentKit account.
The dashboard is a device of your vault, like a second laptop. It creates its own device keys in the browser, keeps them in IndexedDB as non-extractable keys, and decrypts in the page, so the server still receives only ciphertext from it. Version 1 enrollment adds devices only to an account that owns the vault, so the dashboard is for vault owners; an editor of a shared vault cannot add a browser.
Sign in
pre-releaseOpen the dashboard and sign in with your AgentKit account. There is no passphrase: every visit unlocks with a fresh sign-in. Lock, or leaving the page, drops the session and the decrypted view from memory and ends the sign-in; the device keys stay in this browser.
Approve the browser from an owner device
pre-releaseUses the preview sync commands from Part 2. The first sign-in shows a join code starting
akj1-. On a device that already owns the vault, run the command below. It prints an offer code: paste it into the browser, which then shows a six-digit code. Answeryin the terminal only if both codes match, then choose I approved it, continue. Approval needs you at a terminal; it is refused for an agent and with--json.# PREVIEW: hidden in the released CLI, unsupported, syntax may change $ ak secrets devices approve <join code>What the dashboard can do
pre-releaseList secrets with their metadata (sensitivity, dates and profile fields, each marked with where it came from), filter by name or metadata, find an exact name, set a value, delete a secret, open a secret's signed revision history, restore an earlier value as a new revision and resolve conflicting branches. Filtering and search run in the browser over the copy it verified; no query goes to the server.
Members and access
pre-releaseThe Members and access tab is read-only. It lists the accounts the signed membership chain names, their roles and devices, removed devices, the key epoch, a pending rekey and the items a removal flagged for rotation, and says what this browser session can and cannot do. Inviting, removing, changing roles and rekeying are done on an owner device, never in the browser. A removal ends future access only: rotating the vault key does not revoke provider keys that were already disclosed, so rotate those at the provider.
What it never does
It never shows, copies or stores a value: the value field is write-only and is cleared when you save. History lists each revision's device, time, key epoch, deletions and conflict branches, never a value; a revision this browser has no key for is marked unavailable / unverified. Restore and conflict resolution are explicit confirmations that write one new signed revision against the current head: a concurrent change becomes a conflict, never an overwrite, a deleted secret is not brought back, and restoring an old credential does not make it valid again at its provider, so rotate or revoke it there if it may be exposed. A conflict that includes a deletion or an unreadable branch is left to
ak secrets sync settle. It signs no checkpoints. It cannot change membership, read the recovery bundle, publish the seal key or apply queued writes: the server refuses those for a browser session.
Connect an AI tool with remote MCP pre-release
Pre-release, not for production credentials. Remote MCP lets a hosted AI tool search, describe, set and use your secrets without a local CLI. It never returns a secret value.
Add the server
pre-releaseIn your AI tool's MCP or connector settings, add
https://vault.agentkit.best/mcp. The tool finds the sign-in server through/.well-known/oauth-protected-resource/mcpand sends you to AgentKit to sign in and approve the access it asks for.Choose what it may do
Each scope in plain words, with the tools it unlocks:
vault-mcp:read: see the names and descriptions of your secrets, never their values (secrets_search,secrets_list,secrets_describe).vault-mcp:write: add, replace or delete secrets; it can write a value but never read one back (secrets_set,secrets_delete), or ask you to type a value it never sees (secrets_request_input,secrets_prepare_write,secrets_write_status).vault-mcp:use: ask to use a secret, and run commands you approved on your own device with it; values go to that command only, never to the AI tool (secrets_request,secrets_run).
Keep one of your devices online for reads and use
pre-releaseNeeds
akv3.0.0-beta.36 or later, which includes the stable v3.0.0, where the sync commands are still hidden in the CLI help. On that device runak secrets sync now --watch --relayand leave it running. Reads,requestandrunare answered by one of your own devices that holds a relay connection open: it decrypts locally, applies its own grants and approvals, and answers. With no device online they answerno_device_online.runstarts only commands that anexecgrant pinned on that device allows, and removes the values it released from the output; output that a command encoded, split or printed in part is not caught.Writes with no device online are queued, sealed
pre-releaseDraining the queue needs the same
akversion:ak secrets sync now --watch --relayapplies the queued writes. With no device online,secrets_setandsecrets_deletemust name thevault_id. The server seals the operation to your vault's seal key and queues it (statusqueued) until one of your devices applies it as a normal signed write. The queue is write-only: nothing reads a queued value back. It works only for an owner or editor of the vault, only after an owner device has published the seal key, and not while a rekey is pending. A full queue answerssealed_queue_full.Type secrets the AI must not see yourself
pre-releaseThe
/inputform and the dashboard form are available.secrets_setputs the value in the AI tool's own conversation and tool call, so never paste a secret into the chat for it. Instead the AI tool callssecrets_request_inputwith only the name (and, if it likes, a purpose). The server picks the flow and tells the AI tool which one it used.- Device flow (
/input). If one of your devices is online (step 3) and supports input requests, the AI tool gives you a link tohttps://vault.agentkit.best/input. Open it in any browser and sign in to the same AgentKit account; you do not need an enrolled browser. Check the name, the purpose and which AI tool asked, then type the value or cancel. The page encrypts the value to a one-time key that your online device holds in memory, and the server relays that ciphertext to the device without storing it. The page cannot check that key, so it trusts the server for it (ADR 0004, residual risks). An owner or editor of the vault can use this flow, with one of their own devices. The device writes it as a normal signed record, and the AI tool learns only whether it was saved, throughsecrets_write_status. If that device is offline when you submit, the submission is refused and you can try again once it reconnects, before the link expires. If the device restarted, the request fails and the AI tool has to ask again. - Dashboard flow. With no online device that supports input requests, the server falls back to the dashboard form: open the link in the browser you enrolled in Part 5 (
secrets_prepare_writedoes the same thing when called directly). Your browser encrypts and signs the value like any other write. Only a vault owner can use it: an editor of a shared vault cannot enroll a browser, so a request from an editor account is refused. With neither flow available the request fails withdevice_offline; it never asks for the value. - Both flows. The link works once, expires within ten minutes, and only for you, signed in to your own account.
createnever overwrites a secret that already exists; replacing one needs a request forreplace. The AI tool chooses the name and purpose, so read them before you type.
- Device flow (
Approve a waiting agent from anywhere
pre-releaseWhen an agent on one of your devices asks for a secret it has no grant for, that device can ask you instead of waiting at its own terminal. Open the dashboard in the browser you enrolled in Part 5: a panel lists the devices waiting for you, with the secret’s name, the agent and its fingerprint, the project and the agent’s reason (its own words, unverified). Choose Allow once, Allow for 15 minutes, 1 hour or 8 hours, or Deny. Your browser signs the answer and the requesting device checks it before it uses the secret; no secret value travels with it. An AI tool can list waiting requests (
secrets_approvals_list) and deny one (secrets_approvals_deny);secrets_approvals_allowonly hands you the dashboard link. Each request is answered once and expires within a day.Know what the server sees
The server stores no plaintext and holds no vault key, but a remote MCP call is not end-to-end encrypted: plaintext passes through the server's memory after TLS ends. That is every argument an AI tool sends in an MCP call, including the value of a set, until the server seals it or relays it to your device, the name and purpose of a write or input request for you to type a secret, until the server seals them or relays them to your device, and the names, metadata and redacted
runoutput your device sends back on their way to the AI tool. It is never logged, stored or put in an error. AI tools do not check device signatures, so they trust the server for what a result says. See ADR 0002, decision D7.Disconnect
In your AgentKit account, open Connected apps and disconnect AgentKit Vault (AI tools). The next request with that grant is refused, and a link it asked for no longer works.
Call budgets per AI tool and per account, relay deadlines, the queue size and lifetime, and the write-request link lifetime and caps are owned by worker/src/limits.ts and published by GET /v1/meta where remote access is on.
Remove a browser pre-release
Pre-release, not for production credentials.
Find its device ID
previewThe dashboard header shows the first eight characters as "Device …", and the CLI lists every device.
# PREVIEW: hidden in the released CLI, unsupported, syntax may change $ ak secrets devices listRemove it and rotate the vault key
previewRun it from an owner device. Removal moves the vault to a new key so the browser cannot read new writes. It asks for the vault password and the current recovery key. Use
--reason lost,stolenorcompromisedwhen that fits better. It cannot take back what the browser already decrypted: if the browser may be compromised, rotate those secrets at their provider. When the removed browser next syncs, it is refused and deletes its own device key.# PREVIEW: hidden in the released CLI, unsupported, syntax may change $ ak secrets devices remove <device-prefix> --reason retiredEnd its sign-in
If Connected apps lists AgentKit Vault dashboard, disconnect it too.
Keep reading
Reading this with an AI assistant? Grab the Markdown version, or open it straight in your assistant.