Chase overdue invoices with three AI agents: one ranks who owes what, one drafts the reminder, one reads the reply
A self-taught developer split invoice chasing into three agents: a monitor that scores overdue invoices, a writer that matches tone to days overdue, and a reply handler that pauses reminders when a client promises payment. Drafts wait for approval.
Evidence: The source shows its work: steps, screenshots, code or data you can inspect.
The business problem
Freelancers and small service businesses lose hours each month checking who has not paid, deciding how firm to be, writing reminders and answering replies, and the context switching interrupts paid work.
What was tried
1. Keep invoices in a CSV or database with amounts and due dates. 2. A monitor agent finds overdue invoices, calculates a priority score from amount and days overdue, and groups clients; it does not write anything. 3. A reminder agent drafts a message whose tone depends on lateness (a polite nudge at a few days late, a formal notice at around 60 days) and on the client's preferred channel (email, SMS or WhatsApp). 4. When a client replies, a response agent classifies the intent (for example a payment promise) and acts on it, such as pausing reminders for 48 hours. 5. Everything shows in a Next.js dashboard, and in draft mode nothing is sent until the owner clicks approve. 6. Route cheap steps (reading dates, scoring) to a free model through OpenRouter and keep a stronger model for the written messages and negotiation. The code is public under an MIT licence.
What was reported (positive)
The author gives a comparison for about 50 active invoices a month: roughly 5 hours of manual work versus about 10 minutes, at about $0.10 in API costs or free on free models. These are the author's own estimates; no payment-speed, collection-rate or client-reaction numbers are reported, and it is not stated how long the system has been used on real clients.
Limitations
Self-reported time and cost figures with no baseline or measurement period. No data on whether clients paid faster. The repository is small (a couple of stars) and reads like a portfolio project, so treat it as a starting point rather than a tested product. Sending payment reminders by SMS or WhatsApp has consent and debt-collection rules that the post does not cover. The author recommends keeping draft mode on so a wrong CSV value cannot produce an unwarranted legal threat.
What you need
Comfort running a Next.js and TypeScript project, an OpenRouter API key, and invoice data in a CSV or database.
Start in draft mode and review every message for a few weeks before allowing any automatic sends.
A prompt to try
Here is a list of overdue invoices with client name, amount, due date and any past replies. Rank them by priority, then draft one reminder per client whose tone fits how late it is (polite under 14 days, firm under 45, formal after that). Do not threaten legal action. Flag any reply that promises payment so I can pause reminders.
Sources
- DEV Community (Francesco Capurso, fracabu) ↗ Firsthand write-up, published December 21, 2025, main source
- GitHub (fracabu/Agent-PayMind) ↗ Code repository, publication date unknown
Source published: December 21, 2025. Last reviewed here: November 6, 2026. Spot a mistake? Tell us.
Tools in this workflow
- Claude Code: Built and orchestrates the agentsTry Claude Code
- OpenRouter: Routes each step to a cheap or stronger modelTry OpenRouter
- Next.js: Approval dashboardTry Next.js
Get new workflows like this by email
A short selection of the most useful new workflows, including the ones that did not work. Free, and you can unsubscribe at any time.
Related workflows
Hand your year-end bookkeeping checklist to Claude Code: it finds context in your email, reconciles in Xero and asks you only what it cannot find
The owner of a small UK company gave Claude Code his accountant's 37-item year-end checklist. Claude planned the job, reconciled about 200 bank lines in Xero, recategorised expenses and filled the form, with about an hour of his input over 80 short messages.
Let a Grok Bot agent check down WordPress sites every 30 minutes and patch only code faults, with a backup, a 200 check and a log for each fix
A WordPress hosting founder gave a Grok Bot agent one job: every 30 minutes, SSH into sites that went down, fix only bad-code crashes, leave other outages alone, and report. A second bot reviews security findings read-only.
Coordinate a dozen Claude Code sessions as a tiny company with a message relay, an approval-claim filter and a health check for silent stops
A solo operator runs several small projects with Claude Code sessions in roles (a COO, project owners, a coder) and lists what broke in the first weeks: sessions that could not talk, fake approval claims, and scheduled tasks that stopped silently. Revenue is still near zero.
Get the first 10 paying customers by hand with a free Claude Code skill: warm contacts first, pain-signal prospect list, three follow-ups, launch last
An open-source Claude Code skill that plans first-customer outreach: who to contact in what order, a prospect sheet built around a pain signal, short problem-first messages, a fixed follow-up schedule, and a launch only after 10 paying customers.