Product

8 min read

Where the human goes in a human-in-the-loop system

A person at the end of every run is slow. A person nowhere is reckless. How we decide where the ask belongs.

HS

Hana Sato

Head of Product

Every team that puts an agent on a real queue has the same argument in the first week. Finance wants a person to approve everything. The person who would be doing the approving wants to approve nothing. Both positions are reasonable, and both fail in production in ways that are easy to predict.

This post is how we settle that argument with customers: where the ask belongs, how to write it down, and how to move it once you have data. The method is the same whether the agent is matching invoices, granting access or reviewing refunds.

Two ways to get it wrong

A person at the end of every run looks safe. In practice it turns the approver into a rubber stamp. One customer started this way: on day one their AP lead approved 212 invoices and rejected none. By day three she was approving them in batches of twenty without opening the evidence. The agent hadn’t got worse. The approvals had stopped meaning anything.

A person nowhere fails more quietly. The agent handles the easy 90% perfectly, and the other 10% (the new vendor, the invoice in euros, the duplicate with a different reference) goes straight into the ledger. You find out at month end, from the bank reconciliation.

So the useful question isn’t “should a person approve this agent’s work?” It’s “which runs, specifically, need a person, and why those?”

Three questions that place the ask

We ask the same three things about every action an agent can take. The answers put each action in one of three places: act, act and log for review, or ask first.

1. Can it be undone?

Telling a vendor their invoice arrived can’t do much harm. Posting a bill to NetSuite can be reversed with a credit note, which is annoying but routine. Scheduling a payment can’t be reversed without a phone call and an apology. Irreversible actions default to asking. Reversible ones usually don’t need to.

2. What does a mistake cost?

Usually this is an amount, but not always. For access requests it’s how sensitive the system is: read access to the wiki is cheap, admin rights in Okta are not. Either way, write it down as a number or a list. “High-value” isn’t a rule. “Over $5,000” is.

3. How sure is the agent?

Every decision in Loop carries a confidence score between 0 and 1, built from the individual checks: does the PO number match, does the total reconcile to the goods receipt, is the bank account the one on file. A low score is the agent telling you it’s guessing. Asking there is cheap, because those are the runs a person would want to see anyway.

Put together, the answers for an invoice-matching agent look like this:

Action

Undo

Default

Acknowledge receipt to the vendor

Not needed

Act

Post a bill under $5,000, confidence 0.90 or higher

Credit note

Act and log

Post a bill over $5,000

Credit note

Ask

Post a bill from a new vendor

Credit note

Ask

Schedule a payment

None

Always ask

Write it down as a rule

Once you’ve answered the three questions, the answers go into the agent’s rules. Rules in Loop are plain conditions with thresholds. They live in the agent file and are versioned like any other code:

ask:
channel: slack:#ap-approvals
when:
- amount > 5000
- confidence < 0.90
- vendor.is_new
- action == payment.schedule
timeout: 4h
on_timeout: escalate:finance-leads

Two details matter more than they look. First, each condition is its own line, so the approval can say which one fired: “asked because the amount is over $5,000”, not “needs review”. Second, on_timeout is explicit. An ask nobody answers is the worst outcome of all, because the item is stuck and nobody knows. Decide in advance who hears about it after four hours.

Put the evidence in the ask

What the ask contains matters more than where it lands. “Approve invoice INV-20931?” makes the approver open three tabs to find out whether they should. An ask that carries its evidence can be answered in about fifteen seconds. Ours always include:

  • The rule that fired, in words.

  • The facts the agent used: amount, matched PO and receipt, and the difference with its source.

  • The confidence score, and which check pulled it down.

  • Exactly what happens on Approve, down to the system and the record.

For the Harlow Packaging invoice in our console demo, that’s a $7,420.00 bill matched to PO-4471, with a $180.00 freight line the PO didn’t include. The approver can see the freight line is the whole difference, and approve from Slack without leaving the thread.

If one person approves two hundred things a day, they’re approving none of them. Asha Mehta, CEO, after nine years running an operations floor

Then move the line, using the log

Your first set of rules will be wrong. That’s fine, because the audit log tells you how. Every ask records who answered, how long they took and what they chose. For the first month, look at two numbers per rule once a week:

  • Approval rate. If a rule’s asks are approved unchanged more than 98% of the time, it’s catching nothing. Raise the threshold or delete the rule.

  • Corrections. If people reject or edit more than 10% of what a rule sends them, the rule is earning its keep. If they’re correcting runs that never asked, you’re missing a rule.

You don’t need live items to test a change. Add --dry-run to a run with the new rules, point it at the last 1,000 items, and the report shows which of them would have asked, and why. Most teams we work with settle at asking on 8–12% of runs after a month. Across every agent on Loop, 91% of runs finish without a person, and the median time to resolve is six minutes, including the wait for an approver. It used to be 2.3 days.

A short checklist

  1. List every action the agent can take, and whether it can be undone.

  2. Put a number on what a mistake costs for each one.

  3. Pick a confidence floor. 0.90 is a sensible place to start.

  4. Write each condition on its own line, so the ask can say why it fired.

  5. Set a timeout and an owner for asks nobody answers.

  6. Review approval rates weekly for a month, then monthly.

A person belongs where their judgement changes the outcome. Everywhere else, a good log does the job better than a tired approver. If you want to try this on your own queue, the quickstart walks through a first agent and its rules in about twenty minutes.

>

Try it on your queue

See exactly where your agent would ask.

Bring last month’s items to a demo. We’ll write the rules with you and dry-run them on the call, so you see every ask before anything goes live.

Starter is free · no card · 1,000 runs a month

Create a free website with Framer, the website builder loved by startups, designers and agencies.