What makes up an agent’s blast radius
- Reach. Every system the agent’s credentials can write: databases, payment accounts, file systems, email. The credential decides this, not the prompt and not the tool’s description.
- Size of one call. How many rows a single statement can change. An
UPDATEwithout aWHERE, a trigger that ships 300 other orders, a foreign key withON DELETE CASCADE: each makes one call bigger than it looks. - Reversibility. A changed row can often be put back. A dropped table, a truncated one, a sent email or a refund can’t, or only from a backup.
- Attribution. When several agents share one role, a bad change can’t be traced to one of them, which makes the cleanup bigger too.
Blast radius is about consequences, not likelihood. A prompt injection or a confused model decides whether something goes wrong; the blast radius decides how much.
Measure it from permissions
The security principle behind it is least privilege, which NIST’s glossary defines as restricting “the access privileges of users (or processes acting on behalf of users) to the minimum necessary to accomplish assigned tasks”.1 For an agent, that means reading what its credential can actually do:
-- What the agent's role can do to each table
SELECT table_schema, table_name, privilege_type
FROM information_schema.table_privileges
WHERE grantee = 'agent_role'
ORDER BY 1, 2, 3;
-- Attributes that make every grant irrelevant
SELECT rolname, rolsuper, rolbypassrls, rolcreaterole, rolreplication
FROM pg_roles WHERE rolname = 'agent_role';
A superuser can change anything in the cluster, and a role with BYPASSRLS ignores every row-level security policy.4 Then list the triggers and cascades on the tables it can write, because those are where one row becomes many.
How to shrink it
- Give each agent its own role with only the grants its job needs. Start read-only; see read-only database access.
- Cap the size of a call:
statement_timeoutaborts any statement that runs longer than its limit.3 - Refuse destructive verbs with a rule outside the model, and send the few writes that matter to a person.
- Know how you’d recover: backups, point-in-time recovery, or undo built from the database’s change log.