guardry/Guides/Revoke agent access
How to revoke an AI agent's access to your secrets
Revoke the agent's credential in the dashboard to stop its future requests, then rotate any secret it already read at the provider.
Revoke the agent's credential in the dashboard under Agent access. A credential can be revoked at any moment, and "Revoke all agents" stops every agent in the organization at once. Revocation stops future requests only: a value the agent already received stays with it, so rotate those keys at their providers.
1. Revoke the one credential
Under Agent access, find the agent's credential and revoke it. Permissions are checked inside the vault on every request, with no cache, so the agent's next request is not accepted.
This is where one credential for each agent pays off. Revoking one agent leaves the others working.
2. Or revoke all agents
If you do not know which agent is the problem, use "Revoke all agents". It stops every agent in the organization at once.
Afterwards, create new credentials for the agents you still want. Each new credential is shown once and is pasted at the hidden login prompt.
# Sign an agent in again with its new credential
guardry login --profile coding-agent
guardry --profile coding-agent whoami3. Find out what the agent already read
Revocation does not undo earlier reads. Open the audit log and look at that agent's events. For each released value the log records the entry name and version, when it was read, the outcome and the client IP. The result is the list of values the agent holds.
4. Rotate what it read
For each key on that list that you no longer want the agent to have, rotate it. Create a new key at the provider, save it in the dashboard as the new version, and revoke the old key at the provider. The full steps are in How to rotate an API key your AI agents use.
Expiry does part of this for you
Every agent credential has a lifetime of 1 hour, 4 hours, 7 days or 30 days, and stops working when it ends. A short lifetime means a forgotten credential does not stay valid for long. Revoke when you need access to stop now; rely on expiry for the credentials you forget.
What this does not do
- Revocation applies to future requests. A value an agent already received stays with it, and a program that was started with a secret in its environment keeps it until the program ends.
- Revoking an agent credential does not revoke any key at a provider. Guardry does not rotate credentials at the provider.
guardry logoutis not revocation. It removes the saved profile from the local machine and nothing else. The credential stays valid until you revoke it in the dashboard or it expires.
Questions
How quickly does revoking an agent credential take effect?
It applies to the agent's future requests. Permissions are checked inside the vault on every request, with no cache, so there is no waiting period before a revoked credential stops working.
Does revoking a credential take back the secrets the agent already read?
No. A value an agent already received stays with it. To make that value useless, revoke the key at its provider and save a new one in the dashboard.
Is guardry logout the same as revoking access?
No. guardry logout only removes the local profile. To stop the credential itself, revoke it in the dashboard under Agent access.
Can I stop every agent at once?
Yes. "Revoke all agents" stops every agent in an organization at once. You then create new credentials for the agents you want to keep.