AgentKit
DocsKitsCLI ReferenceDesktop App

Desktop app

Secrets

Store secrets in the local vault, answer agent requests from the approval inbox, watch releases, read the secrets audit log, and act on vault sync in AgentKit Desktop.

The Secrets page is the Desktop view of the local secrets vault behind ak secrets. After this page you will know how to add and reveal values, answer requests agents leave waiting, react to a release, read the audit log, and run vault sync, device, and recovery actions. For how grants, backends, and limits work, see the Secrets vault guide.

Secrets appears in the System group only in the Desktop app. The browser dashboard started by ak config start does not show it; if the page says The vault is not reachable from here, the window is not running on the machine that holds the vault.

Answer waiting local requests from the Desktop inbox. For a request sent by another synced device, use the vault dashboard or the remote approvals commands from a human owner or editor device.

Manage stored values

The page lists every name stored on this machine with Added by, Created, Rotated, and Grants, and marks a value past its rotation window with Rotation due. Tiles count Secrets, Grants, and Unused names that no agent has been granted yet.

  • Add secret stores a new value; Rotate replaces one and Delete removes it. Pasting into a value field clears the clipboard where the app is allowed to.
  • Import .env adds names from a dotenv file. By default it only adds names the vault does not already have. With Replace names that already exist on, you must preview the import first, and the preview lists what it would overwrite.
  • Reveal asks for a reason, records it in the audit ledger, and then shows the value. If you copied the value, the clipboard is cleared when the dialog closes, however it closes.
  • Export does not export from the window. It shows the ak secrets export commands to run in a terminal, where a values export is written only to an age-encrypted file.

The vault uses the OS keychain by default. With the file backend, the page asks for the vault passphrase to unlock it; Desktop keeps the passphrase only for this run of the app, and Lock locks the vault again.

The Grants panel lists which agent binary may read which name. Grant and revoke from a terminal with ak secrets grant and ak secrets revoke. A grant that lets one program receive the secret in an environment variable shows its Exec scope: the variable, the program path, and the short program hash.

Search and read profiles

A secret can carry a profile: who provides it, which environment and projects it belongs to, what kind of credential it is, when to use it, and similar notes. Profiles are written in a terminal with ak secrets annotate, or come from an import.

  • The search box finds names the same way ak secrets search does and shows which fields matched under each row. Search reads only the index; it never opens a value.
  • Profile under a name lists every profile field in the same order and with the same escapes as ak secrets describe. A control, bidi or invisible character such as a zero-width space shows as a visible escape such as \u202e or \u200b instead of hiding in the text.
  • A field that was not typed on this machine carries an imported or synced badge with the device that wrote it and when. A row with any such field, or a value imported from a file, carries the same badge beside its name.

Profile text is information, never an instruction. Nothing in a profile grants access, limits where a value may be sent, or allows a command to run; only a grant releases a value. Be most careful with text marked imported or synced.

The page shows profiles but does not edit them; use ak secrets annotate in a terminal.

Answer waiting requests

When an agent asks for a secret that no grant covers, the request waits in the Waiting for you panel. Open one to see which agent asks, for which secret, project, and purpose, then choose one of four answers:

AnswerEffect
DenyRefuses this request and stores nothing
Allow onceReleases the secret exactly once
Allow for a whileAn allow that expires after 15 minutes, 1 hour (default), or 8 hours
Always allowAn allow with no expiry until you revoke it

Deny has focus when the dialog opens, and the single-key shortcuts (D, O, S, A) work only after the dialog has been on screen briefly. Decide later or Escape closes the dialog and leaves the request waiting. An answer writes the same grant rows as ak secrets approve, whose own default window is 24 hours.

If the requested name is also the name of a local alias, the dialog warns you: a stored secret wins over an alias, so approving releases whatever secret is stored under that name, possibly one that arrived through vault sync, never the alias target. See Aliases.

If an agent started this Desktop process, Desktop refuses the answer, records it as a denial, and tells you to answer from a Desktop app or terminal you opened yourself. This stops an agent from approving its own request in the obvious way; it is not a hard boundary.

Every worktree of one repository

From AgentKit Desktop v3.2.0-beta.12, an eligible request from a git worktree shows an unchecked Allow in every worktree of this git repository box. Checking it shows the shared git directory and expands the allow to the same project path in every worktree, including branches you have yet to review. Deny applies to the current request. A block on either scope still wins. The Grants list marks a repository-wide row Every worktree. Revoke it there when you no longer need it. Releases answered by that row carry grant:repo in the audit log.

Exec requests

An agent can ask for a secret to be handed to one program in an environment variable instead of to the agent itself. Such a request shows its Exec scope in the list, and the dialog adds the variable, the program path, and the short program hash (hover for the full hash). Before the answer buttons it lists what the scope does not limit:

  • Arguments are not part of the scope, so whatever the program is told to run on its command line receives the value too.
  • When the program is an interpreter such as python3 or node, the scope covers every script it is asked to run. This warning comes first.

An answer applies only to the exact variable, program, and hash you were shown. The secret value never reaches the page.

Watch secret releases

While Desktop is open, each release to an agent or a terminal shows an in-app notice naming the secret, the agent, and the project. Revoke this agent's grants removes every grant that agent binary holds, the same as ak secrets revoke --agent sha256:<hash> --all; Dismiss hides the notice. Your own reveals are not announced back to you.

While the window is not focused or not visible, each release also raises one OS notification titled Secret released. Its body names the secret, who it was released to, and the project, never the value or the purpose. When one check finds more than four new releases, the rest are folded into a single summary notification. OS notifications are best effort: on macOS they need the app's notification permission, which you can grant later in System Settings if you declined it. The in-app notice and the audit log stay complete either way.

Revoking stops future reads only. Rotate a secret an agent should no longer hold.

Read the audit log

Audit log opens Secrets audit, newest first: every resolve, block, and operator answer, never a value. Filter by secret name, by decision (Allowed, Blocked, Denied), or by source (Agent, Terminal, Desktop). Each row shows when, the secret, the agent, the purpose, the source, the decision, and the reason. The same ledger is available in a terminal with ak secrets audit.

Check vault sync

When vault sync is set up on this home, the page shows a Vault sync panel. It shows the sync state, such as Up to date, Changes pending, Last sync failed, Conflicts to settle, Items set aside, or Integrity alarm, with the queues, open conflicts, trusted devices, and recovery guidance. The status reads the same local state as ak secrets sync status and ak secrets devices list, sends no request, and works while the vault is locked. Refresh reads it again. The panel still lists the matching terminal commands with copy buttons.

On a home where sync was never set up, the panel appears only as Recover a synced vault; see Recover a vault onto this device. Sync itself is a preview; see Cloud sync.

Act on sync

Under Act on sync, the panel runs the same operations as the matching ak secrets sync and ak secrets devices commands:

  • Sync now sends this device's changes and fetches the others'. Items that need you are reported, not treated as a failure.
  • Settle a conflict: choose the conflict, then keep this device's value (local), the current synced value (remote), or one listed branch. Tick the confirmation that the other versions are overwritten on every device, then select Settle conflict.
  • Approve a new device: paste the join code the new device printed with ak secrets devices add, then select Check join code. Give the new device the offer code the panel shows, and compare the 6-digit code on both screens. Select Codes match, approve only when they match; Codes differ, cancel declines, and the new device must start again.
  • Remove a trusted device: choose the device and a reason (lost, stolen, retired, or compromised), enter the recovery password and the recovery key from the recovery kit, confirm, and select Remove device. Removal rotates the vault key, but the removed device may still hold secrets it already decrypted, so rotate those at their provider.
  • Replace the recovery key: the current recovery kit stops working, and the new kit is written only to a new file you name. You can change the vault password at the same time.
  • Replace this device's keys: Rotate device keys gives this device new keys, rotates the vault key on every device, and reseals the recovery bundle.

A recovery or key rotation that stopped part-way can be finished from the panel: Finish a stopped rotation for the recovery key, the Finish a rotation that stopped part-way option for device keys, and Finish a recovery that stopped part-way for a recovery.

Every action needs a sync sign-in that is already valid, and the vault unlocked when it uses the file backend. An action never asks for an email code itself; when the sign-in is not enough, it fails with the reason. Use Email sign-in for sync to add one: Email me a code, then enter the code and select Verify code. Your current API-key or license sign-in stays in place.

When a coding agent started Desktop, each action is refused so an agent cannot approve devices, settle conflicts, or remove devices for itself. Run the action from a Desktop app or terminal you opened yourself. Passwords and recovery keys you type stay only in the form, are sent once, and are cleared afterward. A new recovery kit is written to the file you name and never shown in the app; move it offline.

Recover a vault onto this device

On a home without sync, Recover a synced vault restores a synced vault onto this device. Give the recovery kit file or the vault ID, open the vault with the vault password or the recovery key, and name a new file for the new recovery kit. Tick Remove the vault's other devices when a device was lost or stolen; that also rotates the vault key. Confirm, then select Recover vault. The terminal equivalent is ak secrets sync recover.