Upload your bank statement, call a phone number, and ask your AI anything about your money, or if you think buying a tesla on a random tuesday is fine...
You upload a PDF of your bank statement. FinBot reads it, figures out where your money went, and stores that info. Then you can call a Twilio phone number and just... talk to it. Ask things like:
- "How much did I spend on food last month?"
- "What's my biggest expense category?"
- "Do you think I can afford a new iPhone?"
It answers based on your actual statement data — not generic advice. After each call it also quietly analyzes how you talked about money (hesitation, impulse buying, decision speed) and uses that to personalize future conversations.
Upload PDF
↓
Parser extracts transactions, balance, due dates, categories
↓
You link your phone number to your statement on the results page
↓
You call the Twilio number
↓
Gemini AI answers your questions using your real financial data
↓
Call ends → behavioral analysis runs in the background
↓
Next call, AI already knows your spending patterns and coaching style
- Flask — web server + webhook handler
- pdfplumber + PyMuPDF — PDF parsing
- Gemini 2.5 Flash — AI responses during calls
- Twilio — phone call handling (speech-to-text + text-to-speech)
- Cloudflare Tunnel — exposes your local Flask server to Twilio
- JSON files — stores profiles, statements, and behavioral memory (no database)
pip install -r requirements.txtFLASK_SECRET_KEY=anything-random
FLASK_PORT=5000
FLASK_DEBUG=true
GEMINI_API_KEY=your_key_from_aistudio.google.com
GEMINI_MODEL=gemini-2.5-flash
TWILIO_ACCOUNT_SID=your_sid
TWILIO_AUTH_TOKEN=your_token
TWILIO_PHONE_NUMBER=+1234567890
BASE_URL=https://your-cloudflare-tunnel-url.trycloudflare.compython app.pyGo to http://localhost:5000
cloudflared.exe tunnel --url http://localhost:5000Copy the https://*.trycloudflare.com URL it gives you, paste it into your .env as BASE_URL, and set your Twilio phone number's webhook to:
https://your-url.trycloudflare.com/voice/incoming
- Go to
http://localhost:5000and upload a bank statement PDF - On the results page, scroll down and enter your phone number to link it to your statement
- Call your Twilio number
- Ask it anything about your finances
Every time you finish a call, FinBot runs a quick analysis on the conversation and tracks things like:
- How often you hesitate before a financial decision
- Whether you tend toward impulse spending
- What topics you bring up most (dining, shopping, bills, etc.)
- Which coaching style ("friendly", "direct", etc.) works best for you
This builds up over time in call_analyzer/data/memory.json and shapes how future calls go.
app.py ← Flask app, main routes
parser.py ← PDF → JSON transaction extractor
categorizer.py ← Labels transactions by category
voice/
routes.py ← Twilio webhooks (incoming call, speech, status)
context_builder.py ← Assembles what Gemini knows before each response
gemini_client.py ← Sends prompts to Gemini, cleans up the reply
session.py ← Tracks active call sessions in memory
call_analyzer/
main/postprocess.py ← Runs after each call ends
services/
behavior_extractor.py ← Reads transcript, finds behavioral signals
metrics_calculator.py ← Turns signals into scores
memory_store.py ← Saves + updates rolling behavioral memory
summarizer.py ← Writes a plain-English summary of the call
data/profiles.json ← Phone number → statement + call history
outputs/ ← Parsed statement JSONs
