Approvals & passwords Docs menu

Docs

Human approval for AI agent actions & saved passwords

You decide how much a bot may do without asking. Risky actions wait on a card with the exact command or arguments, and kwant's own secrets are off limits in every mode.

Approval cards

When a bot wants to run a command, edit a file outside its folder or call a tool, you see a card with what it will do:

  • Allow once runs this one call.
  • Always allow allows that tool for that bot until kwant restarts.
  • Deny refuses it, and the bot is told not to try it again or another way.

After you deny a call, the bot can't ask again for the same kind of thing in that chat: a command with the same program and first word (any git push), the same website, or the same file. kwant refuses it without a card until you write in that chat again.

Ann's chat. Right under the request Tests are passing. Please open the pull request for the waitlist branch, an Approval needed card says Ann wants to open a pull request on GitHub, with the title Trip waitlist with timed seat holds and the repo trailhead/storefront, and Deny, Always allow and Allow once buttons.
Ann asks before opening a pull request.

Only you can answer a card. Bots' own tools can't, and neither can a bot calling kwant's API.

Approval modes

Each space has a mode, and each bot can override it or follow the space. Only you can change it.

ModeIn the appWhat happens
askAsk before running commandsEvery tool call outside the bot's folder shows a card.
smart (default)Ask only when riskyOrdinary work runs without a card. Anything risky or unclear shows the card, with the reason.
offDon't askEverything runs except payments, which always ask. Before switching, kwant warns what bots can then do without asking; nothing changes until you press Turn off approvals.

New spaces start on smart, and so does the Default space of a new install. Spaces from before this default keep asking after an update, so updating kwant never loosens your setup; switch them in Settings when you're ready. While passwords are saved in the built-in store, a new space starts on ask instead (see Saved passwords).

In every mode, and at every Flight School tier, anything that looks like a payment shows a card with only Allow Once and Deny (see Payments always ask). A call that names kwant's own secret files (the vault, its key, the API token) is refused and recorded as denied. Calls that run without a card are recorded too, and under smart each record says why it was judged safe.

What "Ask only when risky" lets through

  • Shell commands in the bot's folder that a fail-closed allowlist recognises as safe: file and text tools like ls, cat or jq, and build tools like cargo, npm, make or git, with checks. Network tools, sudo, containers, git push, package installs, npx, inline code, and any path outside the folder still ask.
  • Reads outside the folder, unless they touch system data or anything that looks like a credential: .ssh, .aws, .env files, key files, browser profiles, shell histories and more.
  • MCP tools the server marks read-only.

Since 0.7.4, adding a package the project doesn't list yet asks first, because it downloads code that runs on your computer: npm install <name>, pnpm add, yarn add, bun add, cargo add, uv add, poetry add, go get and dotnet add package. An option or a workspace name in front can't hide it. A plain npm install of what the project already lists still runs on its own. Starters like npm create vite, npx, npm exec and npm x ask too.

With Ask only when risky on, Ann stops to ask before installing a new package: npm install left-pad. Buttons: Deny, Always this session, Allow once.
A new package asks first, even under "Ask only when risky".

Requests to kwant itself, on its own port or any loopback /api/ path, always ask. Writes and edits outside the folder, and unknown tools, always ask.

smart guards against accidents. It isn't a sandbox. Scripts in the bot's folder, make, cargo build and npm run run without a card and can do anything the bot's user can, including a script the bot wrote a moment earlier. Use ask for bots or folders you don't trust.

"Always this session"

Under ask and smart, "Always this session" on a Claude tool's card allows that tool, for example all Bash, for that bot and conversation until kwant restarts.

Saved passwords

kwant can fill website logins in a team's, channel's or bot's browser. Passwords live in one of two stores:

StoreWhere
Built-in (default)Encrypted files in <data dir>/kwnt-vault/, with the key next to them.
BitwardenYour own Bitwarden or Vaultwarden account, folder kwnt, after you unlock it once.

The built-in store protects against copies of the data folder. It doesn't protect against a bot running as the same user with approvals off, because that bot could read the key. So kwant warns you before the two meet:

Approvals off, or "Ask only when risky", with passwords in the built-in store is your choice, once per server. Saving a password or token while some bots don't ask first shows Before you save the token, with Save it on this server, Use Bitwarden or Make every bot ask first. Turning approvals off with passwords on this server asks the same once. Only you can choose to keep them here; a bot never can, and the warning that they are exposed stays. To move them, connect Bitwarden (POST /api/passwords/migrate): each one is deleted locally only after Bitwarden has it. Archived spaces, and the bots in them, don't count.

How the Bitwarden store works

  • kwant talks to Bitwarden itself, not through the bw CLI or bw serve.
  • The master password, session and vault key exist only in kwant's memory. Nothing secret is written to disk, passed to a child process or logged.
  • After a restart the vault is locked: nothing is filled until you unlock it again.
  • Only items in the kwnt folder that carry kwant's owner field are used. Organisation items, trash and other folders are never read.
  • Showing a password needs your master password. Five wrong tries in a row lock the vault.
Known gap. Autofill stays on while approvals are off. Chrome's debugging port listens on loopback without authentication, so a bot with a shell could read a field kwant has just filled. This applies to both stores. A fix that removes the port is planned.