Software Development 6 min read

Managing excessive agency in enterprise AI systems

Traditional RBAC cannot mitigate Excessive Agency risks. We explore architectural methods to constrain autonomous AI agents, from RLS to platform-level sandboxing.

Autonomous AI agents are evolving from experimental tools into full-fledged enterprise-grade digital employees. They are capable of independently analyzing financial reports, interacting with corporate databases, and initiating transactions via API. However, this autonomy presents a critical challenge for security architects: Excessive Agency. When artificial intelligence is granted authority without proper architectural constraints, the corporate perimeter faces threats that cannot be mitigated by traditional firewalls.

Anatomy of Excessive Agency: why AI agents become the most dangerous users

In its current framework (Top 10 Risk & Mitigations for LLMs and Gen AI Apps 2025), OWASP identifies Excessive Agency as a distinct and critical risk class. This vulnerability occurs when an AI agent is granted more permissions, functionality, or autonomy than is necessary to perform its intended task.

The problem often stems from architectural oversimplification. Developers may provide agents with universal API keys that have read/write access to the entire data set to ensure model "flexibility." Security testing indicates that up to 49% of potential attack vectors on integrated GenAI systems are linked to excessive access rights. Meanwhile, only 13% of architectures provide for the isolation of generated code execution or tool calls.

Three typical scenarios illustrate the problem:

  • Scenario 1 (Excessive permissions): An AI agent for internal document summarization receives write-access to a database via overly broad API scopes, creating a risk of unauthorized data modification.
  • Scenario 2 (Excessive functionality): A code analysis agent inadvertently accesses internal API endpoints because the system lacks restrictions at the individual attribute level.
  • Scenario 3 (Excessive autonomy): An agent, attempting to fulfill a non-standard request, independently calls an external uncertified tool and transmits sensitive corporate data to it.

Threat modeling: a perspective through MITRE ATLAS and NIST AI RMF

To understand how attackers exploit model autonomy, engineers use the MITRE ATLAS knowledge base, which describes real-world attack tactics against AI systems. One of the most dangerous vectors is indirect prompt injection. An attacker places a malicious instruction in a document or email that the agent must process. By treating the instruction as legitimate, an agent with excessive rights can independently perform a destructive action within the system.

This is why the NIST Artificial Intelligence Risk Management Framework (AI RMF 1.0) emphasizes that for AI systems in critical infrastructure, it is essential to evaluate context, reliability, and accountability rather than focusing solely on model accuracy. A system that answers queries accurately but can uncontrollably call system APIs is inherently dangerous.

Architectural shield: sandboxing and the principle of least privilege

To prevent the consequences of Excessive Agency, the architecture must incorporate rigid containment. The foundation is the principle of least privilege (PoLP). An agent should not interact with databases directly. All actions must pass through an API Gateway with strict parameter validation.

For tools that execute code or perform complex calculations, environment isolation (sandboxing) is mandatory. Containers in which an agent runs scripts or calls utilities must have restrictions on execution time, memory usage, and blocked access to the internal network.

Model-driven security: embedding safety into the platform core

The traditional role-based access (RBAC) approach typically authorizes a user as a whole, and an AI agent acting on their behalf inherits all privileges within the session. This is insufficient for secure autonomy. A transition to model-driven security is necessary—an architecture where access policies are not an add-on but are integrated directly into the domain model.

An example of this approach is found in systems built on the low-code platform UnityBase (a joint development by the companies of Intecracy Group, where InBase is the key developer). In this platform, security is implemented at the core level through Row-Level Security (RLS) and Attribute-Level Security mechanisms. Even if an AI tool (e.g., an integrated AI Center module) exceeds its context due to prompt manipulation, the platform's ORM layer physically blocks access to rows or attributes for which the agent does not have explicit permission within the scope of a specific operation.

This focus on secure architecture is supported by international standards. For instance, Softengi applies standardized approaches to AI management (confirmed by ISO/IEC 42001:2023 certification) when developing analytical and predictive solutions, ensuring that security is a primary requirement at the system design stage.

Audit trail and human-in-the-loop

To identify risks before they cause incidents, cloud providers and frameworks (such as the AWS Well-Architected Framework) recommend conducting regular architectural reviews. For AI systems, this means implementing two mandatory components:

First, end-to-end logging (Audit Trail). The system must record not only the final result but also the process of tool selection and the agent's intermediate reasoning steps.

Second, implementing the human-in-the-loop (HITL) pattern for critical operations. Any action involving changes to financial data, infrastructure modification, or the transmission of confidential information must require authorization by a human operator.

Agency containment matrix

Criterion (Vector)Traditional (vulnerable) approachSecure (architectural) approach
Data accessBroad API keys and basic RBAC within a user sessionRow-Level Security (RLS) and attribute-level restrictions in the platform core
ExecutionUnrestricted tool and script calls in a general environmentIsolated containers (sandboxing) with network and time restrictions (timeouts)
AuthorizationFull decision-making autonomy for all operation typesHuman-in-the-loop: mandatory confirmation for critical operations (write, delete)
Audit and monitoringLogging only the final state or execution resultEnd-to-end logging of every step (Chain of Thought) and external API calls

FAQ

What is Excessive Agency in the context of OWASP Top 10 for LLM 2025?

It is an architectural risk class that occurs when an AI agent is granted excessive permissions, broader functionality, or unnecessary autonomy beyond what is required for its task. This allows a compromised model to perform unauthorized actions within the system.

How to implement the principle of least privilege (PoLP) for autonomous AI agents?

Agents should interact with data exclusively through restricted APIs that strictly validate request parameters. Infrastructure access and code execution must occur in isolated sandboxes (sandboxing) without direct access to the general corporate network.

Why does traditional RBAC fail to protect against autonomous AI system errors?

RBAC typically grants access at the user session level. If an agent inherits these rights, it gains full access to all data visible to the user. To constrain AI, a model-driven security approach is required, featuring control at the row-level (Row-Level Security) and attribute-level.

Data sources