How Companies Keep AI Agents From Taking Actions They Shouldn't

An AI agent can issue a refund, not only suggest one. Here is how companies limit what an agent can access, check the action against policy, and stop it when it goes too far.

How Companies Keep AI Agents From Taking Actions They Shouldn't

An AI chatbot can suggest issuing a refund. An AI agent connected to a company's payment system can issue one. The difference matters. If the agent misinterprets a customer's request or acts on misleading information, the company could lose money.

When integrating AI into business software, companies need to decide how much authority to give these agents. Restricting every action defeats the purpose of automation, while granting unrestricted access exposes the business to unnecessary risks. Written instructions alone cannot guarantee that an agent will stay within its assigned responsibilities.

In this article, we examine how companies can establish technical boundaries for AI agents, which decisions should remain with employees, and how to verify that these safeguards work.

Why AI agents may act beyond their intended scope

Unlike conventional rule-based software, AI agents can determine which steps to take to complete a task based on their interpretation of the situation. This flexibility makes them useful in situations where customer requests or business conditions vary. However, their decisions can be wrong.

Consider the customer service agent from our earlier example. A customer reports receiving a damaged item and asks for compensation. The agent might issue a full refund when company policy only allows a replacement.

External content introduces another risk. An email or document that the agent processes may contain malicious instructions designed to make it disclose confidential information or perform an unauthorized operation. This is known as prompt injection.

The potential damage largely depends on the agent's available capabilities. An incorrect decision has very different consequences when an agent can initiate a payment instead of simply recommending one.

Restricting what AI agents can access and do

Companies can limit the scope of an agent's activities by controlling its access to business systems. The principle of least privilege is a good starting point: give the agent only the resources and capabilities it needs to perform its assigned tasks.

For example, a customer service agent working with Shopify may need to retrieve order details and check delivery statuses. Neither task requires the ability to change product prices or delete customer records. Developers can configure AI agent permissions so that the agent can read specific information without being able to modify it.

Access to individual software functions also needs consideration. If an application provides separate functions for retrieving payment details and issuing refunds, developers can make only the first function available to the agent. Even if the model decides that a refund is necessary, it has no means of processing one.

Ideally, each agent should have its own digital identity within the systems it uses. Sharing an administrator account across multiple agents makes it difficult to restrict their activities individually or revoke permissions for one agent without affecting others. Existing access controls in business applications can help enforce these restrictions.

Agents that can run code may require an additional layer of protection. Developers can execute their code in an isolated environment with restricted access to company files and internal networks.

The challenge is determining how much access is sufficient. Excessively narrow permissions may prevent an agent from completing legitimate tasks and increase the workload for employees. As the agent takes on new responsibilities, companies should reassess its permissions against actual business requirements instead of granting broad access in anticipation of future needs.

Enforcing business rules outside the AI model

Some operations cannot be classified as simply allowed or forbidden. A customer service agent may be authorized to issue refunds, but only under certain conditions. Giving it access to the refund function does not establish those conditions.

During enterprise AI integration, developers can introduce a separate layer of software logic that checks proposed actions against company policies before executing them. Unlike instructions given to an AI model, these checks do not depend on the model interpreting a request correctly.

Consider a retailer that allows its AI agent to issue refunds of up to $50 for eligible orders. Before processing a refund, the application checks the requested amount against the limit and verifies the order's eligibility, including its refund history. If any check fails, the application rejects the operation. The agent cannot override this decision if all refund requests must pass through these checks.

Developers also need to account for sequences of actions. A $50 limit on individual refunds offers little protection if an agent can issue several refunds against the same order. The application should therefore enforce the cumulative refund limit per order and ensure that the total does not exceed the original payment.

What happens when information is missing? If the application cannot retrieve the original payment details due to a temporary service outage, it should prevent the refund from proceeding until the necessary information becomes available.

This approach requires additional development and maintenance. When a company changes its refund policy, developers may need to update the corresponding software rules. Some policies are also too subjective to translate into precise conditions. For example, determining appropriate compensation for a particularly poor customer experience may require human judgment.

Requiring human approval for high-risk actions

Human involvement does not have to extend to every decision an AI agent makes. Companies can identify operations that carry significant financial, legal, or operational consequences and require an employee's approval before execution.

A retailer, for instance, could divide customer service operations into three categories:

  • Automatically permitted: Issuing refunds of up to $50 for orders that meet the company's refund criteria.
  • Subject to human approval: Providing compensation above the established limit or making exceptions to the standard refund policy.
  • Prohibited: Transferring refund payments to an unrelated bank account.

When designing human approval steps, developers should consider what information employees need to evaluate each request. In the case of a refund, this could include the customer's complaint and the original payment details, along with the agent's explanation for the proposed amount. The application should also ensure that the agent executes only the specific operation the employee approved.

Too many approval requests can become counterproductive. Employees may spend considerable time reviewing routine operations or start approving requests without close review. On the other hand, overly lenient approval criteria may leave consequential decisions unchecked.

Companies should also decide what happens when an authorized employee is unavailable. Low-priority requests can remain pending, while urgent cases may need to be redirected to another authorized person. A lack of response should not be treated as consent.

Tracking AI agent activity and stopping unwanted actions

Even with safeguards in place, companies need visibility into what their agents do. If a customer disputes a refund amount, the business should be able to reconstruct the events leading to that transaction.

Developers can use audit logs to record which software functions an agent called, what data it submitted, and the outcome of each operation. These records can also help identify recurring problems, such as repeated attempts to perform restricted actions. However, recording entire conversations or payment details may expose sensitive information. Companies need to determine what information is necessary for investigating incidents and how long to retain it.

Recording activity alone is insufficient. Companies also need mechanisms for interrupting an agent's work. For instance, an administrator could suspend an agent responsible for processing refunds without disabling other customer service operations. Developers can also implement automatic suspension when predefined conditions are met, such as an unusually high number of refund requests within a short period.

Stopping an agent does not undo its previous actions. While some database changes can be reversed, recovering money from a completed transaction may require a separate financial process. Businesses should establish recovery procedures based on the operations their agents are authorized to perform.

FAQs

Why can an AI agent do more damage than a chatbot?

A chatbot can only suggest a refund. An agent connected to the payment system can issue one. If it misreads the request, or follows instructions hidden in an email, the company can lose money. The damage depends on what the agent is allowed to do, not only on how accurate the model is.

What does least privilege mean for an AI agent?

Least privilege means the agent gets only the access it needs for its job. A support agent that looks up orders and delivery status does not need to change prices or delete customer records. Give it a way to read payment details, and leave the refund function unavailable. Each agent should have its own account.

Why check refund rules outside the AI model?

Instructions inside the model can be misread. A separate software check can allow refunds only up to $50, only on eligible orders, and only up to the original payment in total. If order details cannot be loaded, the refund should wait. The agent cannot skip these checks when every refund has to pass through them.

When should a person approve an AI agent's action?

Let the agent handle low-risk work, such as a refund of $50 or less. Ask an employee to approve larger compensation or an exception. Block payments to an unrelated bank account. Show the employee the complaint, the payment, and the reason for the amount, and run only the action they approved.

Share this article

Help others discover this content

Related Articles

Continue reading with these related posts

Get online this week

Keep the site.
Leave the old host.

Cheap hosting from PKR 242/mo on a 5-year plan, 50% off. Free eligible migration, and support in Urdu or English. Pay with JazzCash or EasyPaisa.