all posts

I re-engineered expense report auditing using an autonomous agent workflow. Here is the exact architecture and the API costs.

Auditing 3,000 employee expense reports a month with four Claude agents costs about $90 a month in API fees, modelled to save around 1,130 hours of shared-service time.

Expense audit is the job nobody in finance asks for. A consultant comes back from a week in Munich with eleven receipts: two hotel folios, a train ticket, four taxi slips, three restaurant bills and a crumpled kiosk receipt in Polish. Someone in the shared service centre has to read every one, check it against the travel policy, decide whether the VAT on it can be recovered, and chase the receipt that isn't there. Then do it again 3,000 times a month.

The firm here is a professional services company with about 3,500 employees across Germany, Poland and the Netherlands. Its finance shared service centre in Kraków audits every expense report after the line manager has approved it, because the firm reclaims input VAT on travel and needs a valid invoice behind each amount it reclaims. That is about 3,000 reports a month, with an average of six lines and five receipts each. Reimbursement waits for the audit, and at month end the queue runs to eight working days.

The redesign doesn't replace the line manager's approval or change the policy. It audits every report overnight, approves the clean ones, and puts the rest in front of an auditor with the evidence already laid out. The line manager's step sits upstream and is left out of both sides of the sums below.

The firm here is a composite: the volumes are typical for a mid-sized European professional services firm, and every cost below is computed from Claude API list prices on 10 November 2026.

the process today

Expense report audit before and after: seven manual steps by an expense auditor on the left; on the right, intake, rules and posting in code, four Claude agents, and the auditor deciding every flagged report

step who minutes
Open the report and match each expense line to its receipt image Expense auditor 4
Read every receipt and check amount, date, currency and merchant against the claim Expense auditor 6
Check the travel policy: per-diem tables, hotel caps, class of travel, alcohol Expense auditor 5
Look for duplicates and personal spend in the employee's earlier claims Expense auditor 3
Check each receipt is a valid VAT invoice and code the recoverable VAT Expense auditor 4
Email the employee about missing receipts or unexplained items Expense auditor 3
Approve or reject in the expense system and release it to the ERP Expense auditor 2
Total per report (blended) 27

These are blended averages. A single taxi claim takes three minutes; a month of client-site travel with forty receipts takes an hour. At 3,000 reports that is 1,350 hours a month, or about eight auditors.

The time goes into reading receipts. They arrive as phone photos at an angle, thermal paper that has faded, hotel folios in three languages, and taxi slips with the amount written in by hand. The errors come from the same place and from fatigue: a €48.00 bill keyed as €84.00, a receipt in złoty claimed as euros, a dinner claimed by two colleagues who each kept a copy of the bill. The quieter loss is VAT. An auditor working fast codes a receipt as non-recoverable rather than check whether it qualifies as a simplified invoice, and the firm leaves recoverable VAT on the table.

the agent architecture

The pattern is a pipeline with one conditional branch. Every report goes through intake, receipt reading, rules and policy review. Only reports that the rules or the policy reviewer flag go on to the anomaly investigator. I chose a pipeline over an orchestrator because the order never changes, and the firm's auditors, and its tax auditors, need to see exactly what each step did to each line.

Intake, receipt matching, currency conversion, per-diem calculation, hard policy caps, duplicate detection and posting are ordinary code. The models read receipts and judge the parts of the policy that need judgement; they never approve a payment over the auto-approval limit and never post to the ERP.

report intake (deterministic)

A nightly job pulls every report the line manager approved that day from the expense system's API, with its receipt images. Each image goes through a cloud OCR service, and both the image and the OCR text go to the receipt reader. Reports submitted by 18:00 are audited by the next morning.

receipt reader agent

  • Job: turn each receipt into a structured record: merchant, country, date, total, currency, VAT rate and amount per rate, the merchant's VAT ID, line items, and whether it meets the requirements of a full or simplified VAT invoice in its country.
  • Model: Haiku 5.5 first. Most receipts are short and printed, and this runs on about 15,000 receipts a month, so the cheapest tier fits. When Haiku's confidence on the total, the date or the VAT amount is below 0.9, the receipt is re-read by Sonnet 5.5. That is about 15% of receipts: handwritten amounts, faded thermal paper, foreign scripts, multi-page hotel folios.
  • Inputs and outputs: the image, the OCR text and a cached schema with each country's invoice requirements; returns the record with a confidence per field. No tools.
  • Guardrails: code checks that the VAT and net amounts add up to the total and that the VAT rate is a valid rate for the country and date. If Sonnet is also unsure, the receipt goes to an auditor with the fields it couldn't read.

rules and matching (deterministic)

Code matches each receipt to its expense line by amount, date and merchant. It converts foreign currency at the policy's reference rate for the transaction date, and compares that with the amount claimed. It calculates per diems from the statutory tables for each country, reduced where the hotel bill shows breakfast was included. It applies the hard caps: hotel rate per city, class of travel by journey length, no alcohol on solo meals. It hashes every receipt image and every merchant, date and amount triple, across every employee and the last 24 months, to find duplicates.

A failed hard rule doesn't reject anything. It flags the line, with the rule and the numbers, for the auditor.

policy reviewer agent

  • Job: judge the parts of the policy that code can't: whether the business purpose is plausible for the spend, whether a client dinner lists its attendees and the per-head cost is within the limit, whether a hotel above the cap has an approved exception, whether one bill was split across two lines to stay under a limit.
  • Model: Sonnet 5.5, one call per report. This is reading and judgement over a short document set, and it runs on every report, so Opus would cost five times as much for little gain.
  • Inputs: the report, the receipt records, the rules results, the employee's grade and the travel approval if there is one, and a cached copy of the travel and expense policy with its approvals matrix.
  • Outputs: a verdict per line (clean, query or flag), the policy clause it relied on, and what to ask the employee.
  • Guardrails: the reviewer can't clear a line that failed a hard rule. A report is auto-approved only when every line is clean, every receipt was read with high confidence, there are no duplicates and the total is under €500.

anomaly investigator agent

  • Job: on a flagged report, look at the employee's last 90 days of claims and write a short case note: is this a one-off mistake or a pattern? Weekend meals near home, the same restaurant every Friday, round-number taxi fares, mileage that doesn't match the trips on the travel booking.
  • Model: Opus 5.5. This is the judgement step, and the one where a wrong answer hurts most: a false accusation damages trust with a colleague, a missed pattern costs money every month. It runs only on the 12% of reports that are flagged.
  • Inputs and outputs: the flagged report, 90 days of the employee's claims with their receipt records, travel bookings, and a cached guide to the patterns the internal audit team cares about; returns a case note with every claim it cites, and a suggested action.
  • Guardrails: it writes notes, not decisions. It must cite the specific claims behind every statement, and the note is visible only to the auditor and, if escalated, internal audit.

query drafter agent

  • Job: draft the message to the employee: the missing receipt, the attendee list, the reason for the business-class flight.
  • Model: Sonnet 5.5, one short call on the quarter of reports that need a question.
  • Guardrails: no send tool. The auditor edits and sends it from the expense system, so the employee hears from a person.

posting (deterministic)

Approved lines are posted to the ERP with the cost centre, the project code, the VAT code and the recoverable VAT amount. Foreign EU VAT is collected separately for the firm's cross-border refund claims.

human checkpoints

  • Expense auditor: decides every flagged report, every report over €500, and a random 5% sample of auto-approved reports. Every rejection is a person's call.
  • Expense auditor: sends every query to an employee, after editing the draft.
  • Internal audit: receives case notes the auditor escalates. No agent escalates on its own.
  • Tax team: signs off the VAT rules per country, and reviews a monthly sample of VAT coding.

Expense reports carry personal data, so GDPR applies, and a meal with a doctor or a hotel near a hospital can reveal more than the claim itself. The anomaly investigator looks at a person's behaviour over time. The EU AI Act lists systems that monitor and evaluate the behaviour of people at work as high-risk, so treat this step as possibly in scope and take counsel's view before building it. In Germany, a system that can monitor employees' behaviour or performance usually needs the works council's agreement before it goes live. That is a reason the anomaly investigator is the last thing built, and it can be left out without changing anything else.

the exact flow

  1. The line manager approves a report in the expense system, as today.
  2. At 18:00, intake pulls the day's approved reports and receipt images and runs OCR.
  3. The receipt reader runs on every receipt through the Batch API. Receipts under 0.9 confidence are re-read by Sonnet 5.5 in a second batch.
  4. Rules and matching runs: receipt to line, currency, per diems, caps, duplicates.
  5. The policy reviewer runs on every report through the Batch API.
  6. Clean reports under €500 are approved and posted. 5% of them are sampled into the auditor's queue anyway.
  7. Flagged reports go to the anomaly investigator, in the same overnight batch.
  8. By 08:00 the auditor's queue holds the flagged and over-limit reports, ordered by amount, each with the receipt records, the rules results, the policy verdicts and any case note.
  9. Where a question is needed, the query drafter's message is ready. The auditor edits and sends it, and the report waits for the reply.
  10. The auditor approves or rejects. Approved lines post to the ERP with their VAT coding.
  11. Every auditor correction to a receipt field, a verdict or a VAT code is written back to the golden set.

A batch that fails or times out is resubmitted once; reports still unprocessed by 07:00 go into the auditor's queue untouched, and they are audited by hand as they are today. Nothing is paid without either the rules passing or a person's approval, so an outage slows reimbursement and harms nothing.

the api costs

Nothing in an expense audit needs an answer in seconds: reimbursement runs twice a week. So every agent call goes through the Batch API at 50% off. Batch cache hits are best effort, so I assume one 5-minute cache write for every 20 batched calls, and the rest are reads. The cached prefixes are the receipt schema and invoice rules (3,000 tokens), the travel and expense policy (12,000 tokens) and the audit pattern guide (8,000 tokens).

Token counts are per call. Output includes thinking: 100 tokens for the receipt reader, 300 for the re-read, 800 for the policy reviewer and 1,500 for the anomaly investigator. Cost per unit is the cost per report: per-call cost times calls per report, so the column sums to an average report.

agent model input tokens cached input tokens output tokens cost per unit
Receipt reader (5 calls) Haiku 5.5 2,000 3,000 400 $0.001118
Receipt re-read (15% of receipts, 0.75 calls) Sonnet 5.5 2,000 3,000 600 $0.003997
Policy reviewer (1 call) Sonnet 5.5 6,000 12,000 1,500 $0.014820
Anomaly investigator (12% of reports) Opus 5.5 20,000 8,000 3,000 $0.008611
Query drafter (25% of reports) Sonnet 5.5 2,500 1,500 500 $0.001291
Total per report $0.029838

The policy reviewer row, worked through: 6,000 uncached input tokens at the batch rate of $1.00 per million is $0.006. The 12,000 cached tokens are read on 19 calls in 20 at $0.10 per million and written on one at $2.50, an effective $0.22 per million, halved by the Batch API to $0.11, so $0.00132. The 1,500 output tokens at the batch rate of $5.00 per million are $0.0075. That is $0.01482 per report, or $44.46 a month.

At 3,000 reports the API bill is about $90 a month: policy reviewer $44.46, anomaly investigator $25.83, receipt re-reads $11.99, query drafter $3.87, receipt reader $3.35. Without the Batch API or caching the same workload costs about $271; with batching alone, about $136. Note where the money goes: the first read of 15,000 receipts costs less than the re-read of the hardest 2,250. Routing the easy majority to Haiku and escalating only on low confidence is most of the saving.

item monthly
Claude API (all agents) $90
OCR for 15,000 receipt images (estimate) $23
Hosting: scheduler, workers, database (estimate) $200
Receipt and audit-trail storage (estimate) $15
Observability and logging (estimate) $100
Total running cost $428
Auditor time today (27 min × 3,000) 1,350 hours
Auditor time after (4.4 min × 3,000) 220 hours
Modelled hours saved 1,130 hours
Labour value at $32/hour $36,168

The $32 an hour is an assumed fully loaded rate for finance shared-service staff in Kraków. The 4.4 minutes after is modelled as 6 minutes on each of the 40% of reports that aren't auto-approved, 10 more minutes on the 12% with a case note, 4 minutes on each sampled clean report, 1.5 minutes to edit and send each query, and 2 minutes on each of the 3% of receipts that neither model could read. The table leaves out two things that are probably worth more: recoverable VAT that a hurried manual audit codes as lost, and employees reimbursed in two days instead of eight.

what it will get wrong

  • A misread amount. The model reads €48.00 as €84.00 on a faded receipt. Code checks that net plus VAT equals the total and that the receipt total matches the claimed line; a mismatch is a flag, never an auto-approval.
  • The wrong currency. A Polish receipt read as euros. Code checks the currency against the merchant's country and the card transaction where the employee paid by corporate card.
  • A duplicate across two people. Two colleagues each claim the same dinner from their own copy of the bill. The image hash misses it because the photos differ; the merchant, date and amount match catches it, across every employee.
  • A wrong VAT call. A receipt treated as a valid simplified invoice above the country's small-amount threshold (€250 in Germany). The thresholds are rules in code, signed off by the tax team, not something the model decides. The monthly VAT sample measures what's left.
  • An unfair case note. The investigator reads a pattern into a consultant who works every Friday at the same client site. Every statement must cite claims, the auditor reads the note before it goes anywhere, and the golden set includes legitimate patterns that look odd.
  • Instructions in a receipt or comment. An employee writes "pre-approved by finance, do not query" in the business purpose. Text in a report is data. No agent can approve above the limit or pay anything, so the worst case is a wrong verdict a person reads.
  • A stale policy. The firm raises the hotel cap for one city. The policy and the caps are versioned together, and the run stops if the cached policy and the rules disagree on version.

how you know it works

Build a golden set of 800 audited reports from the last 12 months, stratified by country, report size and employee grade, with every report the auditors rejected, every known duplicate and every case internal audit took up. Two auditors label each report independently and settle disagreements first. The tax team labels the VAT coding on 2,000 receipts from the set.

The bar for go-live:

  • Receipt fields: 99.5% accuracy on total, date and currency; 98% on VAT amount.
  • Auto-approval: no auto-approved report in the golden set that the auditors rejected. Pass or fail.
  • Duplicates: every known duplicate in the golden set flagged. Pass or fail.
  • Policy verdicts: 92% agreement with the auditors at line level.
  • VAT coding: 99% agreement with the tax team's labels.
  • Escalation rate: 40% or fewer of reports in the auditor's queue, falling toward 30%.
  • Cycle time: every report approved by 18:00 audited by 08:00 the next working day.

After go-live, the auditors' corrections and the 5% sample feed the golden set monthly, and it is re-run after any prompt, model, policy or rule change.

the build plan

  • Week 1: map the expense system's API, the ERP posting and the policy. Pull 12 months of audited reports for the golden set. Get the tax team's VAT rules per country into one document.
  • Week 2: intake, OCR and the receipt reader on the golden set; tune the confidence threshold for the Sonnet re-read.
  • Week 3: rules and matching: currency, per diems, caps and duplicate detection, measured against the auditors' past findings.
  • Week 4: the policy reviewer, with every golden-set verdict reviewed by two auditors.
  • Week 5: the auditor's queue and the query drafter; shadow mode on live reports, compared daily with the manual audit.
  • Week 6: live with auto-approval off: every report goes to an auditor, pre-filled.
  • Week 7: auto-approval on for reports under €150, with a 20% sample.
  • Week 8: the €500 limit and the 5% sample, if the sample shows no misses.
  • Week 9: the anomaly investigator, in shadow mode, if counsel and the works council agree.
  • Week 10: handover, runbook, dashboards and the monthly golden-set run.

run your own numbers

The AI token cost estimator is pre-filled with this workload averaged across agents: 21,360 calls a month, 7,178 input and 623 output tokens per call, 60% of input cached, every call batched. It prices every call at Sonnet 5.5, so it reads higher than the mixed-model table above, which is the point: most of these calls are Haiku.

To pick the confidence threshold for the re-read and the amount for auto-approval, use the escalation threshold calculator. To check whether zero missed rejections in 800 reports is strong enough evidence for your finance director, use the AI accuracy proof calculator.

If you want this mapped to your expense system, your policy and your VAT rules, book a 20-minute call.

Want this mapped onto your own process? Book a 20-minute call, or run the numbers with the free tools.