AI agent access policy examples: 24 allow, ask and deny rules

Reviewed

In short: These 24 example rules show how to write allow, ask and deny policy for AI agents. They cover CRM, code repositories, cloud consoles, finance, HR and email, four rules each. Every rule is a plain sentence plus a pseudo-policy line. Rules marked ask need human approval, with the reason given.

How to read these rules

Each rule names an outcome. Allow lets the call proceed. Deny refuses it. Ask pauses it until a named person approves. Of the 24 rules, 8 are ask rules.

The pseudo-policy lines are not tied to any product. Translate them into your gateway's own policy language. Unanswered ask requests should default to deny.

CRM

  1. Allow

    A sales agent may read accounts and contacts owned by its owner's team.

    allow crm.read(record) if record.team == agent.owner.team

    Why: Routine reads within the owner's own scope.

  2. Allow

    A sales agent may update notes and next steps on open opportunities.

    allow crm.update(opportunity, fields in [notes, next_step]) if opportunity.status == open

    Why: Low-impact edits that people review in normal work.

  3. Ask: needs human approval

    Any agent must get approval before changing an opportunity's amount or stage to closed.

    ask crm.update(opportunity, fields in [amount, stage=closed]) approver agent.owner

    Why a person approves: Forecasts and commissions depend on these fields, so a person confirms the change.

  4. Deny

    No agent may export the full contact database.

    deny crm.export(scope=all)

    Why: Bulk export is the main data theft path and has no routine agent use.

Code repositories

  1. Allow

    A coding agent may read code and open pull requests in repositories its owner can write to.

    allow repo.read, repo.pull_request.create if agent.owner in repo.writers

    Why: Pull requests are reviewed by people before merge.

  2. Ask: needs human approval

    A coding agent must get approval before merging to a protected branch.

    ask repo.merge(branch) if branch.protected approver repo.code_owner

    Why a person approves: Merging ships code, so a code owner confirms.

  3. Deny

    No agent may change branch protection or repository permissions.

    deny repo.settings.update(fields in [branch_protection, collaborators])

    Why: These settings control who can change code, so agents never alter them.

  4. Deny

    No agent may read or create repository secrets.

    deny repo.secrets.*

    Why: Secrets give access beyond the repository.

Cloud consoles

  1. Allow

    An operations agent may read metrics, logs and resource status.

    allow cloud.read(type in [metrics, logs, status])

    Why: Read-only diagnostics carry little risk.

  2. Ask: needs human approval

    An operations agent must get approval before restarting or scaling a production service.

    ask cloud.service.restart, cloud.service.scale if env == production approver oncall

    Why a person approves: Production changes can cause outages, so the on-call engineer confirms.

  3. Deny

    No agent may create, change or delete identity roles or access policies.

    deny cloud.iam.*(action in [create, update, delete])

    Why: Changing access is how an agent could grant itself more power.

  4. Deny

    No agent may delete storage buckets or databases in production.

    deny cloud.delete(type in [bucket, database]) if env == production

    Why: Deletion is irreversible and has no routine agent use.

Finance

  1. Allow

    A finance agent may read invoices and match them to purchase orders.

    allow finance.invoice.read, finance.invoice.match

    Why: Matching prepares work that people approve later.

  2. Ask: needs human approval

    A finance agent must get approval before scheduling any payment.

    ask finance.payment.schedule approver agent.owner, finance.controller

    Why a person approves: Payments move money and need a named human decision for audit.

  3. Ask: needs human approval

    Any agent must get approval before adding a supplier.

    ask finance.supplier.create approver finance.controller

    Why a person approves: New suppliers are a common fraud route, so a controller checks them.

  4. Deny

    No agent may change a supplier's bank details.

    deny finance.supplier.update(fields contains bank_details)

    Why: Bank detail changes are a known fraud pattern and stay with people.

HR

  1. Allow

    An HR agent may read job descriptions and the public org chart.

    allow hr.read(type in [job_description, org_chart_public])

    Why: This information is not sensitive.

  2. Ask: needs human approval

    An HR agent acting for a manager must get approval before reading an employee's personal record.

    ask hr.employee.read(fields personal) if agent.on_behalf_of.manager_of(employee) approver agent.on_behalf_of

    Why a person approves: Personal data access needs the manager's live confirmation and a record.

  3. Deny

    No agent may change salary, bank or tax details.

    deny hr.employee.update(fields in [salary, bank_details, tax])

    Why: These changes stay with HR staff under their own controls.

  4. Deny

    No agent may export employee records in bulk.

    deny hr.employee.export

    Why: Bulk employee data has no routine agent use.

Email

  1. Allow

    An assistant may read and draft replies in its owner's mailbox.

    allow mail.read, mail.draft if mailbox == agent.on_behalf_of

    Why: Drafts are reviewed before sending.

  2. Ask: needs human approval

    An assistant must get approval before sending email outside the company.

    ask mail.send if any(recipient.domain != company.domain) approver agent.on_behalf_of

    Why a person approves: External email can leak data, so the sender confirms.

  3. Ask: needs human approval

    Any agent must get approval before forwarding attachments marked confidential.

    ask mail.forward if attachment.label == confidential approver agent.owner

    Why a person approves: Confidential files need a human check before they move.

  4. Deny

    No agent may create mailbox forwarding rules.

    deny mail.rules.create(type = forward)

    Why: Forwarding rules are a common way to exfiltrate mail silently.