This is a personal, non-commercial side project I put together to learn — not a product or service.
Post #21 argued that a recurring invoice can be correct every month and still add up to something nobody decided. Below is a small prototype that keeps the first price in one place and checks the latest month against it.
The script doesn't decide whether a price rise was agreed or a service is still needed. It keeps the first price in one place and shows where today disagrees.
The sample data
Eight made-up recurring services, ten monthly invoices each, and one month to check. For each series the script takes the first invoice as its reference price and reads the owner's last confirmation that the service is used.
| Supplier | Reference | Latest | Since start | Use confirmed | Result |
|---|---|---|---|---|---|
| Office Rent | 2,400 | 2,400 | 0.0% | 2026-09-15 | Clear |
| Cleaning Service | 1,000 | 1,093 | +9.3% | 2026-09-15 | Flagged |
| Analytics Subscription | 450 | 450 | 0.0% | 2025-04-10 (no owner) | Flagged |
| Courier Services | 412 | 420 | +1.9% | 2026-10-02 | Clear |
| Software Licences | 800 | 800 | 0.0% | 2026-06-30 | Clear |
| Maintenance Contract | 1,200 | 1,224 | +2.0% | 2026-08-20 | Clear |
| Insurance Premium | 650 | 650 | 0.0% | 2026-03-01 | Clear |
| Training Platform | 380 | 380 | 0.0% | 2026-05-12 | Clear |
How it works
Try it yourself
1 — Clone the repository
2 — Add your own recurring invoices (optional)
3 — Run it
4 — Read the output
5 — Change the threshold
What it's made of
Data source
A plain CSV of recurring invoices — no ERP, no contract database, nothing beyond sample data.
Calculation
Standard Python, no external dependencies — a first-invoice reference, a percentage change and an idle-days count.
Configurable
The drift threshold, the step threshold, the idle days and which signals to use are command-line arguments, not hardcoded.
Read-only by design
The script only reads and reports. It doesn't cancel, dispute or send anything, and it is not a substitute for the controls an organisation already has.
What's in the repository
The same personal, non-commercial repository as the earlier demos in this series:
- recurring_invoice_agent.py — the full script used above
- data/recurring_invoices.csv — the sample data from this walkthrough
- The Anomaly Watch Agent from Post #16, the Collections Priority Agent from Post #12, the Invoice Priority Agent from Post #11, the Idle Cash Agent from Post #10, the FX Monitoring Agent from Post #9 and the Invoice Agent from Post #3
Follow the series
Post #22 looks at the invoice that arrives without an order: a cost that nobody ordered, nobody owns, and that is paid anyway because the invoice is correct.
Subscribe free