Fig. 05 · Personal finance / Messaging agent
Reeflect
Personal finance that lives in your texts, where the AI never writes a number.
§ 01
The problem
Most budgeting apps ask you to open them, and most people stop. A text thread is already open. But a finance assistant that invents a balance is worse than no assistant at all.
Reeflect answers by text with the same figures its website shows, and is built so that a language model cannot be the source of any number a person reads.
§ 02
System drawing
- 01 · iPhoneA text arrivesiMessage · Photon Spectrum
- 02 · WorkerRelay onlyno database, no model, no business logic
- 03 · Next.js APILook up the figurescode reads balances, bills and budgets
- 04 · GeminiWrite the sentencessees labels like {cash_total}, never amounts
- 05 · CodeFill in and checkreal values in; a digit scan rejects model-written numbers
- 06 · OutReply by textthe same figures the website shows
§ 03
How it came together
Scroll to step through · Mine = my work
A month as a calendar
Paydays, bills, subscriptions and spending sit on the days they happen, with a balance line and a per-day spending headline.
+ cash-flow calendar on the workspace’s accounts+ statement imports, parsed by codeBills duePayday · Oct 15Per day until thenThe phone can reach the app
A worker keeps the iMessage connection open and relays each text to one endpoint in the app.
+ agent-worker: Spectrum connection, relay only+ /api/agent/turniMessageworkerappreply“How am I doing?”
The agent answers with code-supplied figures: the balance, what is owed before payday, and what is left per day.
+ figures looked up in code+ model writes around labels; digit scan on every replyhow am I doing?
You have $469.42 today, and $165.88 is owed before payday on Oct 15. That leaves about $37.94 a day.
Log it by text
Spending is logged from a message, questions about categories and budgets get exact answers, and a receipt photo becomes a proposal that is saved only on yes.
+ “12 lunch” → logged, with UNDO+ category, budget, bill and account questions+ receipt photo → proposed transaction, saved on confirmspent 12 on lunch
Logged $12.00 for Lunch. You have $469.42 today…
§ 04
Decision log
- D-01
The model never produces a number
Code works out the figures first. Gemini gets label names and plain-word notes, writes the sentences, and code fills the labels in. A digit scan then rejects any reply where the model wrote a number itself. digitScan.ts ↗
- D-02
The worker only relays
The process holding the iMessage connection passes each text to the app and sends back the reply. It never touches the database, the bank sandbox or the model, so all the logic lives in one place. relay.ts ↗
- D-03
A texted amount must be in the text
For “12 lunch”, code extracts the amount from the message and the model only proposes a category. An ambiguous amount gets a question back, not a guess. logSpending.ts ↗
- D-04
Texts and the website cannot disagree
The reply to “how am I doing?” uses the calendar’s own summary on the same data the dashboard loads, so the two are one calculation, not two. ADR-059 ↗
- D-05
Money is integer cents
Amounts are stored and calculated as whole cents through one money module, so nothing drifts through floating-point arithmetic. money/index.ts ↗
§ 05
What I built
- iMessage agent workeragent-worker/src ↗
- Agent turn endpointsrc/app/api/agent/turn/route.ts ↗
- Answers, logging & receipts by textsrc/features/agent ↗
- Budgets, recurring payments & billsweb pages and the figures the agent reads
Built for HackNC 2026 with Jacob Heminway and Simon Ormond. Auth, accounts, statement imports, the calendar on live accounts and text alerts are largely Simon’s work; insights, the Nessie sync and the synthetic data generator are largely Jacob’s.
