Agent Workflow Proof

AI agent permissions and human review: what to grant, what to deny, where to stop

The question to ask about an agent workflow isn't whether the model can do the job. It's what happens on the day it gets one wrong. This guide sets out seven rules and shows each one in the five workflows in the operations library, using their real configs and, where it helps, the numbers from their runs.

1

List every system the workflow touches, and grant each one a level

Write down each system or dataset the job involves, including the ones it should never touch, and give each a level: none, read, read (masked), draft only or write after approval. The "none" rows matter as much as the others: they record a decision, so nobody quietly adds the access later.

Across the five workflows, nothing gets plain write access. This is the whole table:

WorkflowSystem or dataLevel
Invoice triageInvoice PDFsread
Vendor master, PO register, AP ledgerread
Vendor master (edit bank details)none
Payment runwrite after approval
Email to vendorsdraft only
Phone numbers or links printed on the invoicenone
Support ticket triageTicket textread (masked)
CRM account recordread
Billing system (refunds, credits)none
Helpdesk fields (category, priority, team)write after approval
Sending email to customersdraft only
Vendor contract clause checkContract under reviewread
Contract management system (status, signatures)none
Email to the vendornone
Negotiation task listwrite after approval
Expense report reviewExpense reports and receipt textread
Report status (approve, return)write after approval
Payroll or reimbursement paymentsnone
Employee HR recordnone
Meeting notes to action itemsTranscripts the organizer selectsread
Task trackerwrite after approval
Email or chat to attendeesnone
Calendarsnone

Levels used: none (9), read (6), read (masked) (1), draft only (2), write after approval (5).

2

Remove what the model doesn't need before it sees anything

In the ticket workflow a customer pasted a card number and CVV into a ticket. The first step is plain code that masks them, so the text sent to the model never contains them, and a later check blocks any draft that repeats one. This is what the model received:

Our old card expired. The new one is [card number removed], exp 09/29, CVV [removed]. Please put it on file. Thanks, Dev

Masking costs nothing and leaves nothing for a model, a log or a vendor to leak.

3

Keep policy and arithmetic in code; let the model read

Models read messy documents well. Whether a total exceeds a PO balance, or a tip is over 20%, is a calculation, and a calculation belongs in code that gives the same answer every time. In the invoice workflow the model recommends a route and code applies the written AP policy. In the expense workflow the model reads receipts and code owns every arithmetic rule.

  • Invoices, Qwen3.8 Flash: its own route matched the key for 21 of 21; the route after the coded policy matched for 21 of 21.
  • Invoices, DeepSeek V4 Flash: its own route matched the key for 15 of 21; the route after the coded policy matched for 21 of 21.
  • Expense lines, Qwen3.8 Flash: its own flags were exactly right on 57 of 57 lines; with code applying the arithmetic rules, 57 of 57.
  • Expense lines, DeepSeek V4 Flash: its own flags were exactly right on 31 of 57 lines; with code applying the arithmetic rules, 55 of 57.
4

Let the model escalate, never de-escalate

When the model and the coded rules disagree, keep the stricter answer. In the invoice workflow a guardrail compares the model's route with the policy's and keeps whichever holds the invoice longer; the model can add caution but can't talk an invoice past a check. The ticket workflow forces security, privacy, billing, cancellation and outage tickets to their teams whatever the model says, and holds back any draft that promises a refund or asks for a password.

  • Qwen3.8 Flash: the invoice guardrail replaced a looser route from the model on 0 of 21 routed invoices.
  • DeepSeek V4 Flash: the invoice guardrail replaced a looser route from the model on 6 of 21 routed invoices.
  • Qwen3.8 Flash: tickets re-routed by the guardrail, 0 of 30; drafts held back, 1 of 30.
  • DeepSeek V4 Flash: tickets re-routed by the guardrail, 0 of 30; drafts held back, 0 of 30.

Guardrails make mistakes too. The one draft held back in these runs was safe: it said “please don’t send full card numbers” with a curly apostrophe, and the screen didn't read that as a negation. A false positive costs a reviewer a minute; a false negative could cost a card number. Log what the screens block and read it, the same way you read the model's failures.

5

Make every claim point to its source, and check it

Ask the model to quote the sentence behind each finding, then check in code that the quote really is in the document. A clause marked "meets the playbook" whose quote can't be found becomes "unverified" and goes to a person. The meeting workflow does the same with the transcript line behind each action item, and checks every owner against the attendee list.

  • Contracts, Qwen3.8 Flash: 63 of 63 clause quotes found word for word.
  • Contracts, DeepSeek V4 Flash: 63 of 63 clause quotes found word for word.
  • Meetings, Qwen3.8 Flash: 0 of 39 proposed items had a quote that wasn't in the transcript; 0 named an owner who wasn't in the meeting.
  • Meetings, DeepSeek V4 Flash: 0 of 39 proposed items had a quote that wasn't in the transcript; 0 named an owner who wasn't in the meeting.
6

Take contact and payment details only from master data

One sample invoice asks for payment to a new bank account and gives a new phone number "for questions". That is the classic payment-fraud pattern, and a reader in a hurry, human or model, may simply pass it along. The workflow's access table gives it no way to change bank details, the policy says to verify only through the phone number in the vendor master, and the coded check compares the routing and account numbers read from the invoice with the master. As long as the numbers are read correctly, the invoice is held whatever the model recommends; the extraction step is scored separately for exactly this reason.

Try it in the invoice demo: open the Kestrel invoice and look at what the model wrote next to what the check found.

7

Stop before the first action, and show the reviewer the evidence

Every workflow here ends at a checkpoint. Automated runs stop there and save the approval packet; nothing after it runs without a person. What the reviewer sees decides whether the review means anything, so each checkpoint lists it:

Invoice triage

AP lead (controller for invoices over $10,000)

Sees: The invoice PDF; Extracted fields; Every flag from the coded checks; The model's note; Whether the guardrail overrode the model.

After approval: The follow-up for that route is recorded: a payment-run proposal, a vendor email draft or a task. Nothing is paid.

Support ticket triage

Support agent on the ticket's team

Sees: The original ticket; Category, priority and team; Whether the guardrail changed the team; The draft, or why it was blocked.

After approval: Ticket fields are set and the edited draft is sent by the agent.

Vendor contract clause check

Counsel or a contract manager

Sees: Each clause's quote, highlighted in the contract; The status and the playbook rule behind it; Clauses whose quote couldn't be found, marked unverified.

After approval: A negotiation task is created with the clauses to change.

Expense report review

The employee's manager

Sees: Each line with its receipt; Flags, and whether code or the model raised each one; The policy rule behind each flag.

After approval: The report is approved with the flagged lines removed or explained.

Meeting notes to action items

The meeting organizer

Sees: Each item with its owner, due date and source line; Owners who aren't attendees, left unassigned; Quotes that couldn't be found.

After approval: Tasks are created in the tracker.

Before you widen access: a checklist

  1. Every system in the workflow has a level, and the "none" rows are written down.
  2. Sensitive fields are masked before the model call, and a check stops them coming back out.
  3. Rules you can write as code are code; the model's answer can only make the outcome stricter.
  4. Every finding carries a quote or a source, and code checks that it exists.
  5. Contact and payment details come from master data only.
  6. The run stops before the first action, and the reviewer sees the evidence and any guardrail change.
  7. You have run the workflow on a sample set with an answer key, kept the logs, and read the failures, not just the pass rate.

The runbook pack has this checklist and the five configs, ready to adapt.

Questions

What is least privilege for an AI agent?
Giving the workflow only the access its steps need, at the lowest level that works: read instead of write, masked instead of raw, a draft instead of a send. Everything else is listed as "none" on purpose, so nobody adds it later without a decision.
Where should the human approval step go?
Right before the first action that leaves the workflow: a payment proposal, an email, a status change, a task assigned to someone. The run stops there, and the reviewer sees the evidence, the flags and anything the guardrails changed, not just the model's answer.
Can the model be trusted to apply a written policy?
Use it to read documents and explain, and put the rules that can be written as code in code. The results in this guide show the gap: the model's own routing and flags are compared with the final answer after the coded checks.
Do I still need a person if every test passes?
Yes. The tests cover the traps in the sample set; your documents will have others. Keep the checkpoint and look at what reviewers reject before you consider loosening it.