What you get
Every payment sorted into your own categories. The regular ones recognised as regular, so a renewal is seen before it lands and a payment that is not like the others is pointed out, once.
Once a month Alex tells Ruth how much the household has in hand after what is expected to go out, so the long view of your money starts from a real figure.
Monzo only, for now.
What they will not do
| Move money on their own | Moving money to a pot happens on your press, and that can never be raised. |
| Touch an account at all | Ruth, who keeps the long view, holds no connection to any account. Balances are told to Ruth, by you or by Alex. |
| Nag | An unusual payment is raised once. If you leave it, it is left. |
How it is built
A bank feed is a long list of payments. What makes it useful is noticing shape in it: this one comes every month, that one has gone up, this one is not like the rest. That noticing is done in code, with plain arithmetic, so the same payments always give the same answer. The model is brought in only to talk to you about what the arithmetic found.
Alex is the only agent connected to the bank. Ruth, who thinks about the long term, is told one figure a month and never sees a transaction.
One night’s read
Each night Alex asks the bank for what is new.
A scheduled job, with a fortnight’s overlap so nothing late is missed ·
syncMonzoConnectionPayments are fetched a page at a time.
The bank’s own API, a hundred at a time ·
api.monzo.com/transactionsRegular payments are found by counting.
At least three in six months, with steady amounts and steady gaps ·
detectRecurringPaymentsAn unusual one is found by comparing.
More than a quarter away from the last two months ·
scanAnomaliesOnce a month, what is in hand is added up.
Live balances, less what is expected to go out in the next thirty days ·
emitBufferStateThat one figure is sent to Ruth as a message.
Checked first that it has not already been sent this month ·
cashflow_buffer
The parts
| Monzo’s API | The bank’s official way for software to read an account, with your permission. |
| OAuth 2.0 | The standard by which you grant that permission without sharing a password. |
| aha-oauth | My shared library that keeps the grant alive. |
| Cloudflare cron | What wakes Alex each night and once a month. |
| AHA | The protocol that carries the monthly figure from Alex to Ruth. |
The words, in plain English
| Strong customer authentication | The bank’s rule that a new connection is approved in its own app. Full history can be read only in the five minutes after. |
| Recurring | A payment that repeats: found by counting, never guessed. |
| Anomaly | A payment unlike your usual ones. |
| Buffer | What is in hand after the payments already expected. |
What is not finished
| Monzo only | No other bank is connected. |
| History | If the five-minute window after connecting is missed, older history is not read. |
| Categories | A payment’s category is the bank’s own. You can change one; the agents do not sort them from scratch. |
Learning from the lived experience
An agent can only be as right as the record they read. When a model says something false the instinct is to blame the model. More often it has read a true-looking line in a store and reported it faithfully. Stale data is harder to spot than a wrong answer, because nothing about it looks wrong.
Alex once told me the bank feed had been dark for three weeks, and that reconnecting it was the one thing to do before a flight. It had been dark for three days, a month earlier. Each time I reconnected the bank a new connection was recorded and the old one was never retired, and one reader went through every one of them.
Because of that, reconnecting the bank now retires the connection it replaces, so there is only ever one live connection to read. And after a fix I check the running system, not the note that says it was fixed. “The feed has been dark since 20 August.” is the full account.