07 Excessive Agency and AI Agent Security
AI assistants primarily generate information.
AI agents can go further.
They may:
- Search documents
- Read email
- Query databases
- Call APIs
- Create tickets
- Modify cloud resources
- Execute code
- Trigger workflows
- Communicate with other systems
This changes the security problem significantly.
A chatbot may produce an incorrect answer.
An AI agent may take an incorrect action.
That is why one of the most important questions in AI Security is:
How much power should an AI agent be given?
When an agent receives more functionality, permissions or autonomy than required, the system may suffer from Excessive Agency.
For an AI Security Engineer, securing agents means controlling:
What the agent can access
What the agent can do
Which identity it uses
What requires approval
How actions are validated
How actions are monitored
How the agent can be stoppedLearning Objectives
Section titled “Learning Objectives”By the end of this lesson, you should be able to:
-
Explain what AI agency means.
-
Understand the difference between AI assistants and AI agents.
-
Explain Excessive Agency.
-
Recognize excessive functionality.
-
Recognize excessive permissions.
-
Recognize excessive autonomy.
-
Understand agent identities.
-
Understand secure tool design.
-
Apply least privilege to agents.
-
Design human-in-the-loop controls.
-
Understand agent blast radius.
-
Recognize multi-agent security risks.
-
Understand memory and persistence risks.
-
Design monitoring for agent activity.
-
Understand emergency controls.
-
Perform safe AI agent security testing.
-
Document findings professionally.
What Is an AI Agent?
Section titled “What Is an AI Agent?”An AI agent is an AI-enabled system that can use models, tools and contextual information to work toward a goal.
A simplified architecture is:
User │ ▼AI Agent │ ├── LLM ├── Instructions ├── Memory ├── Planning └── Tools │ ├── Email ├── Database ├── Search └── Cloud APIThe agent may determine:
What should I do?
Which tool should I use?
What parameters should I provide?
Do I need another step?This gives the system more capability than a traditional chatbot.
AI Assistant vs AI Agent
Section titled “AI Assistant vs AI Agent”AI Assistant
Section titled “AI Assistant”A typical assistant may:
User ↓LLM ↓AnswerExamples:
-
Explain a concept
-
Summarize a document
-
Draft an email
-
Recommend a remediation
AI Agent
Section titled “AI Agent”An agent may:
User ↓LLM ↓Select Tool ↓Perform Action ↓Observe Result ↓ContinueExamples:
-
Query cloud logs
-
Create a ticket
-
Send email
-
Update a database
-
Trigger automation
The security difference is substantial.
Information vs Action
Section titled “Information vs Action”A useful distinction is:
Assistant ↓Produces Information
Agent ↓May Change StateOnce AI can change the state of an enterprise system, security controls become much more important.
What Is Agency?
Section titled “What Is Agency?”Agency describes the ability of an AI system to take actions toward an objective.
Agency may include:
Observe
Plan
Choose
Act
RepeatA more autonomous system may operate like:
Goal ↓Plan ↓Tool ↓Result ↓Evaluate ↓Next Action ↓RepeatThe more authority and autonomy the system has, the greater the potential security impact.
What Is Excessive Agency?
Section titled “What Is Excessive Agency?”Excessive Agency exists when an AI system is given more:
-
Functionality
-
Permission
-
Autonomy
than required for its business purpose.
A useful model is:
Excessive Functionality +Excessive Permissions +Excessive Autonomy =Excessive AgencyLet’s examine each.
1 — Excessive Functionality
Section titled “1 — Excessive Functionality”An agent has excessive functionality when it has access to tools or capabilities it does not need.
Example requirement:
AI Security Assistant:Read security alerts.Available tools:
Read AlertsDelete AlertsDisable UsersModify FirewallRun Shell CommandsSend EmailMost of these capabilities are unnecessary.
Better Design
Section titled “Better Design”AI Security Assistant │ ├── Read Alerts └── Search RunbooksThe smaller the capability set, the smaller the attack surface.
2 — Excessive Permissions
Section titled “2 — Excessive Permissions”An agent may have the right tool but use an identity with too much privilege.
Requirement:
Read cloud security findings.Granted permission:
Cloud AdministratorThis is excessive permission.
A better design:
AI Agent ↓Dedicated Service Identity ↓Read Security Findings Only3 — Excessive Autonomy
Section titled “3 — Excessive Autonomy”An agent may have appropriate capabilities but perform sensitive actions without sufficient human or policy oversight.
Example:
AI detects suspicious account ↓Automatically disables accountFor some use cases this may be acceptable.
For others, the correct design may be:
AI detects suspicious account ↓Recommends disablement ↓Human analyst reviews ↓Approved?Autonomy should match business risk.
Three Questions for Every Agent
Section titled “Three Questions for Every Agent”Ask:
What CAN the agent do?
What is the agent ALLOWED to do?
What can the agent do WITHOUT APPROVAL?These answers should not be identical automatically.
Agent Security Architecture
Section titled “Agent Security Architecture”A strong agent architecture might look like:
User │ ▼Authenticated Application │ ▼AI Agent │ ▼LLM │ ▼Proposed Tool Action │ ▼Policy Enforcement │ ▼Authorization │ ▼Approval if Required │ ▼Restricted Tool │ ▼Enterprise SystemNotice that the LLM is not the final authority.
The Core Agent Security Principle
Section titled “The Core Agent Security Principle”The model can propose an action. The security architecture decides whether the action is allowed.
This principle should guide agent design.
Agent Identity
Section titled “Agent Identity”Every agent should have a clear identity.
Possible approaches include:
-
Service account
-
Workload identity
-
Managed identity
-
Delegated user identity
Security engineers should ask:
Which identity does the agent use?
What permissions does it have?
Can those permissions be traced?
Can the identity be revoked?Shared Agent Credentials Are Dangerous
Section titled “Shared Agent Credentials Are Dangerous”Avoid:
All AI Agents ↓One Administrator CredentialThis creates:
-
Excessive privilege
-
Poor accountability
-
Large blast radius
Prefer:
Agent A ↓Scoped Identity A
Agent B ↓Scoped Identity BEach identity should match its function.
User Identity vs Agent Identity
Section titled “User Identity vs Agent Identity”Suppose:
User ↓AI Agent ↓CloudWho should determine what the agent can access?
Potential models include:
Agent Identity Only
Section titled “Agent Identity Only”Agent Permission ↓Determines AccessThis can be dangerous if all users share a powerful agent.
User-Delegated Access
Section titled “User-Delegated Access”User Identity ↓Agent ↓Acts Within User PermissionThis may preserve user authorization better.
The correct design depends on the application.
The important principle is:
The agent should not silently gain more authority than the user or business workflow requires.
Permission Propagation
Section titled “Permission Propagation”Consider:
Employee │ │ Can Read Development Account ▼AI Cloud Agent │ │ Can Read All Production Accounts ▼CloudThis creates a privilege gap.
The architecture should ask whether the agent should inherit:
User Permissionrather than only:
Agent PermissionTool Design
Section titled “Tool Design”Agents interact with systems through tools.
Tools are a major security boundary.
A tool might look like:
get_security_alert(alert_id)or:
disable_user(username)Tool design should be intentional.
Narrow Tools vs General Tools
Section titled “Narrow Tools vs General Tools”Prefer:
get_alert(alert_id)
create_ticket(title, description)
get_server_status(server_id)over:
execute_shell(command)
call_any_api(url, method, body)General-purpose tools create much larger attack surfaces.
Tool Allowlisting
Section titled “Tool Allowlisting”Agents should receive only approved tools.
Example:
SOC Assistant
Allowed:- read_alert- search_runbook- create_incident_draftEverything else should be unavailable.
This follows the principle:
If the agent does not need a capability, do not expose it.
Tool Parameter Validation
Section titled “Tool Parameter Validation”Even safe tools can be abused with unsafe parameters.
Consider:
read_file(path)If the model controls path, the application should validate which locations are permitted.
A better model:
read_runbook(runbook_id)where:
runbook_id ↓Approved Runbook RegistryThis reduces arbitrary access.
Tool Authorization
Section titled “Tool Authorization”An agent selecting a tool does not mean the action is authorized.
Weak:
LLM Selects Tool ↓ExecuteStrong:
LLM Selects Tool ↓Authorization ↓Policy Check ↓ExecuteSecurity decisions should remain deterministic.
Action Classification
Section titled “Action Classification”It is useful to classify actions by impact.
Low-Risk
Section titled “Low-Risk”Examples:
Read public documentation
Search approved knowledge
Draft textModerate-Risk
Section titled “Moderate-Risk”Examples:
Read internal logs
Create support ticket
Query internal databaseHigh-Risk
Section titled “High-Risk”Examples:
Disable user
Modify cloud resource
Send external email
Deploy applicationCritical
Section titled “Critical”Examples:
Delete production data
Modify privileged IAM
Transfer funds
Disable security controlsDifferent categories should receive different controls.
Human-in-the-Loop
Section titled “Human-in-the-Loop”Human approval can provide an independent trust boundary.
Example:
AI Agent ↓Proposed Action ↓Human Review ↓Approve?This is particularly useful for high-impact actions.
Human-on-the-Loop
Section titled “Human-on-the-Loop”Some systems may operate automatically while a human supervises.
Conceptually:
AI Agent ↓Acts Automatically ↓Human Monitors ↓Can Stop / OverrideThis may work for moderate-risk automation where rapid action is required.
Human-out-of-the-Loop
Section titled “Human-out-of-the-Loop”Highly autonomous systems may operate without human approval.
AI Agent ↓Plan ↓Execute ↓ContinueThis architecture should require much stronger technical controls because human review is absent.
Autonomy Should Match Risk
Section titled “Autonomy Should Match Risk”A useful principle:
Higher Impact ↓More Independent ControlFor example:
Read Public Data ↓May Be Fully Automatedwhile:
Delete Production Resource ↓Require Strong ApprovalAgent Blast Radius
Section titled “Agent Blast Radius”Blast radius describes the amount of damage possible if the agent fails or is compromised.
Consider:
Agent A ↓Read One Databaseversus:
Agent B ↓Enterprise Administrator ↓CloudEmailDatabaseIAMSecurity ToolsAgent B has a much larger blast radius.
Reducing Blast Radius
Section titled “Reducing Blast Radius”Use:
-
Narrow tools
-
Scoped identities
-
Network restrictions
-
Data boundaries
-
Rate limits
-
Approval workflows
-
Separate environments
The goal is:
Contain failure.
Read vs Write Separation
Section titled “Read vs Write Separation”One of the strongest design patterns is separating read and write capability.
Example:
AI Security Assistant ↓Read Alerts ↓Recommend ActionThen:
Human / Automation Workflow ↓Approved ChangeThis significantly reduces agent risk.
Example — SOC Agent
Section titled “Example — SOC Agent”Weak:
AI SOC Agent │ ├── Read Alerts ├── Delete Alerts ├── Disable Users └── Modify FirewallBetter:
AI SOC Assistant │ ├── Read Alerts ├── Search Logs └── Draft Incident ResponseContainment actions can remain within existing security workflows.
Example — Cloud Security Agent
Section titled “Example — Cloud Security Agent”Requirement:
Identify insecure security groups.Weak:
AI Agent ↓Cloud Administrator ↓Automatically modifies security groupsBetter:
AI Agent ↓Read Cloud Configuration ↓Recommend Remediation ↓Engineer Review ↓IaC / Change PipelineThis keeps AI inside established change management.
Example — Email Agent
Section titled “Example — Email Agent”Requirement:
Assist employees with email.Capabilities might be:
Read EmailDraft ReplyHigher-risk capability:
Automatically Send External EmailA safer architecture may be:
AI ↓Draft ↓User Review ↓SendExample — Finance Agent
Section titled “Example — Finance Agent”An agent may:
Read Invoice
Extract Payment Details
Create Payment RequestIt should not necessarily:
Approve and Send PaymentA stronger model:
AI ↓Creates Proposed Payment ↓Finance Approval ↓Banking WorkflowAgent Security and Prompt Injection
Section titled “Agent Security and Prompt Injection”Prompt Injection becomes much more dangerous when connected to agents.
Attack path:
Attacker ↓Prompt Injection ↓LLM ↓Agent ↓Tool ↓Enterprise SystemThe strongest defenses occur after the model as well as before it.
Breaking the Attack Chain
Section titled “Breaking the Attack Chain”Suppose manipulation succeeds:
Prompt Injection ↓LLM requests dangerous actionThe application can still stop it:
Dangerous Tool Request ↓Authorization ↓DENYThis is successful defense in depth.
Agent Security and Indirect Prompt Injection
Section titled “Agent Security and Indirect Prompt Injection”Agents often consume external information.
Example:
External Email ↓AI Agent ↓LLM ↓Toolor:
Malicious Website ↓Browsing Agent ↓LLM ↓Enterprise ToolThis creates a critical principle:
Untrusted external content should not automatically gain authority over enterprise tools.
Agent Security and Output Handling
Section titled “Agent Security and Output Handling”An agent’s tool call is essentially model output.
Therefore:
LLM ↓Tool Requestshould be treated as:
Untrusted Proposed Actionuntil validated and authorized.
Agent Memory
Section titled “Agent Memory”Agents may maintain memory.
Memory might store:
-
User preferences
-
Prior results
-
Tasks
-
Facts
-
Workflow state
Conceptually:
Interaction ↓Memory ↓Future Agent DecisionThis creates new security considerations.
Memory Poisoning
Section titled “Memory Poisoning”If untrusted content becomes persistent memory:
Attacker-Controlled Input ↓Agent Memory ↓Future Sessions ↓Agent Behaviorthe attack may persist.
Questions include:
Who can write memory?
What can be stored?
Who can read it?
How long does it remain?
Can it affect another user?Memory Isolation
Section titled “Memory Isolation”Memory should generally be scoped appropriately.
For example:
User A Memory ≠User B MemoryIn multi-tenant systems:
Tenant A Memory ≠Tenant B MemoryCross-user memory leakage can create serious privacy and security problems.
Agent Planning
Section titled “Agent Planning”Some agents generate multi-step plans.
Example:
Goal:Investigate Alert
Plan:1. Search SIEM2. Query Cloud Logs3. Check User Activity4. Create ReportPlanning itself may not be dangerous.
The risk depends on what actions the planner is allowed to trigger.
Validate Each Step
Section titled “Validate Each Step”Do not authorize an entire high-level plan automatically.
Use:
Step 1 ↓Authorization
Step 2 ↓Authorization
Step 3 ↓AuthorizationThis reduces the risk of one approved objective becoming unlimited execution authority.
Multi-Agent Systems
Section titled “Multi-Agent Systems”Some architectures use multiple agents.
Example:
Coordinator Agent │ ├── Research Agent ├── Security Agent └── Execution AgentThis creates additional trust boundaries.
Multi-Agent Security Questions
Section titled “Multi-Agent Security Questions”Ask:
Which agent can talk to which agent?
What information is exchanged?
Can one agent command another?
Which agent has privileged tools?
Can an untrusted agent influence a privileged one?Agent-to-agent communication should not automatically be trusted.
Privilege Separation in Multi-Agent Systems
Section titled “Privilege Separation in Multi-Agent Systems”A useful design is:
Research Agent ↓No Enterprise Write Access
Security Analysis Agent ↓Read-Only Security Data
Execution Agent ↓Restricted Approved ActionsThis limits blast radius.
Tool Chaining
Section titled “Tool Chaining”An agent may combine several tools.
Example:
Search ↓Database ↓EmailIndividually, each tool may appear reasonable.
Combined together, they may create an unexpected attack path.
For example:
Search Sensitive Data ↓Retrieve It ↓Send ExternallySecurity reviews should evaluate tool combinations, not only individual tools.
Capability Composition
Section titled “Capability Composition”A useful principle is:
Tool A+Tool B+Tool C ↓Can Create CapabilityGreater Than Any Single ToolThis is an important agent security concept.
Example
Section titled “Example”Agent has:
Tool 1:Read Customer Record
Tool 2:Send EmailTogether they may enable:
Read Sensitive Record ↓Send It ExternallyEven though neither tool individually appears highly privileged.
Network Access
Section titled “Network Access”Agent tools may access external networks.
Security questions include:
-
Which domains are allowed?
-
Can the agent contact arbitrary hosts?
-
Can it access internal services?
-
Can it reach cloud metadata?
-
Can it exfiltrate information?
Outbound access should match business requirements.
Agent Code Execution
Section titled “Agent Code Execution”Some agents can execute code.
Architecture:
LLM ↓Code Tool ↓Execution EnvironmentThis is a high-risk capability.
Secure it using:
-
Sandbox isolation
-
Resource limits
-
Restricted filesystem
-
Restricted network
-
No production secrets
-
Temporary environments
Agent File Access
Section titled “Agent File Access”If an agent can read files:
read_file(path)restrict:
-
Allowed directories
-
File types
-
User ownership
-
Sensitive paths
Do not expose the full filesystem by default.
Agent Database Access
Section titled “Agent Database Access”If an agent queries a database:
AI Agent ↓Database Toolconsider:
-
Read-only access
-
Approved tables
-
Row-level security
-
Result limits
-
User-scoped filtering
The agent should not have more database access than necessary.
Agent Cloud Access
Section titled “Agent Cloud Access”For cloud tools:
AI Agent ↓Cloud APIapply:
-
Dedicated workload identity
-
Least privilege
-
Account or project scope
-
Region restrictions where appropriate
-
Resource-level permissions
-
Audit logging
Avoid long-lived administrator credentials.
Agent Rate Limits
Section titled “Agent Rate Limits”Agents can act much faster than humans.
One mistake may become:
1 Actionwhile an autonomous loop may become:
1,000 ActionsRate limiting and action quotas can reduce impact.
Transaction Limits
Section titled “Transaction Limits”Depending on the application, limit:
Number of Actions
Number of Records
Financial Amount
Number of Recipients
Resources ModifiedThis can contain agent errors.
Stop Conditions
Section titled “Stop Conditions”Agents should know when to stop.
Possible stop conditions include:
-
Repeated failures
-
Unexpected output
-
Permission denials
-
High-risk action request
-
Cost threshold
-
Too many iterations
Example:
Agent Loop ↓5 Failed Attempts ↓STOP ↓Escalate to HumanEmergency Kill Switch
Section titled “Emergency Kill Switch”High-impact AI agents should have emergency controls.
Examples:
Disable Agent
Disable Tool
Revoke Agent Identity
Switch to Read-Only Mode
Block External NetworkSecurity teams should know how to activate these controls.
Agent Logging
Section titled “Agent Logging”Agent activity should be attributable.
Useful telemetry may include:
User Identity
Agent Identity
Model Version
Prompt / Request Metadata
Tool Selected
Tool Parameters
Authorization Decision
Approval Decision
Target Resource
Action ResultThe exact content should balance security visibility and privacy.
Agent Activity Chain
Section titled “Agent Activity Chain”Investigators should ideally reconstruct:
Who asked?
What did the agent decide?
Which tool was used?
What permission was used?
What changed?
Was approval involved?Without this, incident response becomes difficult.
Monitoring for Abnormal Agent Behavior
Section titled “Monitoring for Abnormal Agent Behavior”Potential signals include:
-
Tool usage outside normal patterns
-
Repeated authorization denials
-
Unexpected write operations
-
High action volume
-
External communication
-
Access to unusual resources
Behavioral monitoring may be more useful than attempting to understand every prompt.
Example
Section titled “Example”Expected:
SOC Agent ↓Read SIEM AlertsObserved:
SOC Agent ↓Attempts IAM ModificationThis should generate investigation.
Agent Security Testing
Section titled “Agent Security Testing”Testing should occur only in authorized environments.
Prefer:
-
Dedicated lab accounts
-
Test identities
-
Synthetic data
-
Mock tools
-
Non-production APIs
Avoid destructive production actions.
Step 1 — Understand Business Purpose
Section titled “Step 1 — Understand Business Purpose”Document:
What should the agent do?
What should it never do?Step 2 — Inventory Tools
Section titled “Step 2 — Inventory Tools”Create:
| Tool | Purpose | Read/Write | Risk |
|---|---|---|---|
| Search Runbook | Knowledge | Read | Low |
| Read Alert | Security Analysis | Read | Moderate |
| Disable User | Containment | Write | High |
| Delete Resource | Administration | Write | Critical |
This makes capability visible.
Step 3 — Identify Agent Identity
Section titled “Step 3 — Identify Agent Identity”Document:
Identity:
Permissions:
Scope:
Credential Type:
Rotation / Revocation:Step 4 — Identify Authorization Model
Section titled “Step 4 — Identify Authorization Model”Ask:
Does agent permission depend on user permission?
Does the tool perform its own authorization?
Can one user cause the agent to access another user's data?Step 5 — Test Tool Boundaries
Section titled “Step 5 — Test Tool Boundaries”Use synthetic targets to determine whether the agent can request unauthorized tools.
Example:
TEST-USER
TEST-RESOURCEStep 6 — Test Parameter Boundaries
Section titled “Step 6 — Test Parameter Boundaries”Even authorized tools should reject invalid targets.
Example:
Allowed:Development Account
Test:Production AccountExpected:
DENYStep 7 — Test Approval Controls
Section titled “Step 7 — Test Approval Controls”If a sensitive action requires approval:
Agent Requests Action ↓Approval Requiredverify the action cannot bypass the approval workflow.
Step 8 — Test Prompt Manipulation
Section titled “Step 8 — Test Prompt Manipulation”In your authorized lab, determine whether adversarial input can influence:
-
Tool selection
-
Tool parameters
-
Agent planning
Then verify independent security controls still hold.
Step 9 — Test Indirect Manipulation
Section titled “Step 9 — Test Indirect Manipulation”Use controlled:
-
Documents
-
Web content
-
Tool responses
to evaluate whether untrusted external content can influence agent behavior.
Step 10 — Test Rate and Loop Controls
Section titled “Step 10 — Test Rate and Loop Controls”Verify:
Maximum Iterations
Action Limits
Failure Limitsoperate correctly.
Step 11 — Test Kill Switch
Section titled “Step 11 — Test Kill Switch”Confirm the agent can be disabled quickly.
A control that has never been tested should not be assumed to work during an incident.
Example Security Assessment
Section titled “Example Security Assessment”Consider:
AI Cloud Security AgentPurpose:
Analyze cloud findingsand recommend remediation.Current capabilities:
Read Cloud ResourcesModify IAMDelete ResourcesChange Network RulesIdentity:
AdministratorAutonomy:
Automatic ExecutionThis architecture contains all three types of excessive agency.
Excessive Functionality
Section titled “Excessive Functionality”The agent does not need:
Delete ResourcesModify IAMfor analysis.
Excessive Permission
Section titled “Excessive Permission”Administrator access is broader than required.
Excessive Autonomy
Section titled “Excessive Autonomy”Remediation occurs automatically without approval.
Improved Architecture
Section titled “Improved Architecture”AI Cloud Security Assistant ↓Read-Only Cloud Role ↓Analyze Finding ↓Recommend Remediation ↓Engineer Review ↓Existing IaC WorkflowThis significantly reduces risk.
Excessive Agency Finding Template
Section titled “Excessive Agency Finding Template”Finding:AI Cloud Agent Has Excessive Agency
Affected Component:AI Cloud Security Agent
Business Requirement:Review cloud security findings and recommend remediation.
Observed Capabilities:The agent can modify IAM, networking and production resources.
Permissions:Cloud Administrator.
Autonomy:Changes can be executed without independent approval.
Risk:A model error, Prompt Injection or Indirect Prompt Injectioncould cause unauthorized changes to production resources.
Root Cause:Agent functionality, permissions and autonomy exceedthe minimum required business purpose.
Recommendations:- Remove unnecessary write tools.- Replace administrator access with a dedicated read-only identity.- Separate recommendation and execution workflows.- Require approval for production changes.- Log all tool requests and authorization decisions.Another Example Finding
Section titled “Another Example Finding”Finding:Agent Tool Authorization Relies on Model Decision
Affected Component:Enterprise Support Agent
Observed Behavior:The LLM directly selects and executes account-managementtools without independent authorization.
Potential Impact:Manipulated model behavior may trigger operations outsidethe user's permitted scope.
Recommendation:Implement deterministic authorization between the modeland tool execution, validate parameters and scope theagent identity to the minimum required privileges.Risk Assessment
Section titled “Risk Assessment”A useful conceptual model is:
Agent Risk ≈Functionality ×Privilege ×Autonomy ×Data Sensitivity ×Business ImpactNot a formal scoring equation.
It is a practical way to think.
Example Risk Comparison
Section titled “Example Risk Comparison”Agent A
Section titled “Agent A”Search Public DocumentationNo CredentialsNo Write AccessLower impact.
Agent B
Section titled “Agent B”Reads Internal DocumentsRead-Only Enterprise AccessHigher confidentiality considerations.
Agent C
Section titled “Agent C”Writes TicketsSends EmailHigher operational impact.
Agent D
Section titled “Agent D”Cloud AdministratorProduction AccessAutonomous ActionsVery high potential impact.
AI Agent Security Checklist
Section titled “AI Agent Security Checklist”Purpose
Section titled “Purpose”-
Business purpose clearly defined.
-
Required actions documented.
-
Prohibited actions documented.
Functionality
Section titled “Functionality”-
Only necessary tools exposed.
-
General-purpose tools avoided where possible.
-
Read and write capabilities separated.
Identity
Section titled “Identity”-
Dedicated agent identity used.
-
Shared privileged credentials avoided.
-
Agent identity can be revoked.
Permissions
Section titled “Permissions”-
Least privilege applied.
-
Resource scope restricted.
-
Tenant boundaries preserved.
Authorization
Section titled “Authorization”-
Tool authorization exists outside the LLM.
-
User permissions considered.
-
Tool parameters validated.
-
Sensitive actions independently authorized.
Autonomy
Section titled “Autonomy”-
Autonomy appropriate to business risk.
-
High-risk actions require approval.
-
Stop conditions defined.
-
User input treated as untrusted.
-
External content treated as untrusted.
-
Tool output treated appropriately.
Memory
Section titled “Memory”-
Memory is scoped.
-
Sensitive information minimized.
-
Persistent manipulation considered.
Multi-Agent
Section titled “Multi-Agent”-
Agent-to-agent trust defined.
-
Privileged agents isolated.
-
Communication boundaries controlled.
Execution
Section titled “Execution”-
Code execution sandboxed where required.
-
File access restricted.
-
Network access restricted.
-
Credentials minimized.
Limits
Section titled “Limits”-
Rate limits configured.
-
Transaction limits configured.
-
Iteration limits defined.
Monitoring
Section titled “Monitoring”-
Tool invocation logged.
-
Authorization decisions logged.
-
Agent actions attributable.
-
Abnormal behavior detectable.
Response
Section titled “Response”-
Kill switch available.
-
Agent identity can be revoked.
-
Tools can be disabled.
-
Read-only mode available where appropriate.
Common Beginner Mistakes
Section titled “Common Beginner Mistakes”Mistake 1 — Giving Agents Every Available Tool
Section titled “Mistake 1 — Giving Agents Every Available Tool”Tools should match the business requirement.
Mistake 2 — Using Administrator Permissions
Section titled “Mistake 2 — Using Administrator Permissions”Agents should follow least privilege.
Mistake 3 — Letting the LLM Authorize Its Own Actions
Section titled “Mistake 3 — Letting the LLM Authorize Its Own Actions”Authorization belongs outside the model.
Mistake 4 — Making Everything Fully Autonomous
Section titled “Mistake 4 — Making Everything Fully Autonomous”Autonomy should match impact.
Mistake 5 — Ignoring Tool Combinations
Section titled “Mistake 5 — Ignoring Tool Combinations”Low-risk tools may create high-risk capability when chained.
Mistake 6 — Ignoring Agent Memory
Section titled “Mistake 6 — Ignoring Agent Memory”Persistent memory can create long-lived security effects.
Mistake 7 — Ignoring Multi-Agent Trust
Section titled “Mistake 7 — Ignoring Multi-Agent Trust”One compromised agent may influence another.
Mistake 8 — No Kill Switch
Section titled “Mistake 8 — No Kill Switch”High-impact agents should be quickly containable.
Mistake 9 — Monitoring Only Prompts
Section titled “Mistake 9 — Monitoring Only Prompts”Tool and action telemetry may be more security-relevant.
Mistake 10 — Letting AI Replace Existing Enterprise Controls
Section titled “Mistake 10 — Letting AI Replace Existing Enterprise Controls”AI should integrate with IAM, change control and security workflows rather than bypass them.
AI Security Engineer Perspective
Section titled “AI Security Engineer Perspective”When reviewing an AI agent, ask:
What is the agent supposed to do?
What tools does it actually have?
What identity does it use?
What permissions exist?
Which actions can change state?
Which actions require approval?
Can external content influence it?
Can tools be chained?
What is the blast radius?
How do we detect abnormal behavior?
How do we stop the agent?These questions provide a much stronger assessment than simply asking:
Can the agent be prompt injected?Interview Perspective
Section titled “Interview Perspective”You may be asked:
What is Excessive Agency?
A strong answer is:
Excessive Agency occurs when an AI system has more functionality, permissions or autonomy than required for its business purpose. This can turn model errors or Prompt Injection into high-impact actions because the agent has unnecessary capabilities or authority.
Another question may be:
How would you secure an AI agent?
A strong answer is:
I would first minimize its tools and define its allowed actions. I would give it a dedicated least-privileged identity, validate tool parameters, enforce deterministic authorization outside the model, require approval for high-impact operations, restrict memory and external connectivity where appropriate, log all tool activity and provide a tested kill switch.
Another question may be:
Why should the model not authorize its own tool calls?
A strong answer is:
Because the model is probabilistic and may be manipulated or make incorrect decisions. It can propose a tool action, but the application should independently verify user permission, business policy and action scope before execution.
Another question may be:
What is the difference between excessive functionality, excessive permission and excessive autonomy?
A strong answer is:
Excessive functionality means the agent has tools it does not need. Excessive permission means those tools or identities have more access than required. Excessive autonomy means the agent can perform high-impact actions without sufficient independent approval or oversight.
Another question may be:
Why are tool combinations important in AI agent security?
A strong answer is:
Multiple individually reasonable tools can combine into a dangerous capability. For example, an agent with access to sensitive customer data and an external email tool may be able to create a data-exfiltration path even if neither tool appears critical in isolation.
Key Takeaways
Section titled “Key Takeaways”AI agents move applications from:
Generatetoward:
ActThat makes agent security one of the most important areas of LLM Security.
Excessive Agency can come from:
Excessive Functionality +Excessive Permissions +Excessive AutonomyThe secure design is:
Business Requirement ↓Minimum Capability ↓Least-Privilege Identity ↓Proposed Action ↓Independent Authorization ↓Approval Where Required ↓Restricted Tool ↓LoggingImportant principles include:
-
Minimize agent tools.
-
Separate read and write capabilities.
-
Apply least privilege.
-
Validate tool parameters.
-
Keep authorization outside the model.
-
Match autonomy to business risk.
-
Consider tool combinations.
-
Isolate memory and tenants.
-
Restrict code and network access.
-
Limit loops and transaction volume.
-
Monitor actual actions.
-
Maintain emergency controls.
Most importantly:
An AI agent should have only the capability required to do its job, and model reasoning should never automatically become enterprise authority.
What’s Next?
Section titled “What’s Next?”➡️ 08 — RAG Security
AI agents are one of the most powerful components in modern AI applications.
The next major security area is the enterprise knowledge layer behind many LLM applications:
Retrieval-Augmented Generation.
In the next lesson, you will learn:
-
RAG architecture
-
Document ingestion security
-
Knowledge-source trust
-
Document provenance
-
Authorization-aware retrieval
-
Vector database security
-
Tenant isolation
-
RAG poisoning
-
Indirect Prompt Injection through retrieved content
-
Sensitive data exposure
-
Metadata security
-
Secure indexing
-
Retrieval monitoring
-
RAG incident response
-
Enterprise RAG security architecture
You will move from:
What Can the AI Agent Do?to:
What Information Can the AI Retrieve,Trust and Use?➡️ Next: 08 — RAG Security