An agent assigned to prepare a parts return does not need the ability to change supplier banking details. Yet connecting several workflows through one powerful service account can give a narrow task much broader authority than its owner intended. The problem is not only what the agent was asked to do, but what its tools can actually do.
Design permissions around a task contract: the initiating person or process, the records in scope, the allowed operations, the approval conditions and the point at which authority ends. That contract should remain inspectable even when the agent chooses its own sequence of steps.
Describe the job before choosing credentials
Start with a hypothetical distributor in Durban that wants an agent to prepare a return request for damaged components. The authorised job is to gather the original order, identify the relevant line items and save a draft for a returns coordinator. It is not to approve a credit, dispatch replacement stock or amend the supplier account.
Write those boundaries down as business operations. "Access the ERP" is too vague. "Read the nominated order and create a return draft against its selected lines" is something an engineer and a process owner can review together.
This distinction reflects OWASP's treatment of excessive agency: unnecessary tools, excessive permissions and excessive autonomy are separate contributors to risk. Reducing only one leaves the others to consider. See OWASP's Excessive Agency guidance.
Build a permission map that reviewers can challenge
For the hypothetical return task, create a compact map of operations and restrictions:
- Read the specified order, but not every order belonging to the customer.
- Read the product details needed to identify the returned components.
- Attach the selected damage photographs to the draft, without browsing unrelated folders.
- Save a draft with proposed quantities and reasons, without changing stock balances.
- Submit the approved draft only through a separate coordinator action.
Add the records the agent must never modify, including payment details and customer credit limits. Explicit exclusions help reviewers spot a connector that bundles unrelated capabilities into a convenient permission group.
Ask the returns coordinator to walk through an awkward case: the customer supplies a photograph of a different component from the one ordered. The right outcome is a discrepancy for review. Broadening catalogue or account permissions does not resolve the business uncertainty.
Enforce the boundary outside the model
A prompt can describe permitted behaviour, but authorisation belongs in the execution path. Check the identity, operation and target record on every request, including requests that arrive through an alternative tool. Deny requests that do not match an allowed rule. These principles are covered in the OWASP Authorisation Cheat Sheet.
For the return workflow, the connector should derive the customer and permitted order from trusted task context. It should not accept a replacement customer identifier simply because the model supplies one. Validate the requested line items against that order before saving anything.
Test the boundary directly. A call naming another order should fail even when the proposed description sounds reasonable. A call attempting to update a stock quantity should fail even when the draft correctly identifies a damaged component. Correct reasoning about the business problem is not permission to perform an additional operation.
If the external system cannot provide sufficiently narrow credentials, document that limitation. A restrictive connector may reduce exposure, but it does not make a broadly privileged underlying account equivalent to a narrowly scoped one. Decide whether that residual risk is acceptable before connecting live records.
Give each run a clear ending
Define when a task grant begins and when it stops being usable. For this hypothetical return, the grant might cover one nominated order until the draft is accepted, cancelled or reaches a configured expiry. Choose the duration from the actual review process, not from an assumption that every task finishes quickly.
Keep credentials out of model-visible messages and use short-lived credentials where the system supports them. OWASP includes credential protection, scoped tools and permission controls in its AI Agent Security guidance.
Make expiry a normal workflow state. If the coordinator returns tomorrow, show that fresh authorisation is required; do not silently extend yesterday's access. Preserve the draft so the person does not have to repeat legitimate work, while rechecking the order and current permission before continuation.
Cancellation should also stop queued work. Test what happens when a tool request is waiting while the task is withdrawn. The operating procedure needs a visible distinction between cancelled work, already completed work and an action whose result is still unknown.
Bind approval to the proposed action
For consequential actions, show the approver the actual target, quantities, attachments and intended effect. Do not ask for blanket approval of an agent's plan while hiding the operation it will execute.
Bind approval to the reviewed action and require renewed approval after a material change. OWASP's AI Agent Security guidance describes high-impact action controls that bind approval to the transaction and check integrity before execution.
In the hypothetical return, increasing the quantity after approval must produce a new review request. So should replacing the order or adding another recipient. A spelling correction to an internal note may be treated differently, but the organisation should define that distinction rather than leave it to the model.
Make denials and exceptions useful
A denied operation should explain the permitted next step without exposing unrelated records. The coordinator needs to know whether the task expired, the order fell outside its scope or the requested action requires separate authority.
Do not automatically retry a denial with a more powerful account. Create an exception request that identifies the missing capability and the business reason. The owner can then decide whether the workflow needs redesign, a different task grant or manual handling.
Keep an audit record connecting the task identifier, initiating identity, permission decision, approval reference and tool result. In the return example, that should let an investigator distinguish a saved draft from a submitted return without relying on the agent's narrative recap. Avoid placing credentials or unnecessary customer content in that record.
Test authority separately from task completion
Run two kinds of acceptance checks. First, confirm the agent can prepare an ordinary return draft. Then confirm it cannot complete deliberately unauthorised variations: another customer's order, a changed approved quantity, an expired task or a request to alter payment details.
Include a duplicate submission and a cancellation during execution. Specify whether the connector rejects a repeated request or returns the existing result. Check the downstream records as well as the assistant's message; a polite refusal is not sufficient evidence that no change occurred.
Begin with one bounded automation workflow and review its permission map whenever its tools or responsibilities change. Successful task completion and correct refusal are both release requirements. The agent should have enough authority to finish the assigned job, and a clear route back to a person when the job exceeds it.