guardry/

guardry/Guides/Audit agent reads

How to see which AI agent read which secret

Give each agent its own credential and the audit log shows which agent read which entry and version, when, with what outcome and from which IP.

Give each agent its own agent credential, and Guardry's audit log shows which agent read which entry and version, when, with what outcome and from which IP address. Every released value is written to the log before it leaves the vault. To see who can read an entry before anyone does, use the agent reach shown in the dashboard.

1. Give every agent its own credential

The log records who made each read, and Guardry knows an agent by its credential. If two agents share one credential, the log cannot tell them apart, and you cannot stop one without stopping the other.

Under Agent access, create one agent credential for each agent. Each has its own scope, optional name prefix, permissions and lifetime, and each is shown once.

# Each agent signs in with its own credential under its own profile
guardry login --profile coding-agent
guardry --profile coding-agent whoami

2. Check who can read before anyone does

The dashboard shows, for every entry, which agents can reach it and how. This is the agent reach. Look at it for your most sensitive entries. If an agent that has no need for an entry can reach it, narrow that agent's scope or name prefix, as described in How to limit an AI agent to one environment and one set of keys.

Reach tells you what is possible. The audit log tells you what happened.

3. Read the audit log

Each organization has its own audit log. For every released value it records:

  • who: the person or the agent
  • what: the entry name and the version
  • when
  • the outcome
  • the client IP

The log never contains secret values. Members with the viewer role can read it too.

4. Filter and export

Filter the log to narrow it to what you are looking at, and export it as JSON when you need to keep a copy or examine it somewhere else.

An agent can also list its own events from the command line.

# From the agent's side: its own events
guardry audit list

What the log does and does not tell you

  • It is written before release. Every released value is recorded before the value leaves the vault, and if the audit record cannot be written, the read is refused.
  • It records releases, not use. An agent that can read a secret can copy it. Guardry controls who gets a value and records every release; it cannot control what a program does with a value afterwards.
  • It knows agents by their credentials. Whoever holds an agent credential appears in the log as that agent, which is one more reason to choose a short lifetime.
  • It holds no values. You can see that version 3 of STRIPE_KEY was read, not what the key was.

Questions

Can I tell two AI agents apart in the audit log?

Yes, if each has its own agent credential. The log records who made each read, so agents that share one credential appear as one. Create a separate credential for every agent.

Does the audit log contain the secret values?

No. It records who read an entry, the entry name and version, when, the outcome and the client IP. It never contains secret values.

What happens if the audit record cannot be written?

The read is refused. Every released value is written to the audit log before it leaves the vault, so a value is not released without a record.

Can I see which agents could read a secret, not only which ones did?

Yes. The dashboard shows, for every entry, which agents can reach it and how. Use that to check access before a read, and the audit log to see reads after they happen.