Invoice, enquiry and report automations that check their own work and ask before acting
Three of my own automations that read invoices, sort new enquiries and write client reports, with fixed rules between the AI and anything that cannot be undone.
My own project. Working and tested, not a client job.
What the AI is allowed to do, and what it is not
- Step 1 Budget set aside Before the AI is asked anything
- Step 2 The AI does the reading Drafts, pulls out details, summarises
- Step 3 Fixed checks Rules and sums the AI cannot change
- Passes Sent, paid, filed or replied Fails Stops, and says why
Running underneath all of it
- A record nobody can changeEvery decision, every input and every cost is kept.
- Private details removedSensitive details are blanked out before anything is saved.
- A hard spending capIt cannot run up a bill, because it stops when the budget is used.
- 3
- Everyday jobs handled
- Reading invoices, sorting new enquiries and writing client reports, all sharing the same safety controls.
Reading an invoice is the easy part
Plenty of tools can read an invoice. The real question is what happens on the day one is read wrong, at two in the morning, with nobody watching.
The invoice reader checks the maths itself, and the AI cannot overrule it: if the lines do not add up to the total, it stops instead of guessing. The enquiry sorter uses AI to score new leads, but fixed rules decide where they go, and every drafted reply waits for a person. The report writer will not send a report containing a number it cannot trace back to the real figures.
Four safeguards that make it safe to leave running
Money for each AI request is set aside before the request is made, so a fault cannot quietly run up a bill. Everything it does goes into a record that cannot be changed. Private details are blanked out before anything is saved. And between the AI and anything that cannot be undone, there is a set of fixed rules the AI cannot touch.
None of that is exotic. It is the difference between a demo and something you can leave switched on.
Technical notes
Budget is reserved before each provider call rather than counted afterwards. The audit trail is append only, and redaction happens on the way to disk, not on the way to a screen. Built in Node.js and TypeScript on the Anthropic API.
What this involved
Technical notes: what it is built with
Node.js, TypeScript, Anthropic API.