Four invoices where the account number doesn't match the purchase order. In this fictional example, the agent doesn't pay them – it stops and asks for a human decision. In this video, you'll build the same trigger–check–stop–approve workflow, where the agent does the work and you keep the decision-making power.
Briefly, the difference: a typical chat response offers a suggestion and waits. An agent aims for the goal – it has a goal, tools, boundaries, and a defined ready state. In this case, the goal is not 'pay the invoices' but 'prepare invoices for decision and stop if uncertain'. All figures you hear are illustrative examples, not customer results.
Goal, input, and boundaries are recorded
Let's take a fictional company, Example Ltd: about 40 purchase invoices per week. The input is three things: incoming invoices as email attachments – PDF, scanned image, sometimes a photo taken with a phone – purchase orders in a spreadsheet, and the supplier registry. The agent can read these, but it cannot pay, change the supplier registry, or see bank credentials. The ready state is strict: each invoice has either a matching proposal with sources or a stop mark with a reason. Nothing in between.
Task brief: goal, boundaries, ready state
Here's the copyable task brief. Goal: pre-process purchase invoices for human approval. Input: invoice files, purchase orders, supplier registry. Tools: file reading, table lookup, calculation. Boundaries: do not pay, do not change source data, do not guess missing fields. Stop if the amount exceeds 5,000 euros, IBAN differs from the registry, purchase order is missing, invoice appears duplicate, or scan is unclear. Output: line per invoice, source reference for each claim, and stop reason. Ready when each invoice is either a proposal or a stop.
Read, extract, match – always with source reference
What does the agent do then? It reads all files in one batch – including scanned and photographed invoices – and extracts the invoice number, amount, due date, VAT, order reference, and IBAN. It looks up the purchase order in the table and compares the amount and delivered quantity. It checks the supplier in the registry and calculates if everything matches. The most important part: next to each claim is a source – file, page, cell. Without a source, the inspector cannot approve anything.
Stopping is a feature, not an error
Then the stop. In this workflow, stopping is not an error but a feature. The agent stops the invoice if any of the five rules trigger: amount over 5,000 euros, IBAN doesn't match the registry, purchase order is missing, the same invoice number has already been processed, or the scan is so unclear that the amount can't be verified. In our example data, four invoices stop: one has a changed IBAN, one is missing a purchase order, one is a duplicate, and one scan is unreadable. The agent doesn't fix these – it marks them for the human.
Approval and log belong to the human
The human's role is intentionally small. The approver sees one view: invoice, proposal, three lines of justification, and a link to the original file. They approve, reject, or request more information – and each choice is logged: who, when, on what basis. The agent has no approval rights. That's the core of the model: the agent does the work, the human makes the decision. The same logic works for any approval, not just invoices.
Inspector agent evaluates and stops
What if the agent makes a mistake? That's why there's a separate inspector agent with a different task and different rights – it writes nothing, it only evaluates. Its criteria are agreed upon in advance: does each line have a source, have the stop rules been run, is the access right sufficient, and does the ready state fulfill? A typical error: the agent marks an invoice as matched but refers to an old version of the purchase order. The inspector notices the outdated source and returns the line to 'awaiting human approval' status. If the evidence is insufficient, the inspector doesn't guess – it stops the entire batch.
Three takeaways. One: the agent's goal is to prepare for a decision, not to decide. Two: stop rules must be written in advance, otherwise, it's arbitrary. Three: a separate inspector that fails in a closed manner costs less than one wrong payment.
Exercise
Create a table with three fictional purchase invoices and their corresponding purchase order list: one invoice is a duplicate, one has an IBAN that differs from the supplier registry, and one lacks a purchase order. Use only fictional names, amounts, and account numbers. Run the task brief from the video on the agent and check the approval checklist to see if all three stop and if each line has a source reference to a file and cell.
Checklist
- Each invoice line has either a matching proposal or a stop mark, and each claim has a source reference (file, page, or cell).
- All five stop rules are written out before execution, and each triggered rule appears in the stop report with a reason.
- The agent has no payment or approval rights, and the input contains no passwords or unnecessary personal data.
- The inspector agent is separate, has read-only access, and returns unclear lines to 'awaiting human approval' status without guessing missing information.
- Approval is logged: who decided, when, and on what basis.
— Aino Pilvi, AI Specialist, Cloud Computing Oy
Questions? aino@cloudcomputing.fi | WhatsApp: +358 33 119 3196
