SentiVest
๐ค๐ฆ AI Private Banking Agent powered by a Personal Financial Knowledge Graph ๐ธ๏ธ๐ง -> ๐๏ธ voice-first, ๐ก๏ธ real-time fraud detection, ๐ก proactive financial intelligence, and ๐ฎ life simulation for South Africa ๐ฟ๐ฆ
Install / Use
/learn @Nevvyboi/SentiVestREADME
๐ฆ SentiVest
๐ค AI Private Banking Agent with a Personal Financial Knowledge Graph
SentiVest is an autonomous AI banking agent built for the South African market. It goes beyond traditional banking dashboards by combining a personal financial knowledge graph with real-time transaction classification, voice-first interaction, and proactive financial intelligence.
๐ก Banks give you data. SentiVest gives you understanding.
โก What Makes This Different
| Traditional Banking | SentiVest | |---|---| | ๐ Shows balance | ๐ฎ Predicts when you'll run out | | ๐ Lists transactions | ๐ก๏ธ Classifies and scores every one | | ๐ฅ๏ธ Static dashboard | ๐งฌ Living knowledge graph | | ๐ซ No memory | ๐ง Remembers your goals and habits | | ๐ค You drive | ๐ค The agent drives | | โณ Reactive | โก Proactive |
๐๏ธ Architecture
๐๏ธ Voice / Chat Interface 35+ handlers, multi-turn flows, persistent memory
|
๐ง AI Model Layer Qwen 2.5-3B (Ollama) + rule-based fallback
|
๐ธ๏ธ Knowledge Graph Accounts, merchants, loans, investments, insurance, tax
|
๐ก๏ธ Transaction Classifier 100+ merchants, 6 fraud indicators, SAFE/FLAG/ALERT/BLOCK
|
โ๏ธ Infrastructure FastAPI (async) + WebSocket + Investec API (OAuth2)
โจ Features
๐ค Core Agent Capabilities
- ๐ก๏ธ Transaction Classification โ Real-time fraud detection with weighted scoring across 100+ known merchants and 6 fraud indicators
- ๐ธ๏ธ Knowledge Graph โ Personal financial graph connecting accounts, merchants, categories, loans, investments, insurance, tax, budgets, goals, and patterns
- ๐๏ธ Voice Intelligence โ 35+ voice command handlers with persistent memory, multi-turn payment flows, and natural banker-like conversation
- ๐ก Proactive Insights โ Budget warnings, spending habit detection, savings rate analysis, and low balance alerts without being asked
๐ฐ Financial Tools
- ๐ Financial Health Score โ 0-100 score (A-F grade) analyzing DTI, savings buffer, budget adherence, insurance coverage, investment diversity, and spending habits
- ๐ฆ Loan Eligibility โ DTI-based assessment with verdict (Approved/Conditional/Declined), factor analysis, and max affordable calculation
- ๐ Smart Transfer โ Inter-account transfers with full audit trail in the knowledge graph
- ๐ณ Beneficiary Payments โ Fuzzy beneficiary matching, disambiguation, multi-step confirmation flow
๐ฎ Life Simulator
- โฉ Compressed real-life financial simulation (months in seconds, 0.25x-5x speed)
- ๐ Monthly cycle: Salary โ Debit orders โ Daily spending โ Life events โ Insights
- ๐ฒ Life events: Fraud attempts, bonuses, medical emergencies, tax refunds, salary increases, international trips, car accidents
- ๐ก Real-time WebSocket event streaming with graph visualization
๐ฑ UI
- ๐ฑ Phone Mockup โ iPhone-style card carousel, 12 pages (Home, Ledger, Chat, Budgets, Alerts, Documents, Scanner, Tasks, Report, Test, Profile)
- ๐๏ธ Command Center โ Health score ring gauge, loan eligibility panel, AI insights feed, smart transfer, spending breakdown
- ๐ธ๏ธ Knowledge Graph Visualization โ D3.js interactive graph with demo step controls and simulator
- ๐ Audit Log โ Real-time event feed with color-coded severity
๐ ๏ธ Tech Stack
| Layer | Technology | |---|---| | โ๏ธ Backend | FastAPI (Python, async) | | ๐ง AI Model | Qwen 2.5-3B via Ollama | | ๐ธ๏ธ Knowledge Graph | Custom in-memory graph engine | | ๐ก Real-time | WebSocket | | ๐ฆ Banking API | Investec Open API (OAuth2) | | ๐๏ธ Voice | Web Speech API + Google STT | | ๐ Visualization | D3.js | | ๐ฅ๏ธ Frontend | Single-page HTML/JS/CSS |
๐ Quick Start
Prerequisites
- ๐ Python 3.10+
- ๐ฆ Ollama (optional โ falls back to rule-based responses)
Setup
# Clone
git clone https://github.com/Nevvyboi/SentiVest.git
cd SentiVest
# Virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# (Optional) Pull AI model
ollama pull qwen2.5:3b
# Run
python main.py 8000
๐ Open http://localhost:8000 in your browser.
๐ Environment Variables (optional)
Create a .env file:
INVESTEC_CLIENT_ID=your_client_id
INVESTEC_CLIENT_SECRET=your_secret
INVESTEC_API_KEY=your_api_key
Without these, the app uses realistic demo data.
๐ Project Structure
SentiVest/
main.py # โ๏ธ FastAPI server, 28+ API routes, WebSocket
knowledge_graph.py # ๐ธ๏ธ Personal financial knowledge graph engine
voice.py # ๐๏ธ 35+ voice command handlers, payment flows, memory
model.py # ๐ง AI model integration (Ollama Qwen 2.5-3B + fallback)
agent.py # ๐ก๏ธ Transaction classifier (100+ merchants, fraud scoring)
simulator.py # ๐ฎ Life simulator, health score, loan eligibility
kg_routes.py # ๐ Knowledge graph API routes
investec_api.py # ๐ฆ Investec Open API wrapper (OAuth2)
test_all.py # ๐งช 71+ tests
static/
combined.html # ๐ฑ Single-page app (phone + dashboard)
presentation.html # ๐ค Project presentation slides
๐ See individual READMEs for detailed documentation:
static/README.mdโ ๐ฑ Frontend UI documentation
๐ API Overview
| Endpoint | Description |
|---|---|
| POST /api/classify | ๐ก๏ธ Classify transaction (SAFE/FLAG/ALERT/BLOCK) |
| POST /api/voice | ๐๏ธ Process voice command |
| POST /api/chat | ๐ฌ AI chat with KG context |
| GET /api/health | ๐ Financial health score (0-100) |
| POST /api/loan/eligibility | ๐ฆ Loan eligibility assessment |
| POST /api/transfer | ๐ Smart inter-account transfer |
| GET /api/insights | ๐ก Proactive AI insights |
| GET /api/transactions | ๐ Filtered transaction history |
| GET /api/budgets | ๐ Budget status |
| GET /api/alerts | ๐จ Active alerts |
| POST /api/simulator/start | ๐ฎ Start life simulator |
| WS /ws | ๐ก Real-time event stream |
Full API: 28+ main routes + 15+ knowledge graph routes.
๐ By The Numbers
| Metric | Count | |---|---| | ๐ API Endpoints | 28+ main + 15+ KG | | ๐๏ธ Voice Commands | 35+ | | ๐ช Known Merchants | 100+ | | ๐ง AI Intent Types | 25+ | | ๐ฑ UI Pages | 12 | | ๐ฉ Fraud Indicators | 6 | | ๐งช Tests | 71+ | | โจ Total Features | 200+ |
๐งช Testing
python -m pytest test_all.py -v
๐ค Presentation
Open presentation.html in a browser for the full project presentation (20 slides, keyboard/touch navigation, presenter notes).
๐ฎ Controls: Space/Arrow = navigate, F = fullscreen, N = speaker notes.
๐ License
MIT
