Inspiration
My dad runs a small logistics business, and it still runs on paper. Every invoice, bill and payment has to be checked by hand by an outside accountant. That's slow and expensive, and mistakes still get through. He told me he feels lost: he can't tell whether a bill is right, so he depends completely on someone else to tell him.
Small businesses don't lose money to fraud so much as to quiet mistakes: a vendor charges more than the agreed price, a line is billed twice, a total doesn't add up, a bill gets paid twice. Nobody has time to check every line, so these slip through. We built BusyQ so the owner can see these errors themselves, without needing to be an accountant.
What it does
BusyQ is an agentic accountant. It reads your vendor invoices and payments, checks every line against the prices you agreed with the vendor, and finds money lost to:
- Overcharges against the agreed price
- Duplicate lines and wrong totals on an invoice
- Duplicate payments and payments with no invoice
It shows the total you can recover, explains each problem in plain language, and drafts the dispute email to the vendor. Nothing is sent until the owner clicks Approve, and every approval is written to a log that can't be edited.
Our rule is: AI explains, code calculates, a human approves. The model never computes a dollar amount. Every number comes from tested, exact code (amounts are stored as whole cents, never floats).
For the demo we use a fictional school district's food-service vendors, because their prices are fixed by contract and easy to check. The same "invoice versus agreed price" check works for any small business with agreed prices, like my dad's freight and fuel vendors.
Beyond the audit, we also built the rest of the paperwork a small business needs: an invoice editor, issuing with sequential numbers, payments, contracts that feed the price list, and AI import of paper documents, which matters for businesses still on paper.
How we built it
A team of two, in one day.
- App and hosting: TanStack Start (React) on a single Cloudflare Worker, with Tailwind for the UI
- Data: Cloudflare D1 with Drizzle ORM, R2 for uploaded documents, Cloudflare Queues for background work
- AI: every model call runs through Nicrron (OpenAI-compatible, with tool calling and a fallback model list). The agent is a tool-calling loop with seven tools:
get_invoice,lookup_vendor_prices,compare_lines,check_invoice,check_payments,calculate_impactandsave_dispute_draft - Observability: PRISM traces every run as one session, with each model call and each tool call as a span (tool name, status, error, latency and agent version)
- Correctness: zod validation at every boundary, big.js for exact decimal money, and unit tests (vitest) on all the rules, scored against a seeded answer key
- Tooling: Bun, TypeScript and Biome
What we learned
- You can't trust an agent you can't see. PRISM turned "it seems fine" into evidence.
- Keeping the model away from arithmetic is what makes an AI accountant safe to use with real money.
- A tracing tool is most useful when something goes wrong: the failed-tool-call alert and the cluster of identical failures pointed straight to the cause.
Challenges
- Silent failures. Our first version (v1) doesn't crash. It quietly can't price some lines, so overcharges on them go unseen. We had to make that failure visible and repeatable instead of staging it.
- Messy real-world names. Vendors write "HARBOR FOODS INC" or "Harbor Foods", and bill by "CS" or "case" when the contract is per pound. Exact matching missed these.
- Exact money. Prices like $0.335 a pound, pack sizes and rounding had to be right to the cent, so we used decimal math rounded once, at the step the rule requires.
- Working in parallel. Two people, one day, many branches, merge conflicts and a database schema both of us changed.
Results
We ran the same 40 invoices through both versions, live on Nicrron with PRISM tracing (80 runs):
| v1 | v2 | |
|---|---|---|
| Runs with a failed price lookup | 14 of 40 | 0 of 40 |
| Planted problems found | 13 of 19 | 19 of 19 |
| False flags | 0 | 0 |
PRISM's alert fired on the failing v1 runs and clustered them by cause. We fixed the cause in v2 (vendor aliases and pack-size conversion), re-ran the same inputs, and the failures cleared.
What's next
Receiving bills automatically by email, reminders before a contract or payment is due, and cash-flow projections, so a small business owner can run their money without waiting on someone else.
All demo data is synthetic. Northfield Unified School District and its vendors are fictional.
Built With
- accounting
- ai
- ai-agents
- big.js
- biome
- cloudflare-d1
- cloudflare-queues
- cloudflare-r2
- cloudflare-workers
- core
- drizzle-orm
- fintech
- libraries
- llm
- nicrron
- prism
- react
- tailwindcss
- tanstack-start
- tool-calling
- tooling
- typescript
- vitest
- zod
Log in or sign up for Devpost to join the conversation.