Home / Insights / How to Secure AI Agents: A Practical Deployment Checklist
How to Secure AI Agents: A Practical Deployment Checklist
An AI agent is not just a chatbot when it can call tools, read files, send messages, modify records or trigger workflows. Its security boundary includes the model, instructions, connected tools, identity, data sources and the actions it is allowed to take.
Start with the agent's authority—not its prompt
Prompt wording is not an access-control system. If an agent can delete records, transfer money, expose private files or execute commands, those capabilities must be constrained outside the model. Treat the agent as an application identity with explicit permissions and a defined blast radius.
1. Inventory every tool and action
- List every tool, API, connector, browser action and database operation available to the agent.
- Classify actions as read-only, reversible write, external communication, privileged change or destructive operation.
- Document the data each tool can access and the identity under which it runs.
- Remove unused tools and broad administrator credentials.
2. Apply least privilege at the tool boundary
Give each tool a narrow permission set and enforce it server-side. A tool that can read one customer's records should not accept an arbitrary customer identifier without checking the caller's authorization. Validate object ownership, tenant boundaries, allowed fields and action parameters on every request.
3. Treat retrieved content as untrusted input
Documents, web pages, emails, tickets and code repositories may contain instructions intended to manipulate the agent. This is commonly discussed as indirect prompt injection. Retrieved content should be treated as data, not as a higher-priority instruction. Separate system policy from retrieved text, label untrusted sources and never let a document silently expand the agent's permissions.
4. Protect secrets and sensitive data
- Do not place API keys, passwords or long-lived tokens in prompts, source code or retrievable knowledge bases.
- Use a secrets manager and short-lived credentials where possible.
- Redact sensitive data from logs and model context when it is not needed.
- Apply tenant isolation and data minimization to retrieval and memory.
- Define retention and deletion rules for prompts, tool outputs and traces.
5. Put human approval around consequential actions
Require explicit approval for high-impact or irreversible actions, such as sending external communications, changing production settings, deleting data, issuing refunds or modifying access. Show the reviewer the exact action, target, relevant data and expected consequence. Approval must be bound to the action actually executed—not to a vague earlier instruction.
6. Validate tool inputs and outputs
Use strict schemas, allowlists, length limits and server-side validation. Never execute model-generated SQL, shell commands, URLs or code without a purpose-built safety layer. Constrain outbound network access where feasible, and defend against SSRF, path traversal, injection and unsafe file handling in the tools themselves.
7. Build an evaluation set before launch
Test normal tasks and adversarial cases. Include malicious instructions in retrieved documents, requests to access another tenant's data, attempts to reveal secrets, tool-parameter manipulation, conflicting instructions, oversized inputs and repeated tool-call loops. Measure both task success and policy violations. Re-run the evaluation suite after changing models, prompts, tools or retrieval sources.
8. Log actions so an incident can be reconstructed
Record the agent and user identity, model and configuration version, tool name, validated arguments, authorization decision, approval record, result status and correlation ID. Avoid logging secrets or unnecessary personal data. Make logs tamper-resistant and define alerting for unusual action volume, denied access and repeated policy failures.
9. Prepare a kill switch and recovery path
- Be able to disable a tool or agent independently of the model.
- Revoke credentials and invalidate sessions quickly.
- Pause queued jobs and scheduled actions.
- Preserve relevant evidence without retaining unnecessary sensitive data.
- Define who investigates, communicates and restores service.
Deployment readiness checklist
- Every tool has an owner, purpose and minimum permission set.
- Authorization is enforced outside the model.
- Retrieved content cannot grant new permissions.
- Secrets are kept out of prompts and ordinary logs.
- High-impact actions require explicit approval.
- Tool inputs are schema-validated and output is handled safely.
- Cross-tenant and prompt-injection tests are included.
- Actions are traceable and a kill switch has been tested.
- Data retention, incident response and change review are documented.
Useful security references
Use established material as a starting point, then map controls to your actual architecture: OWASP Top 10 for LLM Applications, NIST AI Risk Management Framework and MITRE ATLAS.
Need an architecture review?
Dominion Fortress works across AI automation, software engineering and security. A review can examine tool permissions, data boundaries, retrieval design, approval gates, logging and adversarial testing within an agreed scope.