
๐ฐ Fin Agent
AI-powered personal finance management with conversational insights
Home Lab Project ยท Multi-Bank Import ยท Financial Advisor Chat
The Problem
Personal finance is fragmented and hard to analyze:
- Multiple accounts - Credit cards, savings, retirement, investments across institutions
- No unified view - Each bank has its own app, its own categories
- Shallow insights - Bank apps show spending, not strategy
- No forecasting - What does my retirement look like? How does inflation affect me?
I wanted a single system that could import all my transactions, understand my finances holistically, and answer questions like a financial advisor.
The Solution
Fin Agent imports transactions from multiple banks, normalizes them into a unified format, and provides an AI-powered conversational interface for financial analysis.
"How much did I spend on groceries last quarter?"
"What's my projected retirement balance at 60?"
"How does my spending compare month over month?"
"What should I do with my savings right now?"
Key Features
- ๐ฅ Multi-Source Import - Banks, retirement accounts, investment platforms
- ๐ฌ AI Financial Advisor - Conversational insights via Valet LLM
- ๐ Spending Analysis - Category breakdown, trends, comparisons
- ๐ฆ Retirement Planning - Retirement account projections, withdrawal strategies
- ๐ธ Tax Optimization - Bracket calculations, deduction opportunities
- ๐ Housing Analysis - Rent vs buy, mortgage scenarios
- ๐ก๏ธ Insurance Tracking - Health cover, MLS implications
- ๐ Inflation Modeling - Future expense projections
Architecture
flowchart TB
subgraph Import["Data Import"]
F[CSV/PDF Files]
P[Parsers<br/>Bank, Retire, Invest]
end
subgraph Core["Finance Agent"]
S[Storage<br/>Transactions]
A[Analysis<br/>Spending, Trends]
ADV[Advisor<br/>AI Chat]
end
subgraph Services["Specialized Services"]
R[Retirement]
T[Tax]
H[Housing]
I[Insurance]
INF[Inflation]
end
subgraph Backend["Backend"]
V[Valet Runtime<br/>LLM]
K[Knowledge Base<br/>Local Finance Rules]
end
F --> P --> S
S --> A --> ADV
ADV --> R & T & H & I & INF
ADV --> V
ADV --> K
Supported Formats
| Type | Format | Data |
|---|---|---|
| Credit Card | CSV | Transactions |
| Savings Account | CSV | Transactions |
| Retirement Accounts | CSV | Contributions, balance |
| Investments | CSV | Holdings, performance |
| Bank Statements | Coming soon |
Parsers normalize transactions into a standard format with categories, merchants, and amounts.
The Advisor Chat
The core of Fin Agent is the conversational advisor:
flowchart LR
subgraph Input["User Question"]
Q[Query]
end
subgraph Detection["Intent Detection"]
D{Keyword<br/>Analysis}
end
subgraph Data["Data Gathering"]
S[Spending]
R[Retirement]
T[Tax]
H[Housing]
end
subgraph Context["Context Assembly"]
K[Knowledge Base]
P[User Profile]
TX[Transactions]
end
subgraph LLM["LLM Response"]
V[Valet Runtime]
end
Q --> D
D -->|spending keywords| S
D -->|retirement keywords| R
D -->|tax keywords| T
D -->|housing keywords| H
S & R & T & H --> Context
Context --> V
The system detects what data is relevant to your question, gathers it from the appropriate services, and injects it into the LLM context.
Specialized Services
๐๏ธ Retirement Service
- Retirement account projections
- Withdrawal age calculations
- Safe withdrawal rate analysis
- Contribution optimization
๐ธ Tax Service
- Tax bracket calculations
- Deduction tracking
- Estimated tax liability
- Refund projections
๐ Housing Service
- Rent vs buy analysis
- Mortgage scenarios
- Stamp duty calculations
- Affordability assessments
๐ก๏ธ Insurance Service
- Health insurance tracking
- Healthcare levy impact
- Coverage analysis
๐ Inflation Service
- Future expense modeling
- Cost of living adjustments
- Retirement purchasing power
Knowledge Base
The advisor is grounded in local financial knowledge:
- Retirement account rules and withdrawal ages
- Tax brackets and deductions
- Healthcare levy thresholds
- Investment principles
This prevents the LLM from hallucinating incorrect financial information.
API Endpoints
| Category | Endpoints |
|---|---|
| Imports | Upload files, list imports |
| Accounts | List accounts, balances |
| Transactions | Search, filter, categorize |
| Analysis | Dashboard, spending breakdown |
| Advisor | Chat, sessions, history |
| Retirement | Projections, scenarios |
| Tax | Calculations, estimates |
| Housing | Scenarios, comparisons |
Tech Stack
| Component | Technology |
|---|---|
| API | FastAPI |
| Storage | JSON files (simple, portable) |
| LLM | Valet Runtime |
| Parsers | Custom per-institution |
| UI | SvelteKit dashboard |
Privacy Note
This is a personal finance tool for my own use:
- All data stays on my local servers
- No cloud sync or external APIs (except Valet for LLM)
- Transaction data never leaves my network
- LLM queries don't include raw transaction details
What I Learned
- Parsers are fragile - Each bank has its own CSV format quirks
- Categories are hard - Merchant names don't map cleanly to categories
- Context is key - The LLM needs real data to give useful advice
- Knowledge grounding works - Injecting local finance rules prevents hallucinations
What's Next
- Automatic categorization via LLM
- PDF statement parsing
- Goal tracking (savings targets, debt payoff)
- Investment rebalancing suggestions