What is scoped access for AI agents?
Scoped access means an AI agent can reach only the secrets its task needs, for a limited time, instead of everything you can reach.
Scoped access means an AI agent can reach only the secrets its task needs, instead of everything you can reach. The limits usually cover where the agent may look, which names it may read, what it may do and for how long. It is the principle of least privilege applied to agents.
Why it matters
The most an agent can expose is what it can reach. An agent that makes a mistake, or follows an instruction hidden in a page or a file it was asked to read, cannot give away a value it never had access to.
What good looks like
- The agent works in one environment, not all of them.
- It reads only the names its task needs.
- Reading, creating and using are separate permissions.
- Access expires without anyone having to remember.
- You can see, for any secret, which agents can reach it.
How Guardry does it
You set the limits on each agent credential when you create it.
| Limit | What you choose |
|---|---|
| Where | One environment, or every current and future environment in the organization |
| Which names | An optional name prefix, for example STRIPE_ |
| What it may do | Read secret values, read them only after a person approves each request, use assigned services without receiving their credentials, create new entries |
| How long | 1 hour, 4 hours, 7 days or 30 days |
An organization-wide credential must name the project and environment for each read, with --project billing --environment production. Permissions are checked inside the vault on every request, with no cache.
Limits
Variables are visible to every agent credential that covers their environment, without approval. Anything sensitive should be a secret. Scope limits what an agent can get. It does not limit what the agent does with a value once it has it.
Questions
What is a name prefix?
A name prefix limits a credential to entries whose names begin with the text you give. With the prefix STRIPE_, a credential covers a name such as STRIPE_KEY.
How do I see what an agent can reach?
The dashboard shows, for every entry, which agents can reach it and how. Guardry calls this agent reach. From the agent's side, guardry --profile coding-agent secrets list lists entries without reading any value.
Should one credential cover every environment?
Only when the task needs it. An organization-wide scope includes every current and future environment, so an environment you add later is covered too.