# A Valid Key Let an AI Agent Delete Production - Sagar Batchu, Speakeasy

## Executive summary

The increasing reliance on AI agents necessitates a robust control layer to prevent catastrophic failures, as demonstrated by an incident where an agent deleted a production database using valid credentials but lacked proper governance. The core argument is that valid credentials do not equate to valid intent. A secure architecture must enforce identity, policy, and comprehensive logging at every step of an agent's action to ensure compliance and prevent unauthorized overreach.

## Key takeaways

- The Danger of Unchecked Authority: An agent can perform destructive actions (e.g., deleting a production database and its backup) even if it possesses valid credentials, if there are no guardrails, identity checks, or policies in place. The failure is systemic, not malicious.
- The Need for a Control Layer: In regulated industries, every action must be attributed to a specific identity. The proposed control layer must sit in the critical path, ensuring that all agent calls are governed by centralized policies.
- Three Pillars of Governance: A true governance architecture requires tracking three distinct identities: the Agent (Principal), the Operator (human driving the action), and the Authorizer (human who approved the original setup).
- Policy Evaluation Scope: Policy must consider the agent's stated intent, not just the action that actually occurred. The agent's actions must be constrained by the lowest common denominator of the Owner's policy, regardless of the agent's own scope.

## Technical details

- AI Control Plane Architecture: The system must intercept all agent calls (the 'critical path') using an Identity Provider (IDP) for the baseline identity. Policies are evaluated before any action is taken, allowing for decisions like Allow, Deny, Quarantine, or Escalate.
- Policy Enforcement Model: Policy evaluation is governed by three layers: 1) The Credentials (the maximum ceiling set by the human); 2) The Agent's own policy (A); and 3) The Owner's live policy (O). An agent cannot exceed the owner's rights, and the system must re-evaluate these policies on every request.
- Data Handling and Compliance: The control plane must offer features like blocking, masking, and redacting PII. For data sovereignty, solutions can be deployed in a customer's own VPC, or utilize a Bring Your Own Key (BYOK) model.

## Practical implications

- Implement a centralized AI control plane that sits in the critical path of all agent interactions.
- Mandate the tracking of three identities (Agent, Operator, Authorizer) for every action to ensure full attribution.
- Design policies that evaluate the agent's stated intent, not just the executed action, for compliance logging.
- Use enterprise IDPs (like Okta) as the single source of truth for identity across all AI agents and systems.

## Topics

AI Governance, Identity and Access Management (IAM), Policy Enforcement, Build Engineering, Compliance, AI Agents, Sagar Batchu, Speakeasy, AIE CODE summit

Source: https://www.youtube.com/watch?v=JxNCuXkSWyQ
