All work
06 / 09Prototype

AAFAS: AI Financial Adviser

Reads your bank transactions, finds the money leaking out of them, and forgets the data straight after.

Role
Co-developer (team of 2)
Year
2026
Type
AI & Agents
Status
Prototype

The problem

Money leaks quietly: subscriptions you forgot, prices that crept up, two services doing the same job. The evidence is in your statements, but nobody reads them line by line.

My contribution

Built with one other developer. My part was the Claude orchestration with tool use, the anomaly and duplicate detection, the chat session, login and registration, and the dashboard.

Result

A prototype that runs end to end: upload a statement or connect a bank, and it returns a health score and findings that trace back to code rather than to the model.

Prototype
Runs end to end locally; not publicly deployed
0 + 5
pure-Python detectors + parallel Claude agents
< 0 ms
for all detectors on six months of data
0
raw transactions ever written to disk
0
input paths — CSV, PDF and live bank data — into one type

Watch it run

connect a bank, analyse, then ask questions

On desktop

AAFAS: AI Financial Adviser: Landing page
Landing page
AAFAS: AI Financial Adviser: Three steps to clarity
Three steps to clarity
AAFAS: AI Financial Adviser: Upload a CSV or PDF statement
Upload a CSV or PDF statement
AAFAS: AI Financial Adviser: Connect a bank through TrueLayer
Connect a bank through TrueLayer
AAFAS: AI Financial Adviser: TrueLayer consent screen
TrueLayer consent screen
AAFAS: AI Financial Adviser: Bank connected: re-analyse any time
Bank connected: re-analyse any time
AAFAS: AI Financial Adviser: Financial report: DNA, progress and health score
Financial report: DNA, progress and health score
AAFAS: AI Financial Adviser: Health score breakdown and chat
Health score breakdown and chat

System overview

People lose money to subscriptions they forgot, prices that crept up, and two services doing the same job. AAFAS finds all three from transaction data alone, scores your financial health out of 100, and explains it in plain language.

The rule the whole system is built around is "analyse, advise, forget": raw transactions live in memory for one request and are never written to disk. There is no transactions table anywhere in it. My part was the Claude orchestration with tool use, the anomaly and duplicate detection, the chat session, login and registration, and the dashboard.

How it fits together

Clients

  • Next.js 14 dashboardBuilt the dashboard

    Upload or connect a bank, then read the report and chat with it.

FastAPI

  • Loaders

    CSV, PDF (parsed by Claude) and TrueLayer, all producing the same Transaction type.

  • AuthBuilt login & registration

    Firebase ID tokens verified on every route.

Detection & AI

  • 5 detectors (pure Python)Anomalies & duplicates

    Recurring, anomalies, duplicates, health score, forecast. Deterministic, under 5 ms.

  • 5 Claude sub-agents

    One per detector, run in parallel, each returning a short plain-language read.

  • Chat sessionBuilt

    Synthesis call with the full findings in context, then follow-up questions.

Persistence & jobs

  • Firestore

    Snapshots of findings, preferences and dismissals. Never transactions.

  • Weekly Guardian

    Re-runs detectors on stored bank access and emails only when something changes.

How it flows

  1. 1

    Get the transactions

    CSV · PDF · TrueLayer

    Upload a file or connect a bank once; a stored refresh token keeps later runs going without the user.

  2. 2

    Run the detectors

    Pure Python

    Subscriptions, anomalies, duplicates, health score and forecast, computed deterministically in under 5 ms.

  3. 3

    Explain the findings

    5 parallel Claude calls

    Each detector's output gets its own short write-up, then one synthesis call ties them together.

  4. 4

    Ask questions

    Chat session

    The session holds the full subscription list and forecast, so answers cite real amounts and dates.

  5. 5

    Forget, then watch

    Firestore · Guardian

    Only findings are saved. A weekly job re-checks the account and emails when something actually changes.

My contribution

  1. 01My part: the Claude orchestrator with tool use, anomaly and duplicate detection, the chat session, login and registration, and dashboard pagination.
  2. 02Five pure-Python detectors with no I/O and no AI: recurring subscriptions, anomalies, duplicate services, a health score and a 30-day forecast. They run in under 5 ms, so they're cheap to run twice per session.
  3. 03Recurring detection survives real data: charges are grouped per merchant, filtered by amount consistency, collapsed to one charge per month, then classified monthly or yearly by median gap.
  4. 04Anomaly scoring adjusted for income: the baseline uses salary credits, so someone with low median spend doesn't get every normal purchase flagged.
  5. 05Duplicate detection with per-category confidence: two VPNs are almost never intentional (0.95), two mobile plans often are (0.50), and a provider switch is detected and scored down.
  6. 06Five Claude sub-agents run in parallel, one per detector, then a synthesis call becomes the chat session, so the whole analysis costs about one round-trip instead of fifteen seconds of chaining.
  7. 07Chat grounded in the user's own numbers: the full subscription list and 30-day forecast go into the opening message, so "what's charging me on the 14th?" gets a real answer.
  8. 08Three input paths converge on one transaction type: CSV, PDF statements parsed by Claude, and live bank data over TrueLayer OAuth.
  9. 09A weekly Guardian job re-runs the detectors without the user present and only calls Claude when something fires: a new subscription, a health-score drop or an annual renewal within 7 days.
  10. 10Privacy enforced in code, not only in prompts: IBANs, card numbers and emails are masked before anything reaches Claude, and snapshots store findings without a single transaction.

Challenges I solved

  1. 01Letting Claude analyse someone's money without letting it make up numbers.

    Solution · Claude runs the analysis through tools that call plain Python detectors, so every figure comes from code. The system prompt also requires each claim to trace back to a tool result.

  2. 02Real bank data and sandbox data look nothing alike: one charge a month versus the same subscription repeated 90 times.

    Solution · Charges collapse to one representative per calendar month before intervals are measured, so both paths run through the same code.

  3. 03A flat anomaly threshold floods users with low spend and misses users with high spend.

    Solution · The baseline is adjusted by income when salary credits are present, so "unusual" means unusual for that person.

  4. 04Two services in one category aren't always a mistake.

    Solution · Confidence is set per category, and a switching heuristic lowers it when one subscription starts as another ends, which is a provider swap rather than waste.

  5. 05Chaining five AI calls after the detectors would make every analysis feel slow.

    Solution · The work is arranged in four phases so detectors and Claude calls overlap, bringing the wall-clock cost down to roughly one round-trip.

  6. 06Money in floating-point numbers drifts.

    Solution · Every amount is whole cents in an integer, and decimals appear only when formatting for display.

What I learned

  • Tool use: giving a model functions to call instead of asking it to calculate.
  • That a privacy rule, taken seriously, becomes an architecture: with no transaction storage allowed, there is simply no schema to hold one.
  • Running independent AI calls in parallel, and arranging the work so the slow parts overlap.
  • Writing detectors as pure functions, which made them fast, deterministic and easy to unit-test.
  • Working milestone by milestone in a shared repository with a teammate.
Next projectAI Interview Coach