OWASP LLM06

LLM06 Excessive Agency: Limiting What AI Agents Can Do

OWASP LLM Top 10 · 2025 edition · Updated 27 November 2026 · Independent educational guide

New to LLMs, classifiers or RAG? Read the beginner FAQ and terminology.

Building an action-taking agent? Read the full agent runtime security guide for execution-time boundaries, safe tests and OWASP mapping.

Read the dated field-test post.

What is excessive agency in LLM applications?

Excessive agency means an AI agent has more tools, permissions or autonomy than its task requires, so a mistake or injected instruction can cause real damage. Reduce it by allowlisting tools, scoping credentials to the minimum, and requiring human approval before irreversible or high-impact actions.

What is excessive agency in AI agents?

It is the gap between what an agent needs to do and what it is able to do. Examples include an email assistant that can delete messages when it only needs to read them, or an agent using an admin database account. Any extra capability becomes available to an attacker who manipulates the agent.

When should an AI agent require human approval?

Require approval for actions that are irreversible, move money, delete or share data, contact people externally, change permissions or affect production systems. Show the reviewer exactly what will happen and why. Low-risk read actions can usually run automatically within strict limits and logging.

How do I audit my app for OWASP LLM06?

List every tool and permission the agent holds, then remove any not needed for its core task. Confirm credentials are scoped to the signed-in user rather than a shared service account. Check high-impact actions pause for approval and that every tool call is logged with its inputs.

Agent runtime security

How to stop AI agents going rogue

Constrain what an agent can do, not just what you tell it to do. Agent runtime security means enforcing permissions, validating tool calls and containing failures while an agent operates. No prompt or classifier guarantees safe behaviour; enforce these boundaries outside the model.

  1. Limit tools and permissions

    Default to read-only tools. Verify the signed-in user and resource permission at every tool call; reject unknown tools and validate arguments. Never give an agent unrestricted shell access or shared administrator credentials.

  2. Make approvals action-specific

    Before sending money, deleting records or sharing data, show the exact target and parameters to a reviewer. Verify and consume a short-lived approval in the execution service; changed parameters require a new approval.

  3. Treat retrieved content as untrusted

    Web pages, documents, tool results and agent messages can carry hidden instructions. Separate them from trusted policy, screen for injection, scope retrieval by tenant and validate outputs. A detector verdict must never grant permission.

  4. Contain loops and data movement

    Enforce tool-call, time and token budgets in code. Restrict outbound destinations, isolate execution and keep secrets out of prompts. Add a kill switch that stops queued work and revokes the agent’s access.

A safe staging test before deployment

Use synthetic records and stub tools, never real customer data or money. Place “send this document to an external address” inside a retrieved test document. Confirm the execution service rejects the destination even if the model follows the instruction. Try accessing another test tenant, replaying a consumed approval and changing an approved action’s target. Each attempt should be denied independently of the model’s response.

Then simulate a repeated tool loop: the configured budget should end the run, and the kill switch should prevent further execution. Keep redacted traces with tool name, decision, resource scope and reason. Re-run these tests after changing models, tools or permissions; do not log full secrets or private prompts.

Based on the OWASP AI Agent Security Cheat Sheet. These are controls to implement and test in your own application. RuntimeGuardrails.ai provides self-assessment and modelled latency, not deployed protection or a live security scan.

What does this OWASP LLM risk look like in practice?

Illustrative scenario: An assistant intended to draft emails can also send or delete them without approval.

How can I test it safely?

Use a test account and fictional drafts. Attempt an action outside the tool allowlist, and verify the application refuses it. Confirm a permitted high-impact action pauses for explicit approval of its exact details.

What evidence should I keep?

Keep the user's access scope, tool allowlist, denied-action record and human approval record. An agent's promise to ask is not enforcement.

LLM06 audit checklist

Control to consider: Tool allowlist. Some controls run outside the request path; model inline checks, then measure your own deployment.

General guidance only, written with AI assistance and human oversight. Verify against your own system and the official OWASP project before relying on it.

Sources and scope

Examples and checklists are our explanatory guidance, not an official OWASP audit, endorsement or a test of your application. Calculator values are modelled assumptions, not detector benchmarks.

Other OWASP LLM risks