Blog

Intents, not values: how an agent can use a credential without being handed it

Why BotPassword gives agents a small set of outcome-level intents instead of a way to read secrets, and what that means for sign-in, CLIs and API calls.

BotPassword team5 min read

BotPassword lets an agent request an outcome, such as “deploy with the production token”, and receive a typed result, never the token. The agent-facing surface is a fixed list of thirteen intents, and none of them can return a secret. This post summarizes ADR 0011 and the agent intents architecture.

What problem does an intent solve?

Ask a coding agent to rotate a token, sign in to a dashboard, or log the gh CLI in. To do any of that itself, the agent would need the raw secret, would have to type it somewhere, and would leave it in a transcript. Harness safety policies are written to stop exactly that, so the agent either refuses or asks you to paste the value.

The architecture notes point to a pattern those policies do allow: delegating the secret-bearing step to the user’s password manager, with the user approving it there. An intent is the contract for that delegation. The agent names the outcome; BotPassword checks the grant, does the sensitive part, and hands back a result.

Which intents are there?

ADR 0011 lists thirteen:

Group Intents
Discovery status, list_credentials, request_access
Using a credential run_with, http_request, cli_login
Browser sign-in sign_in, fill_totp (built over CDP and through your paired extension, disclosing; a sealed fill is planned)
Changing credentials change_password (planned, not built yet), rotate (partly built)
Write-only store_secret, capture_secret (planned, not built yet), generate_password (planned, not built yet)

A few examples of what they do:

  • run_with starts a command with credential values injected as environment variables or a temporary file with owner-only permissions, never on the command line, and returns the exit code with known values redacted from the output.
  • http_request checks the destination against the hosts recorded on the credential before attaching authentication. A request to any other host returns scope_denied.
  • cli_login sets up git, Docker, the AWS CLI or kubectl to use BotPassword’s credential helper, so the token is fetched when the tool needs it rather than written into the tool’s config. The helper hands the value to the tool, so it is always disclosing.
  • sign_in connects to the browser the agent drives over the DevTools Protocol and fills the credentials only into a frame at exactly the granted site, with every frame above it at that site, checking again in the page as it writes. That stops a misled agent filling a lookalike page. It does not hide the value from the agent, which controls that browser, so the fill is labeled disclosing and needs a grant that allows it. Without a DevTools endpoint, your own paired BotPassword extension does the fill in your browser instead, with the origins read from the browser itself; that is disclosing too, because the page and other extensions can read the field. A sealed fill is planned.

Why is there no “get the secret” intent?

Because the rule is that every intent returns a typed outcome and redacted output, and the only reveal path is the human interface. The agent endpoint of the local daemon has no code path to human-only operations: a message naming one is rejected by type before any policy runs. That is stronger than a policy that says no, because there is nothing to misconfigure.

The same logic keeps the policy in one place. Every agent surface calls the single agent_policy::evaluate function, a pure function over the user’s authority, the grant, the session and the provider scope. The effective permission is the intersection of those, so a transport cannot quietly be more generous than another.

Where does approval happen?

Only in BotPassword’s own interface: the desktop app, the phone app, or the company admin console. An agent can call request_access to ask, and it receives approval_required with a request ID to check, then approved, denied or expired. It cannot grant itself anything. (Since this post, request_access is built with approval on the desktop and in bpw access; approval on the phone is planned.)

BotPassword asks once and then stays out of the way. Inside an existing grant, intents run without prompts. A new credential, a new site, a higher-risk intent or a new agent client prompts once, with options such as “always for this project” and an expiry. Grants are bound to a project through a working directory or repository remote.

What about intents that only add data?

store_secret (built) and the planned, not built yet capture_secret and generate_password are write-only. They can add data but never read it, so they cannot weaken anything. The default policy allows them for every enrolled agent client, which means “save this new key” does not need a prompt. Items stored by an agent are marked as agent-supplied in history.

How does the agent find out it is safe?

This is the unusual part. The decision record treats tool descriptions and installed instructions as part of the security design. Agents decide how cautious to be from what they read, so the design says only what a tool structurally does: no tool returns a secret value, and none claims the user has already approved. A short instructions snippet tells the agent to use the bpw tools for any sign-in, password change, key rotation, CLI login or authenticated request, and to tell the user if an approval is waiting.

How does it reach each agent?

The same intents are served identically over three transports:

  1. bpw mcp, a local stdio MCP server.
  2. The bpw command-line tool, for any agent with a shell.
  3. Native credential helpers for git, Docker, AWS and kubectl (planned, not built yet).

bpw agent install <harness> configures Claude Code and Codex in one step; for Cursor and others it is planned, so add the entry by hand. The harness pages record where each tool keeps MCP configuration today, for example .mcp.json for Claude Code and .cursor/mcp.json for Cursor. The decision record is explicit that harness behavior is not guaranteed and is tested per harness.

What are the trade-offs?

The ADR lists them rather than hiding them.

  • Tool descriptions become security-relevant text that has to be maintained as carefully as code.
  • In an agent-controlled browser, the agent can technically read a field that has been filled. An extension-only sealed mode for credentials where that matters is planned, not built yet.
  • Each agent installation is enrolled as its own client, with the daemon checking what it can about the peer process, such as the code signature and working directory. The design calls this meaningful attribution, not strong isolation.

How does this relate to the rest of the system?

An intent is only as strong as the process that enforces it. Why a local daemon holds the keys covers where that enforcement lives, and agent-driven key rotation shows the most complex intent, rotate (partly built), as a durable state machine. For the underlying rationale, start with why agents should never see your API keys.

More from the blog

Give agents access. Keep the keys.

BotPassword is in early access. Request an invite and we'll email you when your spot opens.