Personal finance agent
A personal finance agent reads transactions, answers questions about spending and helps plan. The numbers come from the bank or your database, and the agent can always look them up again. What it can’t look up is the user’s intent: the goal they’re saving for, the subscription they cancelled and why, and the purchase that looks unusual but was planned. Give each user a brain for that, and the agent’s advice starts to fit the person.
Every amount comes from your database, including the budget and the trip’s savings target. The rest comes from the brain: that team dinners get reimbursed and shouldn’t count, and that the trip is in May.
Numbers in your database, reasons in the brain
The agent answers “how much” from your database and “why” from the brain. A page summarises what its sources say and compiles in the background, so it’s the wrong place for a figure the user acts on.
Create a brain for each user
Use the user’s account as the subject, so each user’s goals stay in their own brain.
Capture intentions, not transactions
Don’t send the transaction feed to the brain. It already lives in your database, and thousands of rows
would bury the few things worth remembering. Send the conversation through captureChatTurn instead. The
classifier keeps turns like “team dinners get reimbursed” and drops “thanks”.
When the user acts on a suggestion in your app, send that as a decision with kind integration, worded so
it still makes sense months later:
Answer with both sources
For each question, fetch the figures from your database and the context from the brain, then give the model both:
The first rule keeps a figure that was true when the user mentioned it from overriding today’s numbers.
When plans change
Goals move. If the trip shifts from May to September, the newer capture updates the goal page, and its
earlier version is kept, so the agent can explain why the monthly target dropped. If the user says two
things that conflict, the page becomes contested:
Sensitive data
Financial data is sensitive. Keep account numbers, card numbers and credentials out of every capture.
The profile’s custom directive helps, but redact in your own code before calling capture. Tell users
what the agent remembers and let them delete it. Removing a brain is a soft delete, and
deletePermanently removes a page and its versions with no undo.
An agent that explains spending is different from one that gives regulated financial advice. Find out what applies where you operate before you launch.
Ideas to take further
- Run your own weekly job that reads each goal page, compares it with the progress in your database and sends the user a short summary.
- Give a household its own brain, under a subject you generate for the household, and keep each partner’s personal goals in their own brain.
- Flag a purchase that goes against a rule the user set, and quote the conversation where they set it.
When to use something else
If your app only categorises transactions and draws charts, your database is enough. A brain helps once the agent has to remember what each person is trying to do and why, across months of conversations.
How to build with Living Brain covers the write and read paths in more detail.