AI

Which buttons should your AI agent be allowed to press?

An artificial intelligence (AI) agent can find a customer's order, draft a reply and suggest what to do next. But before you give it access to your business systems, you need to decide which actions it can take on its own and which require a person's approval.

Author
CreateIT
Published
Reading time
11 min

Listen to the articlesynthesised voice, 14:00

Start reading
Image 1Illustrative permission boundaries. Reading and drafting are separate from permission to carry out an action.

A draft reply, a sent email and a changed order have different consequences. You can correct a draft before a customer sees it. If you send the wrong price, you already have a misunderstanding to resolve with the customer. An order cancelled by mistake can disrupt warehouse work, delivery and invoicing.

Start with one task and decide which parts the agent should handle. Once you know what data it needs and how you will check the result, you can choose a solution. You can grant further permissions later, testing each additional action as you go.

From a customer's email to an action in your system

Imagine a business receiving a customer's request to change a delivery address. This is a fictional example to explain how the process might work.

The agent reads the email and finds the relevant order. It notices that the goods have already been dispatched, drafts a reply and flags that the change needs to be agreed with the responsible employee. The employee can see the email, order status and proposed reply in one place.

Here, the agent has helped an employee prepare a response. It did not need permission to change all the customer's details, cancel the delivery or promise a different delivery time.

If you later want to automate the address change itself, you need additional checks. The system must establish whether the request came from an authorised person, whether the order can still be changed and whether the delivery system will receive the update. These checks need to be built into the software.

Reading, drafting and taking action need different permissions

An AI agent can use software tools to access documents, email or a customer relationship management (CRM) system. With the relevant permissions, it can also change records. OWASP's security guidance warns about the risks of unnecessary functions, excessive access rights and too much independence for an agent.

If its task is to summarise emails, it does not also need permission to delete them. If it needs to draft a reply, sending that reply can remain a separate action with its own check. This also limits the consequences of a possible mistake.

The OWASP guidance on excessive agency explains this approach.

A possible starting point for permissions when handling customer requests
ActionWhat to establish before launch
Find an orderAllow access only to the records and fields needed for the task.
Draft a replySave the draft and show where the information used in the reply came from.
Send a replyInitially require approval from the responsible employee. Decide any later changes using test results and an assessment of the possible consequences.
Change an orderCheck the person's authority, the order status and the proposed changes. Send significant changes for approval.
Delete records or change access rightsLeave these functions out if the chosen process does not need them.

Each business needs to assess its own permissions. Even with read-only access, an agent can obtain information it does not need, such as another customer's documents, employee records or commercially confidential information. Define the information required for the particular task you are assigning.

Access checks must still work when the AI makes a mistake

You can instruct a model to follow your company's rules. The system carrying out the action must still check access rights itself. For every request, it must verify whether the user or the agent's account is allowed to perform that specific action.

For example, an employee has access to one customer's order. An agent helping with that order must not use the same access to obtain another customer's data. Checking that a user is signed in is not enough. The system must also check their permission to access the particular record.

Typically, the agent is allowed to perform defined actions through an application programming interface, or API. This is the connection through which software requests information or actions from another system. Instead of granting administrator rights, you can allow the agent to read specific fields or submit a particular kind of change. If the system cannot establish that an action is permitted, it must stop that action.

The OWASP Authorization Cheat Sheet describes checks for each request and record.

A customer's email can also contain instructions for the agent

An agent routinely reads text your business does not control. It might be an email, an attachment or another organisation's website. That content can include an attempt to persuade the model to change its task or reveal information it can access.

This is called prompt injection. For example, a document being processed may contain text presented as a system instruction. The agent was supposed to read the document, but it may mistakenly treat something written inside it as a command.

The solution needs to distinguish the assigned task from the content being analysed. Limit the tools available to the agent and check the actions it requests. Filtering text can help, but a single filter or a well-written prompt does not prevent every form of this attack.

The OWASP guidance on preventing prompt injection explains the attack and several ways to reduce the risk.

People need to see what they are approving

An approval screen should show the proposed action. If it only offers a “Continue” button, an employee may miss what that click authorises. They should not have to search for the message's intended recipient or work out which records the system will change.

Before sending an email, show its recipient, content and attachments. Before changing a record, show the current and proposed values. If material details change after approval, obtain fresh approval. Consent to one action must not silently become permission for another.

This principle applies beyond AI. OWASP's transaction authorisation guidance recommends linking a user's decision to the significant details of the particular action and enforcing the check on the server.

Read more in the OWASP Transaction Authorization Cheat Sheet.

Agree who can approve each action and who will cover for them when they are away. If no answer arrives, the task can stay in a queue or be assigned to another authorised person. Silence must not automatically count as consent.

What happens if the connection drops?

The system sends an email to a customer, but the agent never receives confirmation that it was sent. Will the agent try again? Will the customer receive two identical emails? Plan for this before you build the workflow.

Give important actions a unique identifier and keep a record of their execution. Use the same identifier when retrying the same request. The receiving system needs to recognise it so that it does not perform the action twice. Check whether the work has already completed before retrying. If the receiving system cannot prevent duplicate execution, send the uncertain case to a person. An action that has already happened cannot always be undone.

The AWS article on making retries safe with idempotent APIs explains how to handle repeated requests safely. Here, idempotent means that retrying the same operation does not cause an additional business action.

Set limits on the number of attempts, running time and cost as well. An agent that keeps using a paid service without getting a result needs to stop and notify the responsible person. Your team should know how to stop the automation and take over the work.

Test the difficult cases before launch

One successful request does not show how the solution will behave in everyday use. Include incorrect and unauthorised requests in your test plan. Check that the agent cannot bypass the restrictions, even when the model proposes a prohibited action.

Try cases where the order number is missing, a user attempts to obtain another customer's data or the details of an action change after approval. Test a repeated request and a failure in an external system. Write down the expected result for each case in advance.

Repeat the tests after significant changes to the model, tools, instructions or access rules. Record which version of the solution you tested and which actions the system stopped. The software itself must verify approval, prevent duplicate execution and enforce the agreed limits.

The OWASP AI Agent Security Cheat Sheet covers execution controls, limits and security testing.

An activity history helps you establish what happened

If a customer asks why an order changed, your team needs to be able to find out. Record when the action happened, who requested and approved it, which record changed, what changed and the outcome. The history should distinguish what the agent merely suggested from what the system actually did.

You do not need to copy every customer conversation into activity logs if it is not required for investigation. Do not store passwords or access keys in logs. Decide who can access the history and how long it will be retained. It should help investigate events without collecting unnecessary sensitive information.

The OWASP Logging Cheat Sheet explains what to record and how to protect it.

Where to start in your business

Choose one recurring task whose output your team knows how to assess. Sorting incoming requests, drafting a reply or checking information in a document can be useful starting points. Initially, a person reviews the result before the next action takes place.

Keep a selection of everyday examples in line with your company's data-handling rules. They will help you compare results. Record how often an employee needs to correct a response, which mistakes recur and how long the review takes. You can only assess the benefit properly if you also account for handling exceptions and fixing errors.

After the trial, you will be better placed to decide which actions to automate. Some may be safe to perform using explicit software rules; others may need both AI assistance and human judgement. Grant broader permissions when there is a specific benefit to doing so. Assess the possible consequences of mistakes first.

Before the project starts, agree who will own the process after launch. That person needs to know how to spot an error, stop an action and contact the support team. The solution should fit into your team's everyday work, including when events do not follow the usual pattern.

An AI agent for work your team understands

CreateIT develops AI agents that use a company's data and tools, handle requests and carry out several related steps. We retain human control over important decisions. We connect the agent to your CRM and documents and incorporate it into your existing workflows.

In an initial conversation, we can examine one task your team repeats every day. We will establish what information it needs, what the agent will be allowed to change and where approval is required. We can then define the scope of the first task, agree the tests and assess the development work involved.

Describe the process and name the systems you use in your enquiry. Do not send passwords or customers' personal data in the first message. If we need examples or access for the assessment, we will agree an appropriate way to share them.

Find out more about our AI agent development service.

Share

LinkedIn Facebook Email

Newsletter

New articles in your inbox

Sign up to the CreateIT newsletter for practical articles on development, AI, marketing and cybersecurity.

We plan to send the newsletter no more than once a month.