CombineApps logoCombineApps
AI Operations

AI Agent Security Checklist for Production Systems

Protect the full agent system—its data, tools, actions, and operating environment—not only the model prompt.

12 min read
Layered controls blocking an unsafe path before it reaches an AI core.

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.

Verify identity and preserve authorization context

The agent should know which verified user, tenant, and role initiated the work. Apply those permissions to retrieval and tools instead of letting a shared service credential expose everything the backend can access.

Authorization belongs at every protected boundary. A prompt that says the user is an administrator is not proof of identity or permission.

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 surfaceUnsafe patternSafer starting point
IdentityShared service identity for every userPropagate verified user and tenant context
ToolsOne broad tool that can do anythingNarrow operations with separate scopes
InputsPrompt text trusted as instructionTreat user and retrieved content as untrusted data
OutputsModel output executed directlySchema validation and policy checks before action
SecretsCredentials included in prompts or logsServer-side secret storage and scoped tokens
ConsumptionUnbounded loops and tool retriesBudgets, 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.