Call Join free
Tech Lab Miami
Tech Lab MiamiTECH LAB MIAMI
← Back to Automation & Operations

Your AI Agent Has Write Access. Should It?

Explore the implications of granting write access to AI agents and the security measures necessary to ensure responsible usage.
Your AI Agent Has Write Access. Should It?

Imagine the consent screen is open. Your new sales assistant agent is asking to read and write contacts, deals, notes, and email in your CRM, and the only button that makes the demo work is Allow. It is tempting to click it, then write a careful system prompt listing everything the agent must never do. That order is backwards. The scope you grant on that screen is your real policy. The prompt is only a request.

This article covers the technical side of that decision: which tools an agent gets, where the limits are enforced, and what has to be true before any write happens. For where people should sit in an automated process, see our earlier piece, Where to Put the Human in an Automated Workflow. The question here is narrower and more mechanical: what can the agent's credentials do when nobody is watching?

Whatever the agent can do, a manipulated agent can do

The OWASP GenAI Security Project lists Excessive Agency in its 2025 Top 10 for LLM applications. The useful part of its framing is that the cause of the failure doesn't matter. The model may hallucinate, misread a vague prompt, or follow instructions injected through content it processes. In every case, the damage is bounded by what the system was allowed to do. OWASP traces the problem to three roots: too much functionality, too many permissions, and too much autonomy.

That changes the design question. You can't guarantee a model will read every input correctly. You can decide how much harm a wrong reading is able to cause. This is least privilege applied to AI, and it lives in your architecture, not in the agent's personality.

Sort every tool into one of four scopes

Before connecting anything, we recommend classifying every tool the agent can call. The four tiers below are our own working framework, not an official standard:

  • Read: queries records the requesting user is already entitled to see. Limit by field as well as by object. A follow-up assistant needs deal stage and last-contact date. It rarely needs home addresses or payment terms.
  • Draft: creates content in a holding state, such as an unsent email, a note flagged as a draft, or a proposed field change in a queue. Nothing leaves the system.
  • Limited write: changes real data inside hard bounds: named fields, an allowed set of values, records the user owns, and a capped number of changes per hour.
  • Approval-bound: covers anything that leaves your system or can't be cleanly undone, including sending email, deleting records, bulk updates, and anything that moves money. These run only against a specific approved payload.

Notice what the list leaves out: a generic "CRM API" tool. OWASP specifically discourages open-ended tools, such as arbitrary shell commands or fetching any URL, in favor of narrow functions that each do one job. An agent that can call any endpoint holds every tier at once. In our AI consulting work, this tool inventory is one of the first artifacts worth producing. It turns a vague worry ("is the agent too powerful?") into a list you can actually argue about.

Prompts ask. Servers decide.

A system prompt that says "never update deals owned by other reps" is an instruction to a model that can be confused or overridden. OWASP's recommendation is complete mediation: the downstream system enforces authorization, and the LLM never decides whether an action is allowed. The OWASP Authorization Cheat Sheet describes how to do that. Deny by default. Check permissions on every request. Check access to the specific object, because permission to one deal record is not permission to all of them. Run these checks on the server, never in logic the caller controls.

For an agent, the untrusted caller includes the model itself. In practice, the tool endpoint answers four questions on every call. Is this user allowed to touch this record? Is this field on the agent's allowlist? Is the new value one of the permitted options? Has the cap been reached? If any answer is no, the call fails safely and the denial is logged, whatever the model intended.

Read access is where leaks start

Teams often treat read scopes as harmless. They stop being harmless once the agent also has an outbound channel. OWASP's own example involves an email-summarizing assistant whose plugin could also send mail. A crafted incoming message tricks it into collecting sensitive data and forwarding it to an attacker. The suggested fixes are a read-only tool, a read-only OAuth scope, and a human pressing send.

Here is the pattern we suggest checking for in every workflow: untrusted input, plus access to sensitive data, plus any outbound path. Outbound paths can be easy to miss. Email and webhooks are obvious. Less obvious are a URL-fetching tool or a CRM field that syncs to a customer portal. Remove at least one of the three conditions, and keep read scopes field-limited so a successful injection exposes less.

Separate credentials, short lifetimes

  • Act in the user's context. When an agent works for a specific person, it should use that person's delegated, minimally scoped token, not a shared admin key that can see every account.
  • Give background agents their own identity. Use a dedicated service account with its own scopes, never a borrowed human login. Your logs then show which actor did what, and you can revoke the agent without locking out the employee.
  • Keep tokens short-lived and keep secrets out of the model's context entirely. The tool layer holds the credentials, and the model holds none.
  • Watch for privilege creep. The cheat sheet recommends regularly comparing current permissions against the original design. Agent integrations pick up extra scopes over time, just as people do.

Approve the payload, not the idea

Approval fails quietly when a reviewer approves a summary and the system then executes something different. Bind each approval to an exact, unchangeable payload containing:

  • the tool and action name;
  • the target record IDs, with before and after values for every field that changes;
  • for messages, the full recipient list and the final body, including attachments;
  • the requesting user and the agent identity that proposed the action;
  • an expiry time and a hash of everything above.

The server executes the action only if the hash still matches. If the agent edits the email after approval, the approval is void. Each proposed action also gets an idempotency key that the receiving service enforces with a durable record of completed actions, so a retry does not execute an already completed action again. A key alone provides no protection if the service ignores it. Approval tokens are single-use, so a captured approval can't be replayed next week.

Hypothetical: scoping a CRM follow-up agent

This is an invented scenario that illustrates the mechanics. It does not describe a client or a real deployment. A 15-person property management company in Broward wants an agent that reviews stale deals each morning and drafts follow-ups for its leasing reps. Here is how its tools could be scoped:

  • search_my_deals (read): returns only the requesting rep's deals, with stage, last-contact date, and the contact's first name. No phone numbers and no export.
  • create_draft_followup (draft): saves an unsent email in that rep's drafts.
  • set_deal_stage (limited write): moves deals only between "Contacted" and "Follow-up due," only on that rep's deals, with a maximum of 25 changes per day.
  • send_followup (approval-bound): sends one approved draft to the single recipient shown at approval, verified by hash.

There is no delete tool, no bulk tool, and no URL fetcher. Now suppose a prospect's reply contains hidden text telling the agent to email the full contact list to an outside address. The agent can't list other reps' contacts. It can't attach an export. It can't send anything the rep didn't approve word for word. In this deliberately constrained example, those controls block the attempted contact export. They do not prove that every possible injection or data leak has been eliminated.

Logs, kill switches, and budgets

OWASP is direct on this point: logging and rate limiting don't prevent excessive agency. They limit the damage and buy time to notice it. Plan them as a set:

  • Log every tool call, including denials. Record the identity, user, tool, policy decision and outcome, with sensitive arguments redacted. The cheat sheet stresses consistent formats, synchronized clocks, and keeping sensitive data out of logs.
  • Make revocation a single action. Disabling the agent's credential should stop all of its tools at once, and someone on the team should know how to do it at 2 a.m.
  • Cap rates and budgets per tool and per day, covering writes, messages sent, records touched, and model or API spend. Set alerts to fire well before a cap is reached.
  • Test the denials. Write tests proving the agent can't reach another user's records or call tools outside its tier. This is the same unit and integration testing the cheat sheet recommends for any authorization logic.

So should it have write access?

Sometimes. Write access can be fine when it is narrow, enforced on the server, tied to exact approvals where needed, logged, rate-limited, and revocable in one step. A blanket grant accepted on a consent screen doesn't meet that bar, however good the system prompt is.

If you're connecting an agent to a CRM, help desk, or finance system here in South Florida, bring the actual tool list and the permission screen to the conversation. That's where the useful discussion starts, and it's the kind of workflow and systems integration work we like digging into with operators. For broader context on how we think about building these systems, see our software overview and the material in Learn.

Frequently Asked Questions

What does least privilege mean for an AI agent?

It means the agent gets only the tools, fields, records, and actions its task requires. The limits are enforced by the systems it calls, not by instructions in its prompt. Our recommendation is to sort each tool into read, draft, limited-write, or approval-bound before granting access.

Isn't a strict system prompt enough to keep an agent in line?

No. Prompts shape behavior, but injected content or a plain misunderstanding can override them. OWASP recommends that downstream systems make the authorization decision on every request, so a confused model gets denied instead of obeyed.

How does prompt injection turn read access into a data leak?

If an agent processes untrusted content, can read sensitive data, and has any outbound channel, injected instructions can chain those together. Removing the outbound path, narrowing the readable fields, or requiring exact human approval for sends breaks the chain.

What should a human approval actually contain?

It should contain the exact action, target records, before-and-after field values, recipients, and message body, plus an expiry and a hash. The server should run only that payload, once, and treat any later change as a new request.

Illustrations

Illustrative AI-generated image: a team reviewing an AI integration plan together around a conference table.
Illustrative AI-generated image. Deciding what an agent can touch is a design choice a team should make together, not a default accepted on a consent screen.
Illustrative AI-generated image: a person reviewing code and system activity on a monitor in an office.
Illustrative AI-generated image. Tool-call logs only help if someone knows where to find them and what a denied request looks like.
← Back to Automation & Operations
Chat with us