Folio ingests a period's transactions, clears what a deterministic tolerance check can reconcile on its own, and hands only the genuine exceptions to an LLM reasoning agent for categorization and a close memo.
- Ingest —
lib/telemetry.tsgenerates a reproducible month of transactions from a seeded PRNG, keyed on the period string. Same period, same book, every time. - Reconcile (rules) —
lib/reconcile.tsauto-clears any transaction with prior-period history within a 5% tolerance. This is the majority of a real book, and it never touches the model. - Reason (agent) —
lib/groq.tssends only the unresolved exceptions tollama-3.3-70b-versatilevia Groq, BYOK. No key?lib/fallback.tsgives a deterministic stand-in so the app is fully demoable offline. - Report — the API route (
app/api/analyze/route.ts) assembles the agent's per-transaction reasons into the close memo shown in the UI.
npm install
npm run devOpen http://localhost:3000, optionally paste a Groq API key, and click
Run close. Leaving the key field blank runs the offline fallback path.
Next.js 14 (App Router) · TypeScript · Tailwind · Groq (BYOK)