Grants, scopes and approvals
How BotPassword controls agent access: signed grants, scopes, expiry, autopilot, request_access approvals on your desktop, and company policy limits.
A grant is a durable, signed record in your vault that says which agent client may use which credentials for which intents, until when. Only a human interface can create or change a grant: the desktop app, the phone app or the company admin console. An agent can ask for one with request_access, and you approve or deny it in BotPassword on your desktop or with bpw access; it can never approve itself. You can also make grants yourself with bpw grant add.
What does a grant contain?
| Field | Meaning |
|---|---|
| Owner or organization | Whose authority the grant rests on |
| Client or workload identity | The enrolled agent client |
| Broker identity | Which broker enforces it |
| Credential references | For example cloudflare/prod-deploy |
| Resource, account and environment constraints | Narrows where the credential works |
| Allowed intents | rotate (partly built), change_password (planned, not built yet) and autopilot are separate flags |
| Expiry | When the grant ends |
| Delegation ceiling | Subagents get a reduced session, never a broader grant |
| Confirmation rules | Which actions still prompt |
| Project binding | A working-directory root or repository remote |
| Revision | Grants sync and are verified like any other item |
Because a grant is a vault item, it syncs across your devices.
What are sessions and leases?
- Session. Short-lived, 5 minutes by default, minted per client connection under a grant. It carries its own attribution.
- Lease. For company-owned credentials only: a short authorization lease of at most 60 seconds from the organization’s Durable Object. Each renewal re-checks membership and grant state. Revocation is pushed to connected brokers, with a target of under 2 seconds at p95. If the control service is unreachable, no company lease renews and sensitive operations stop when the lease expires.
Suggested personal grants last seven days. These are defaults, all configurable.
How is effective permission decided?
Effective permission is the intersection of current user or company authority, the grant, the session, provider scope and host controls. agent_policy::evaluate implements this as a pure function used by every surface, so the CLI, MCP and the credential helpers decide identically. A request outside the intersection returns scope_denied, grant_expired or approval_required; see Typed outcomes.
How does request_access work?
- The agent calls
request_accesswith one credential, or, when it cannot name one, a short description of what it needs (looking_for), the intents it needs (run_withandhttp_request, orrotatealone, which is partly built), the scope (hosts, paths and methods forhttp_request; the commands forrun_with, and for a sealedrun_withthe hosts too), a lifetime and a one-line reason, for example “Cloudflare token to deploy project X”. Some asks are refused before you see them: an item’s password to a host outside its saved site, a TOTP seed or passkey to any host, and a value in a header other than one APIs read credentials from, such asauthorizationorx-api-key. - It gets
approval_requiredwith a request ID straight away. It never gets a value, and it cannot approve its own request. - The Ledger in the desktop app shows the request: the item’s title, kind and site from your vault, the project folder and process that asked, and the scope, including the header the value would be sent in and the exact file and SHA-256 each command resolved to. It says whether the grant is sealed or disclosing, labeled “this agent can read this secret”. Sealed from the command means the command gets a placeholder and the hosts listed receive the value, so whoever runs a host can read it, and a host that echoes its request could hand it back. Each host is shown whole, with what its name ends in first. If a host is outside the item’s saved site, or the item has no saved site, a warning says that host receives the value. A screen that can’t show a request this way can only decline it. If the item already has a grant, the whole grant it would replace is shown too. The agent’s own name and reason are shown apart, collapsed and labelled as unverified, with hidden characters shown as escapes.
bpw access listshows the same. - You approve with your master password or decline. You can give less than was asked: less time or fewer hosts. A host outside the item’s saved site starts unticked, and with
bpw access approveit stays only if you name it with--only-host, so approving with no host chosen is refused. If the agent also asked to be able to read the value, the request starts sealed, and allowing that takes a deliberate tick or--allow-disclosure, because a disclosing run can send the value anywhere.bpw access approveprints the request and asks you to confirm with “y” before anything is granted. The grant is exactly what you saw, never broader: bound to the asking session’s project folder, holding the command files shown, and replacing the grant shown. If a command file or the item’s grant changed after the request was listed, nothing is granted and you review it again. For a request that describes what it wants, the Ledger shows the agent’s description, labelled as its own words, and the scope it asked for, and lists your items with those matching its words first. You choose the item (bpw access approve <id> --item <item-id>in a terminal); choosing grants nothing. The request then shows that item’s facts, and you approve or decline as above. If policy would not give the item you chose for this request, for example a login’s password to a host outside its saved site, you are told and can choose another. The agent learns nothing about your items until you approve: its replies are the same whether or not anything matched. - The agent checks with the request ID (it can wait up to 30 seconds per check) and reads
approvedwith the grant’s ID and expiry,denied, orexpiredif nobody decided within 10 minutes.
Every request, decision and grant is recorded in the access ledger on your device (bpw access ledger, or the Ledger in the desktop app), with the hosts asked and granted. Asking is rate limited per agent client and per session, and after three denials a session’s further requests answer request_limited. Approval on your phone is planned, not built yet.
Inside an existing grant, intents run without prompts. A new credential, a new site, a higher-risk intent, a new provider account, changed recovery or a new agent client can require a fresh decision.
What is autopilot?
You can switch a personal grant to autopilot so rotate (partly built; autopilot is the only way an agent reaches it today) and change_password (planned, not built yet) run without confirmation inside it. Without autopilot, each credential gets a one-time toggle for those two intents. Company policy can forbid autopilot for company credentials.
What is extension-only mode?
Planned, not built yet: a grant set to extension-only, for credentials where it matters that the agent could technically read a filled field in a browser it drives. The fill would then happen in a browser profile the agent does not script. Today a sign_in without a DevTools endpoint goes to your own paired extension in agent mode, which keeps the browser out of the agent’s hands but is still labeled disclosing, because the page and other extensions can read the field.
How does revocation work?
Locally, the broker stops new operations immediately. For company credentials, the bound is the remaining lease plus documented clock skew. Existing agent processes that already received a value through run_with still hold it; see Security model.
What can an agent never do?
Ordinary agent operations cannot edit a grant, approve a new device, change recovery, export the vault or call reveal. The agent endpoint of the daemon has no code path to these; they are rejected by type before any policy runs. Human bpw reveal needs human-endpoint authentication such as a biometric prompt.
How does company policy fit in?
For company credentials, the organization’s policy sits above personal choice: leases come from the organization, grace periods can be changed, and autopilot can be forbidden. See Teams.
Next steps
- Intent catalog for default friction per intent.
- Harness setup to enroll a client.
- Quickstart for the first approval.