The ML Gruppe logo
A horrified employee stands in front of a computer screen, while behind her, an AI agent with a devilish grin floats in the air, made up of glowing blue particles of light.

When AI Takes Action Instead of Just Responding: Using AI Agents Safely

Jaber Kakar, Head of Information Security

9. October 2026

An AI agent is instructed to stop making changes—and yet it deletes a production database anyway. What sounds like a theoretical worst-case scenario has already happened. The incident shows how quickly a faulty AI action can turn into a real security problem.

How can AI agents be controlled and secured so that they can be used productively even in sensitive environments? This article highlights the security risks companies should be aware of and explains how guardrails, human-in-the-loop mechanisms, and monitoring help to securely control tool access, permissions, and autonomous actions.

In this post:

In a nutshell:

  • AI agents can plan and carry out actions on their own. This creates additional security risks.
  • Agent inventory and least privilege ensure transparency and limit unnecessary access rights.
  • Guardrails and human-in-the-loop mechanisms set limits on autonomous actions and ensure human oversight during critical decisions.
  • Logging, monitoring, and incident response make actions traceable and help detect and contain security incidents.
  • For the defense sector, government agencies, and critical infrastructure, clearly defining access and autonomy is particularly important given the potential consequences.

The deletion of the production database occurred in July 2025 and became known as the “Replit incident.” SaaStr founder Jason Lemkin was testing Replit’s AI coding agent to develop an application. Although he had explicitly ordered a “Code and Action Freeze,” the agent independently deleted a production database containing records on more than 1,200 executives and over 1,190 companies.

This case highlights the real problem: An instruction not to do something does not, in and of itself, constitute a technical security barrier. If an AI agent has access to a production system and the appropriate permissions, errors can have immediate consequences.

As soon as AI takes action rather than merely responding, a quality issue becomes a safety issue.

A woman sitting at a computer quickly pulls her hands away from the keyboard in surprise.

Safe AI Starts with Employees

A woman sitting at a computer quickly pulls her hands away from the keyboard in surprise.

The ML Gruppe helps companies and organizations develop the skills needed to use AI safely and responsibly.

What will change when AI is able to act on its own?

The key difference between traditional generative AI and AI agents can be boiled down to two verbs: one responds—the other acts.

For example, a traditional AI assistant generates text, an analysis, or a recommendation in response to a prompt. What happens next is usually decided by a human. An AI agent, on the other hand, can independently pursue a specified goal, access data and tools, and carry out actions.

This changes the security risk: If an AI agent makes a wrong decision, it can—depending on its permissions—carry out that decision itself. For example, it can modify files, send emails, lock user accounts, or change settings in production systems.

With generative AI, the focus is on the quality of the response. With AI agents, the safety of the resulting action is also a key consideration.

The extent to which an AI agent is allowed to act independently is by no means predetermined. There is a crucial difference between an agent that merely suggests the next step and one that carries it out on its own without asking for confirmation. This makes the degree of autonomy a key factor in the safe deployment of AI agents.

Autonomy is a design decision

How much autonomy should an AI agent be given? That doesn’t depend solely on what it is technically capable of. The research model “Levels of Autonomy for AI Agents” distinguishes five levels of increasing autonomy and explicitly treats the degree of autonomy as a design decision.

For companies, the principle behind this is particularly relevant: Just because an AI agent can perform a task on its own does not mean it should be allowed to do so completely autonomously. Depending on the risk, it may only make suggestions, carry out actions after human approval, or act independently within clear boundaries.

This also expands the scope of AI governance: An overarching governance framework—as described in more detail in our article “ISO 42001: AI Governance for the Safe Use of AI” —provides the foundation for this. When it comes to AI agents, additional questions arise: What systems and tools is the agent allowed to use? What actions is the agent allowed to perform on its own—and when must a human make the decision? This is where AI governance and information security intersect directly.

The goal is not maximum autonomy, but rather the level of autonomy that is appropriate for the specific risk and intended use.

From Shadow AI to Agent Sprawl: When No One Can Keep Track of It All Anymore

Even generative AI presents companies with a familiar problem: shadow AI. We’ve already examined in detail the risks this poses and how companies can control shadow AI in our article “Shadow IT in the Workplace.”

AI agents exacerbate this problem because they are not merely used but can independently access data, tools, and systems and perform actions. Employees and departments can create, configure, or activate agents through existing platforms.

If their numbers grow unchecked, this is referred to as “agent sprawl.” Companies then quickly lose track of which agents are actually active, who is responsible for them, and what permissions they have.

This is precisely why a centralized agent inventory is becoming increasingly important. In light of growing agent sprawl, Gartner recommends that companies centrally track all AI agents and, among other things, ensure that their responsibilities, permissions, and lifecycle are transparent.

A lack of transparency regarding AI use can lead to a lack of control over access and actions on the part of AI agents.

When Agent Sprawl Encounters Sensitive Systems

A lack of oversight becomes particularly critical when agents access sensitive or production systems. For example, an AI agent could be used by a KRITIS operator to analyze log data, process tickets, and block suspicious user accounts. However, if it misinterprets the data or its behavior is manipulated, it could also block legitimate access and thereby disrupt operational processes. A misjudgment can thus lead to actions with immediate consequences for operations.

With the appropriate permissions, a misinterpretation, prompt injection, or manipulated data source could cause the system to lock legitimate accounts or alter configurations. A misjudgment could thus lead to actions that have an immediate impact on operations.

A joint international recommendation from cybersecurity authorities regarding the deployment of agent-based AI is explicitly directed at operators of critical infrastructure as well. Among other things, it warns against overly broad permissions, unintended or erroneous actions, and insufficient human oversight. Among other things, it recommends the principle of least privilege, clearly defined boundaries, and continuous monitoring.

The Biggest Security Risks Associated with AI Agents

The more systems, data sources, and tools an AI agent can use, the larger its potential attack surface becomes. The OWASP Top 10 for Agentic Applications 2026 highlights the new risks that arise from this. For companies and particularly sensitive sectors such as defense, four scenarios are especially relevant:

Prompt Injection and Agent Goal Hijacking: Manipulated content or instructions can influence an agent’s behavior and attempt to alter its actual goal. This becomes particularly critical when the agent processes information from external sources and is then allowed to perform actions independently. Manipulated information can thus lead to an undesirable action.

Tool Misuse: A tool may be entirely legitimate in and of itself—for example, an email program, a database query, or an interface to another system. The problem arises when an agent uses this tool in a way other than intended.

Identity & Privilege Abuse: AI agents require specific access rights for many tasks. If these permissions are too broad, an agent may access data or functions that it does not actually need to perform its intended task. If its identity is compromised or its behavior is manipulated, these excessive privileges can become a security risk.

Cascading Failures: In networked environments, a failure may not be limited to a single agent. Incorrect information or actions can be passed on to other agents, automated processes, or connected systems, triggering further actions there. Especially in highly automated workflows, errors can thus propagate across multiple systems.

The risk posed by an AI agent depends not only on how powerful the model is, but also on what the agent can access and what it can trigger there.

Permissions, access rights, and autonomy must therefore be limited before the system goes live.

Using AI Agents Safely – 6 Key Protective Measures for Businesses

Risks cannot be completely eliminated, but companies can specifically limit what AI agents can access, what actions they can perform, and how autonomously they are allowed to act. It is crucial to establish these limits before the AI agents are put into production.

1. Maintain an agent inventory ly tracking AI agents centrally creates transparency: Who is responsible? What data, systems, and tools do they access? New agents should be registered, and those no longer needed should be consistently deactivated. This helps prevent uncontrolled agent sprawl.

2. Limit permissions according to the principle of least privilege An agent should be granted only the permissions it actually needs to perform its specific task. This includes, whenever possible, dedicated identities and clearly defined access rights rather than shared accounts or blanket permissions.

3. Control Access to Tools and the Internet Not every agent needs unrestricted Internet access, external APIs, or access to production systems. Companies should define which tools and data sources are permitted and test access in a controlled environment before approving them for production use.

4. Limiting Autonomy Through Guardrails and Human-in-the-Loop The degree of autonomy is adjusted to the specific risk. Guardrails set technical limits on an agent’s behavior, for example through action limits, input and output filters, or approval thresholds. For critical or irreversible actions, human approval should also be required. Whether “human-in-the-loop” is necessary can be assessed based on the potential for harm, reversibility, and the sensitivity of the affected data or processes.

5. Log and monitor actions Logging and monitoring make it possible to track which tools an agent has launched, what data they have accessed, and what actions they have performed. This helps identify unusual behavior early on and investigate incidents later.

6. Extend Incident Response to AI Agents Companies should determine in advance how they will respond if an agent acts unexpectedly or in a way that poses a security risk: How will it be stopped? How are permissions revoked? Who takes over further handling? For critical situations, a kill switch should also be provided that allows the agent to be immediately deactivated or disconnected from connected systems and tools.

However, technical safeguards alone are not enough. Decision-makers must be able to assess what level of autonomy is appropriate for a given use case, when human oversight is necessary, and how to respond in the event of an incident. This is where AI governance, information security, and training intersect. The ML Gruppe supports companies in this regard by offering, among other things, training programs on AI and digital technologies, information security, cyber defense, and roles and responsibilities.

Checklist: Is our AI agent sufficiently secure?

Question What needs to be clarified?
What is the agent allowed to do? Tasks, Permitted Actions, and Clear Boundaries
What is he allowed to access? Data, Applications, APIs, Tools, and Internet Access
What is he allowed to decide on his own? Degree of Autonomy and Limits on Independent Decision-Making
When does a person have to make a decision? Authorizations and Human-in-the-Loop for Critical Actions
Are his actions understandable? Logging and Monitoring Access and Actions
What happens when an incident occurs? Incident Response, Revocation of Privileges, and Kill Switch
Who is responsible? Responsibilities in Academic Departments, IT, Information Security, and Management

Practical Tip: The checklist shouldn’t be used only during the technical implementation phase. It can be used as early as the planning stage to evaluate a proposed AI agent and helps ensure that security requirements are incorporated into the use case from the outset.

Why AI Agents Are Particularly Sensitive for the Defense Sector, Government Agencies, and Critical Infrastructure

The risks described are particularly relevant for the defense sector, government agencies, and critical infrastructure (KRITIS). An AI agent with access to sensitive data, specialized procedures, technical systems, or operational processes can have a greater impact than a simple assistance system in the event of misconfiguration, tampering, or compromised access credentials.

In a government agency, for example, an agent might compile information from various specialized systems or prepare files for further processing. If the agent is granted overly broad access rights, sensitive data could be unintentionally accessed, altered, or disclosed to unauthorized parties. In the defense sector, this risk is particularly serious when vulnerable or classified information is involved.

At a KRITIS operator, an agent could, for example, analyze error reports, prioritize tickets, or trigger actions in connected systems. A wrong decision or manipulation could then potentially affect not only data but also operational processes directly.

It is therefore important that not only developers and information security professionals are aware of the specific risks posed by agent-based systems. Executives and business users must also understand the responsibilities associated with the implementation, approval, and use of AI agents. The ML Gruppe supports companies and organizations in building the necessary expertise at the intersection of AI, information security, and cyber defense.

The more critical the process, the less the safety of an AI agent should depend solely on the quality of its model.

Conclusion: AI Governance Becomes Agent Governance

Many companies have rightly recognized that they need to establish rules for the use of generative AI. With AI agents, however, AI governance must go a step further. Simply deciding which data may be fed into an AI system is a thing of the past. With agent-based AI, companies must also decide which actions an agent is permitted to perform, which systems and tools it can access, and where human oversight remains absolutely essential.

This means that AI agents should not simply be given limited leeway. They should be allowed to work as independently as is appropriate for their task and justifiable from a safety perspective. The greater the potential consequences of a wrong decision, the tighter the limits must be set.

“With AI agents, it’s no longer just a matter of whether we can trust an answer. We have to ask ourselves what the consequences will be if the system acts on its own based on that answer.”

The safe use of agent-based AI is anything but a purely technical task. Executives, business units, IT, and information security teams must assess risks, understand their responsibilities, and work together to establish appropriate guidelines for its use.

Build AI Competence

The ML Gruppe helps companies and organizations develop the skills needed to use AI safely and responsibly.

FAQ: Frequently Asked Questions About AI Agents

What are AI agents?2026-10-12T11:53:55+02:00

AI agents are AI systems that not only generate content or answer questions, but can also independently plan work steps and carry out actions based on a specified goal. To do so, they can, for example, access data, applications, APIs, or other tools.

What security risks do AI agents pose?2026-10-12T11:53:10+02:00

Additional risks arise, in particular, when AI agents are allowed to independently access data, tools, or systems and perform actions. Tampered inputs, incorrect decisions, or overly broad permissions can thus have a direct impact on data and business processes.

What is Agent Sprawl?2026-10-12T11:52:44+02:00

“Agent sprawl” refers to an uncontrolled increase in the number of AI agents within an organization. Without a centralized inventory and clear lines of responsibility, it can quickly become unclear which agents are active, what permissions they have, and what data and systems they can access.

How can companies use AI agents safely?2026-10-12T12:02:47+02:00

Companies should grant AI agents only the permissions and access rights they need to perform their specific tasks. Key protective measures include an agent inventory, the principle of least privilege, controlled access to tools and the internet, guardrails, and human-in-the-loop oversight, as well as logging, monitoring, and an incident response process tailored to AI agents.

How much autonomy should AI agents be given?2026-10-12T11:52:21+02:00

AI agents should only be allowed to act autonomously to the extent necessary for their specific purpose and justifiable from a safety perspective. The greater the potential for harm resulting from a wrong decision and the more difficult it is to reverse an action, the greater the level of human oversight should be. The degree of autonomy should therefore be deliberately defined for each specific application.

What does “human-in-the-loop” mean in the context of AI agents?2026-10-12T12:01:42+02:00

“Human-in-the-loop” means that a person is integrated into an automated process at specific points and, for example, must approve an action. This is particularly important for decisions involving a high risk of damage, sensitive data, or actions that are difficult or impossible to reverse.

What is a kill switch for AI agents?2026-10-12T11:50:18+02:00

A kill switch makes it possible to quickly stop an AI agent in a critical situation or to cut off its access to connected systems and tools. It is therefore an important component of incident response for agent-based AI systems.

Go to Top