Last updated August 24, 202625 min read

Build a Personal Budget With an AI Agent

Outcome

One spreadsheet, built from your own bank exports, that shows month by month whether your household gained or lost money, plus a repeatable two-minute monthly routine and a written rules file so the agent never asks you the same question twice.

For the installation prompt, scroll down.It sits at the bottom of this page, with the empty workbook just above it. Click here to go straight there — you do not have to read the article first.Get the prompt
Headline 'Let AI Agent Melt your Costs' beside a rising line chart over four ice-block bars melting under blue flames.

Share this guide

Share this guide on LinkedIn

Summarize with AI

ChatGPTPerplexityClaude
Table of Contents

Before You Start

Three conditions decide whether this works. Get them wrong and you will spend an evening fighting the tooling instead of building the budget.

You need an agent, not a chat window. The website versions of ChatGPT, Claude, Gemini and Copilot cannot open your folder, read your exports, or write to your spreadsheet. You need a harness that runs on your own machine with file access — Claude Code, Codex CLI, or an equivalent. This is the single most common reason people try this and give up.

Your financial data stays local. Do not paste statements into a chat window, and do not upload them to a budgeting service. A local agent reads the files where they sit, and the spreadsheet it writes stays on your disk. You are not creating an account somewhere that now holds five years of your spending.

Excel runs on both Mac and Windows. The workbook in the start pack is a plain .xlsx built with ordinary formulas — no macros, no add-ins, no dynamic-array functions that behave differently between versions. It opens the same on either operating system, and works in LibreOffice or Numbers too, though the charts look best in Excel.

What This System Actually Does

Most budgeting tools answer the question *what did I spend on groceries?* That is easy and rarely useful. The question worth answering is harder:

  • In any given month, did we end up with more money than we started with, or less?

To answer that, three things have to be true at once. Every account has to be in one place. Every transaction has to carry a consistent label. And money you moved into savings has to be counted as neither income nor spending — it is money you kept, but it is not money you can spend.

The formula the whole workbook is built on is deliberately boring: Net = Income − Expenses − Savings. Above the line, you kept money. Below it, you did not.

The agent does the tedious part — reading each bank's own export dialect, mapping merchant strings to categories, keeping the same shop labelled the same way in the oldest row and the newest one. You do the part it cannot: deciding what the categories mean, and checking the numbers.

Steps

Guide

  1. Export Everything Your Bank Will Give You

    Download statement exports for every account, as far back as the bank allows. Most European banks give five years or more through online banking; some make you request it.

    If you do not know where your bank hides this, skip ahead and let the agent walk you through it. Its first question is which bank you use, and it answers with the actual click path for that bank — which menu, what the export is called there, and how to push the date range to the maximum. Finding statement exports is exactly the kind of small, annoying lookup an agent is good at, so there is no reason to do it yourself first.

    One thing worth knowing before you start: choose CSV or XLSX, never PDF. PDF is often the default, and it is the one format that turns a ten-minute job into an afternoon.

    This is the only genuinely tedious step, and you do it once. Depth matters more than tidiness here: two months of data tells you nothing about whether December is expensive every year, and a trend built on one year of history is not a trend.

    Do not clean, rename, or edit the files. The agent reads them as they are, and the untouched original is your audit trail when a number later looks wrong.

  2. Set Up the Folder

    Download the start pack at the bottom of this guide and unzip it. Put each account's exports into its own subfolder inside 01_Raw_Bank_Exports/, and rename those folders to your real account names.

    The folder names become the account labels in the spreadsheet, so name them the way you actually think about them — Jack_day-to-day_account, not Account_2.

    If you share money with someone, say whose account is whose in the folder name. Jack_day-to-day_account and Maria_day-to-day_account are worth the extra typing: the agent cannot tell two people apart from the transactions alone, and a joint household budget where you cannot see who spent what is only half a budget.

    Include every account you can get an export for, and go wider rather than deeper. One account with ten years of history tells you less than every account with three. If a meaningful amount of your spending is cash, note roughly how much you withdraw and carry — the agent will ask, and it is the one hole no export can fill.

  3. Open an Agent, Not a Chat Window

    Open Claude Code or Codex in the unzipped folder, then paste the setup prompt from 04_Documentation/INSTALL-PROMPT.md, also reproduced at the bottom of this guide.

    If you have not added any exports yet, the agent will stop and ask you for them. That is the correct first answer, not an error. It asks three short questions, one at a time. The first is simply whether you want help getting the statements out of your bank or would rather drop the files in yourself — say help, and you get a click-by-click export guide for your own bank. The others are what to call each account, and whether to include cash. Add the files, say continue, and it picks up where it left off.

    It will never ask you to paste a statement into the chat, and you should never offer. The files stay in the folder — that is the whole point of running a local agent instead of a website chat.

    The prompt is long on purpose. Every rule in it is there because leaving it out caused a real problem: an agent that writes before it reads, that silently invents a category rather than admitting uncertainty, or that asks you forty separate yes/no questions until you abandon the task.

  4. Agree the Categories Before Anything Is Written

    The agent will propose a category list based on what it actually saw in your data. Read it properly. This is the highest-leverage ten minutes in the whole process.

    Two rules that matter more than the specific list:

    • Keep it under about thirty. A list you cannot hold in your head is a list you will not maintain.
    • Decide the ambiguous cases now, not later. Is a supermarket sandwich groceries or lunch? Either answer is fine. Changing your mind in month seven is what ruins the data.

    Categorization done one way in March and another way in September produces a trend line that measures your labelling, not your life.

  5. Let It Categorize, Then Answer One Batch of Questions

    The agent works through every transaction and comes back with the ones it could not confidently place. Insist on one batch, sorted by euro impact, biggest first.

    Your attention is the scarce resource here, not the agent's. A recurring charge worth hundreds a year deserves a decision; a single unidentified coffee does not. Let it guess the small ones and flag them.

    Expect to answer genuinely — some of these it cannot possibly know. A cryptic reference code, a transfer to a friend, a local shop that trades under a different name than the one printed on your statement.

  6. Make It Prove the Numbers

    This is the step people skip, and it is the one that matters most.

    Do not accept *it worked*. Ask for the totals to be recomputed independently from the raw export files in Python, without reading the spreadsheet back. If the independent number and the sheet disagree, the sheet is wrong.

    Recompute income, expenses and savings per year directly from the raw export files in 01_Raw_Bank_Exports, using Python, without reading anything back from the spreadsheet. Show both numbers side by side. If they disagree, the spreadsheet is wrong — tell me which rows explain the gap.

    An agent that re-reads its own output is not checking anything. It is agreeing with itself.

  7. Write Down What You Learned

    Ask the agent to write a CLAUDE.md (or AGENTS.md) in the folder holding: your account names, each bank's export quirks, every non-obvious categorization decision and the reason for it, and the gaps you know about.

    The first month is the expensive one. You work out that one bank writes dates backwards, that an unlabelled direct debit is the water bill, how cash withdrawals should be treated. Written down, you pay that cost once. Not written down, you pay it every single month — and you will quietly stop by the third.

    A template is included in the start pack at 04_Documentation/CLAUDE-template.md.

  8. Repeat Monthly in Two Minutes

    From here the routine is small. Drop the new export into the right folder, paste the monthly prompt, answer anything genuinely new, done.

    That is the actual test of whether a personal system survives: not how impressive the first build was, but whether month seven still happens.

What Goes Wrong, and How to Catch It

The agent gives you a confident number that is quietly measuring the wrong thing.

The classic version is a per-category average that divides by transaction count instead of by months or years tracked. It then reports the average size of one shopping trip while calling it your monthly grocery bill. Nothing errors, nothing turns red, and the figure looks plausible. Ask what the denominator is whenever a summary number surprises you.

Internal transfers get double-counted.

Money moving from your checking account to your own savings is not income and not spending. It appears in both exports, once leaving and once arriving. Agents usually know this rule but match the two legs by counterparty name — and two banks often spell that name differently, so a handful slip through and invent income out of nothing. Ask for the excluded list and read it.

A written summary goes stale and starts contradicting the data.

A spreadsheet cannot re-ask a model. Any narrative the agent writes into a cell is a snapshot of the moment it was written, and after your next import it may point the wrong way entirely. Put a date on every written insight and treat it as expiring.

One expensive month makes a typical month look expensive.

Rent, an annual insurance charge and a medical bill landing together will drag a mean upward badly enough to change a decision. Ask for the median for anything describing a typical month, and keep the mean beside it as context, not as the headline.

Cash spending is invisible and always will be.

Your bank records the withdrawal, not the purchase. No tool solves this. Decide once whether withdrawals count as spending or as an acknowledged blind spot, write the decision down, and stay consistent.

The agent invents a category rather than admitting it does not know.

Make Unknown an explicitly allowed answer in the prompt. A model that believes it must not say *I don't know* will produce a confident guess instead, and a wrong label is far more expensive than an honest gap.

Download the Start Pack

Attachment

Everything you need to run this, as one zip. The workbook is empty — it contains no data, mine or anyone's — and is built from scratch with plain formulas so it behaves the same in Excel on Mac and Windows.

  • Budget Starter.xlsx — Transactions, Monthly and Dashboard sheets, formulas and charts already wired
  • INSTALL-PROMPT.md — the setup, monthly and analysis prompts
  • CLAUDE-template.md — the standing-instructions file
  • A folder skeleton for your exports, rules and backups

The Setup Prompt

Copy / paste

Reference guide: https://n-g.be/insights/build-a-personal-budget-with-an-ai-agent
Start pack: https://n-g.be/downloads/budget-starter-pack.zip

Read the reference guide above before you start. Two of its sections are part of your job, not background reading: "Make It Prove the Numbers" defines the verification you must run in STEP 6, and "What Goes Wrong, and How to Catch It" lists the six failure modes you must check for and ask me about in STEP 7.

BEFORE YOU BEGIN
If this folder does not already contain "Budget Starter.xlsx", download and unzip the start pack above into the current folder, then continue. If you cannot download it, stop and tell me instead of building a workbook from scratch.

WHAT IS HERE
"Budget Starter.xlsx" is an empty workbook. Sheets: README, Settings, Accounts, Categories, Transactions, Monthly, Dashboard. Only Transactions is meant to grow; Monthly and Dashboard are formulas that read it.
01_Raw_Bank_Exports/ holds one subfolder per bank account, containing my raw CSV/XLSX statement exports. The folder names are the account names.
02_Categorization/ is where you write your merchant-to-category rules. 03_Archive/ holds dated backups.

PRIVACY - THIS IS NOT NEGOTIABLE
My financial data stays on this machine. Read the files where they sit. Never ask me to paste a statement, a transaction list, or an account number into the chat, and never accept one if I offer. Do not upload the files anywhere, do not send them to any external service, and do not copy their raw contents into anything that leaves this folder.

HOW TO ANSWER ME
Keep every reply short. High level, plus whatever decision or action you need from me right now. Nothing else.
- Lead with what you need from me. Put it first, not after a paragraph of context.
- No progress narration, no explaining what you are about to do, no summarising what you just did.
- If a detail does not change what I do next, leave it out. Offer it instead: "say more if you want the detail."
- Never restate my own request back to me and never pad with reassurance.
- Four places are exempt, because they are outputs I actually asked for rather than narration: the per-account read in STEP 1, the excluded-transfer list in STEP 3, the question batch in STEP 4, and the side-by-side numbers in STEP 6. Keep those complete - but still without commentary.

STEP 0 - GET THE DATA
List the contents of 01_Raw_Bank_Exports/ and count the real export files, ignoring README and placeholder .txt files. If exports are already there, say what you found and go to STEP 1.

If there are none, do not stop at "there is no data" and do not dump a list of instructions on me. Ask me three short questions, ONE AT A TIME, waiting for my answer before asking the next. This is the only step where you ask serially - in STEP 4 you batch everything instead.

Q1. "Do you want help getting your statements out of your bank, or will you drop the files in yourself?"
If I want help: ask which bank I use, then give me the exact export path for that bank - where to click in its web banking or mobile app, which menu the export sits under, what it is called there, and how to set the date range to the maximum the bank allows. If you can search the web, check the bank's current help page first, because these menus get renamed often. If you are not certain, say so and mark your answer as a best guess rather than inventing a menu that does not exist. If I bank somewhere you do not recognise, ask me to describe what I can see on the export screen and work from that.
If I will do it myself: just tell me to choose CSV or XLSX rather than PDF, and to go as far back as the bank allows. Nothing more.

Q2. "How many accounts are we tracking, and what do you want to call each one? I will create and name the folders."
Then create the folders yourself under 01_Raw_Bank_Exports/ using the names I gave you. If money is shared with someone, suggest putting the person in the name - Jack_day-to-day_account, Maria_day-to-day_account - because I cannot expect you to tell two people apart from the transactions alone. Ask once whether there are older, joint, or barely-used accounts I have not mentioned. Every account for three years beats one account for ten.

Q3. "Would you like to include cash in the budget? If yes, roughly or exactly how much per year."
Explain in one line why you are asking: you will see the withdrawal but never what it bought, so this is the one hole no export can fill. If I say yes, record the amount for STEP 8. If I say no, record in STEP 8 that cash is deliberately excluded, and from then on never present a total as complete without saying cash is outside it. Do not ask me again next month either way.

Then say: "Put each account's exports in its folder and tell me when they are there." Then wait. Do not invent sample data, do not build a demo, and do not go to STEP 1 until the files exist.

If you find exports for only one account, say so and ask whether that is really everything before continuing.

STEP 1 - READ BEFORE WRITING
Open every export and tell me, per account: the file format, the date range, the row count, the column meanings, and how the amount sign works. Bank exports differ in delimiter, decimal separator, date order and encoding - do not assume, check. If two files from the same bank disagree, say so. Then STOP and show me what you found. Write nothing yet.

STEP 2 - AGREE THE CATEGORIES
Read the Categories sheet. Propose changes based on what you actually saw in my data: categories to add, ones I will never use, ones to split or merge. Keep the list under about 30. Show me the proposed final list and wait for my yes.

STEP 3 - CATEGORIZE
Assign every transaction a Type (Income / Expenses / Savings) and a Category.
- Amounts in the sheet are ALWAYS POSITIVE. The Type column carries the direction. Net = Income - Expenses - Savings.
- EXCLUDE transfers between my own accounts entirely. Do not enter either leg. Both legs are in my exports and entering them double-counts. Match them by amount + date across accounts, not by counterparty name alone, and show me the excluded list.
- EXCEPTION: if money leaves for an account I gave you no export for, do not drop it silently - record it as Expenses / Unknown and tell me.
- NEVER invent a category to avoid asking. Unknown is a valid, honest answer.
- Recurring identical merchants must get identical categories.

STEP 4 - ASK ME, ONCE
Collect everything you are unsure about and ask in ONE batch, sorted by total impact, biggest first. For each: the merchant text, how many times it appears, the total amount, and your best guess. Anything under 1% of total spend, just guess and flag it. This is the highest-value part of the process for me, so make the questions easy to answer quickly.

STEP 5 - WRITE
Only after I have answered:
1. Copy the workbook into 03_Archive/ with today's date in the filename.
2. Append the rows to the Transactions sheet. Do not touch any other sheet's formulas, ordering or styling.
3. Write your merchant-to-category rules to 02_Categorization/rules.md.
4. Set Settings!C6 to the first year I have data for.

STEP 6 - PROVE IT (see "Make It Prove the Numbers" in the guide)
Do not tell me it worked. Recompute income, expenses and savings per year in Python, directly from the raw export files, WITHOUT reading anything back from the spreadsheet, and show both sets of numbers side by side. If they disagree, the spreadsheet is wrong - say so and name the rows that explain the gap. Reading your own output back is not verification.
Also report: total rows written and the date range covered; how many rows landed in Unknown and what share of total spend that is; and any month with a suspicious gap, such as no salary or no groceries at all.

STEP 7 - RUN THE FAILURE CHECKS AND ASK ME (see "What Goes Wrong, and How to Catch It" in the guide)
Before you call this finished, check each of the six known failure modes against my actual data and report what you found. Where a check needs my judgement, ask me:
1. Wrong denominator - confirm every per-category average divides by months or years tracked, not by transaction count. State the denominator you used.
2. Double-counted internal transfers - show me the transfers you excluded and ask me to confirm none are missing, especially where the two banks spell the counterparty differently.
3. Stale narrative - date every written summary you produce and tell me it expires when I next import.
4. Mean hiding a lumpy month - report the median for anything describing a typical month, with the mean beside it, and point out any month distorting the average.
5. Cash blind spot - tell me how much left as cash withdrawals. If I chose in STEP 0 to leave cash out, do not re-open it; just state that the totals exclude cash.
6. Invented categories - list everything still sitting in Unknown and confirm you guessed at nothing.

STEP 8 - WRITE DOWN WHAT YOU LEARNED
Create a CLAUDE.md in this folder recording my account names and whose is whose, the export quirks per bank, the category decisions I made and why, my cash decision from STEP 0 - either the yearly amount or the fact that I chose to leave cash out - and anything I told you that you would otherwise ask again next month. Copy the HOW TO ANSWER ME rules above into that file verbatim, under a heading of their own, so every future session answers short without me having to say it again. Next month's run must not repeat this month's questions.

If a required input is missing at any point, stop and ask. Do not invent account names, category meanings, or amounts.

About the author

Nikita Goncharenko

Nikita Goncharenko

AI Fast Integrator

Nikita Goncharenko uses AI as a practical delivery layer for research, coding, documentation, content systems, and faster decisions.