AI Agent Security Checklist for Production Systems
Protect the full agent system—its data, tools, actions, and operating environment—not only the model prompt.

Start with the assets and actions at risk
List the data the agent can read, the systems it can reach, the actions it can request, and the people affected. Include model providers, retrieval stores, tool servers, queues, logs, analytics, and human approval interfaces.
Classify actions by consequence and reversibility. Searching approved knowledge is different from changing access, sending a customer message, deleting a record, or initiating a payment.
- Document data classes and retention requirements.
- Name the owner of every credential and integration.
- Separate read, draft, update, delete, and financial authority.
- Define the maximum impact of one compromised request.
Use narrow tools and least privilege
Expose business-level operations with bounded parameters rather than arbitrary database, shell, or HTTP access. Separate sensitive operations so they can receive stronger authorization, validation, and approval.
Use short-lived, scoped credentials where the platform supports them. Restrict network destinations and fields returned, and disable unused capabilities by default.
| Control surface | Unsafe pattern | Safer starting point |
|---|---|---|
| Identity | Shared service identity for every user | Propagate verified user and tenant context |
| Tools | One broad tool that can do anything | Narrow operations with separate scopes |
| Inputs | Prompt text trusted as instruction | Treat user and retrieved content as untrusted data |
| Outputs | Model output executed directly | Schema validation and policy checks before action |
| Secrets | Credentials included in prompts or logs | Server-side secret storage and scoped tokens |
| Consumption | Unbounded loops and tool retries | Budgets, timeouts, rate limits, and stop conditions |
Treat all natural-language content as untrusted
Prompt injection can arrive through a user request, document, web page, email, or tool result. Instructions inside retrieved content should not override system policy or authorize a tool call.
Separate data from instructions, allowlist tools, constrain destinations, and require deterministic checks before sensitive actions. No prompt wording can replace controls enforced outside the model.
Validate inputs and outputs at tool boundaries
Use strict schemas, length limits, enums, tenant checks, and server-side validation for every tool input. Treat model output like input from an untrusted client; never insert it directly into code, queries, HTML, or downstream commands.
Return minimal, structured tool results and avoid leaking credentials, internal errors, or full records. Mark incomplete or partial results so the agent cannot present them as definitive.
Bound agency and consumption
Set maximum steps, model calls, tool calls, runtime, cost, and data volume. Add idempotency for state-changing actions and stop the workflow when repeated failures suggest the plan is no longer valid.
Require a person for named high-consequence actions, novel destinations, policy exceptions, or combinations of authority that create material risk.
- Use per-user and per-tenant rate limits.
- Set timeouts and bounded retries for every dependency.
- Prevent duplicate writes and replayed approvals.
- Provide an immediate kill switch for action capabilities.
Log safely and prepare for incidents
Capture who initiated the task, which versions ran, what tools were requested, validation results, approvals, state changes, and final status. Redact secrets and unnecessary personal or proprietary content before logs leave the application boundary.
Rehearse credential rotation, tool disablement, queue cancellation, user notification, evidence preservation, and rollback. Security is an operating capability, not a checklist completed once before launch.
Primary references
Source material used for definitions, architecture, risk, and control considerations.