Real-time money mule detection β’ Gemini-powered forensic copilot β’ Instant SAR generation
π Live Vercel Demo: sentinel-ai-ruthviksolutions-projects.vercel.app (Alternative: sentinel-ai-blue.vercel.app)
β‘ Live Replit Backend: 956695f9-d156-4ce4-aeba-31e18e21cf66-00-1n30fcqnxnw8v.sisko.replit.dev
π Google Developers Group Vizag 2026 Hackathon
$2 Trillion in illicit funds are laundered annually. Legacy AML systems produce 95% false positive rates, drowning compliance teams in noise while sophisticated multi-hop laundering networks slip through completely undetected.
Most detection systems analyze transactions in isolation β missing the structural flow patterns that define money laundering. Rule-based alerts flag individual anomalies but cannot trace how funds flow across interconnected mule networks.
Sentinel AI treats financial ledgers as graphs, not spreadsheets. Using a PyTorch Geometric GraphSAGE model, we evaluate the topological structure of transaction networks β identifying mule hubs, layering chains, and cash-out points that flat-file analysis completely misses.
The platform gives compliance officers a forensic investigation copilot powered by Gemini 2.5 Flash that can:
- π Trace multi-hop money flows through interactive network visualizations
- π§ Explain why a cluster is suspicious with AI-generated risk analysis
- π Draft regulatory Suspicious Activity Reports (SARs) instantly
- π Freeze compromised accounts with one-click mitigation
| Feature | Description |
|---|---|
| πΈοΈ Graph Neural Network Scoring | GraphSAGE model trained on IBM AMLSim benchmark data evaluates transaction subgraph topology β not just individual transfers |
| π€ Gemini Forensic Copilot | Interactive AI assistant that explains graph anomalies, answers investigator questions, and generates compliance narratives in real-time |
| π Interactive Network Visualization | Vis.js-powered force-directed graph canvas showing money flow paths with animated edges and color-coded risk nodes |
| β‘ Rule Engine Telemetry | 6-signal deterministic detection engine (Rapid Fund Movement, Shared Device, Government Alert, Layered Chain, Multiple Senders, New Account Velocity) |
| π One-Click SAR Generation | Gemini drafts regulatory-compliant Suspicious Activity Report narratives from graph context in seconds |
| π Freeze Protocol | Instant account isolation with visual confirmation across the entire suspect network |
| π¬ Guided Demo Walkthrough | 5-step interactive tour: Triage β Trace β Gemini Forensics β Isolate & Lock β File Case |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SENTINEL AI STACK β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββ ββββββββββββββββ βββββββββββββββββββββ β
β β Next.js 16 βββββΊβ API Routes βββββΊβ Gemini 2.5 β β
β β React 19 β β /api/chat β β Flash API β β
β β Framer Motionβ β /api/ml-scoreβ β (Streaming) β β
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ βββββββββββββββββββββ β
β β β β
β βΌ βΌ β
β βββββββββββββββ ββββββββββββββββ β
β β Vis.js β β FastAPI ML β β
β β Graph Canvasβ β Service β β
β β (vis-network)β β :8000 β β
β βββββββββββββββ ββββββββ¬ββββββββ β
β β β
β ββββββββΌββββββββ β
β β PyTorch β β
β β GraphSAGE β β
β β + Isolation β β
β β Forest β β
β ββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Tool | Version |
|---|---|
| Node.js | v20+ (tested on v22.11.0) |
| Python | v3.10 β v3.12 |
# Clone the repository
git clone <repo-url> && cd sentinel-ai
# Install Node.js packages
npm install
# Create Python virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtcp .env.example .env.localEdit .env.local and add your API key:
GEMINI_API_KEY=your_gemini_api_key_herenpm run dev:allThis runs start.sh which:
- β‘ Starts the FastAPI ML service (GraphSAGE + Isolation Forest inference) on
:8000 - π₯ Polls the
/healthendpoint until the ML backend is ready - π Starts the Next.js dev server on
:3000
==========================================================
Sentinel AI - Unified Dev Stack Startup Runner
==========================================================
[1/3] Starting FastAPI ML service in background...
[2/3] Waiting for FastAPI ML service to be ready...
-> FastAPI ready on http://127.0.0.1:8000
[3/3] Starting Next.js dev server...
-> Next.js ready on http://localhost:3000
Frontend-only mode: If you skip the Python setup, the Next.js app still works with a client-side mock scoring fallback.
The guided demo walkthrough follows this flow β each step maps to the interactive stepper in the dashboard UI:
Open the dashboard. Three suspect dossiers are queued. Select Alert #1042 β Robert Chen (Risk Score: 94, CRITICAL). The Rule Engine Telemetry shows 5 out of 6 detection signals triggered β including Shared Device Match and Government Alert Match.
Click "Next Step" to reveal the interactive money flow graph. Watch as the 4-node romance scam ring renders: Victim β Intermediary β Mule Hub β Crypto Cash-out. Funds move $9,500 β $9,450 β $9,400 across 3 hops in under 3 minutes. Click any node to inspect device fingerprints and IP addresses.
Click "Ask Gemini". The AI copilot streams a structured forensic analysis of the graph topology. Ask follow-up questions: "Why is Robert Chen the hub?" or "What regulatory filing is needed?". Then click "Generate SAR Narrative" β Gemini drafts a complete regulatory-compliant narrative.
Click "Execute Freeze Protocol". The target account status updates to FROZEN. The graph nodes pulse red to confirm the network lockdown.
The auto-generated SAR narrative is ready. Click "Submit SAR Filing" to complete the investigation. The case is closed.
We take engineering integrity seriously. Here's our honest story:
During development, our model hit a suspicious 100% AUC. Instead of shipping it, we audited the pipeline and found structural data leakage β connected components were split across train/test sets. We fixed this using component-level disjoint splitting, ensuring zero information leakage between graph partitions.
| Metric | GraphSAGE (Full) | GraphSAGE (35% Edge-Masked) |
|---|---|---|
| AUC | 85.49% | 84.13% |
| Recall (Youden) | 99.06% | 91.43% |
| F1 Score (Optimized) | 30.74% | 29.12% |
- Dataset: IBM AMLSim HI-Small β 56,357 nodes, 70,319 edges
- Edge-Masking Test: Proves model robustness when 35% of transaction edges are missing (simulating incomplete real-world data)
- Reproducibility: Metrics frozen across 3 independent deterministic runs β
results/model_metrics_amlsim_v2.json
- The F1 score on real benchmark data is 30.74% β this means human-in-the-loop investigation remains essential
- The Vercel deployment serves pre-computed GraphSAGE ML scores (served instantly from an embedded JSON database to bypass PyTorch serverless package constraints)
- The GCP production architecture is documented but not deployed
Full validation story:
docs/synthetic_vs_amlsim_validation.md
sentinel-ai/
βββ src/
β βββ app/
β β βββ page.tsx # Landing page (premium dark theme)
β β βββ dashboard/page.tsx # Forensic investigation copilot
β β βββ login/page.tsx # Authentication UI
β β βββ signup/page.tsx # Registration UI
β β βββ globals.css # Design system & animations
β β βββ api/
β β βββ chat/route.ts # Gemini streaming chat endpoint
β β βββ ml-score/route.ts # ML model inference proxy
β βββ components/
β β βββ MoneyFlowGraph.tsx # Vis.js network graph component
β βββ lib/
β βββ detectionEngine.ts # 6-signal rule engine
β βββ mockData.ts # 3 demo scenarios (Romance Scam, Rapid Layering, Device Collision)
βββ ml_service/
β βββ main.py # FastAPI server (GraphSAGE + Isolation Forest inference)
βββ scripts/
β βββ train.py # Model training pipeline
β βββ train_amlsim_v2.py # AMLSim benchmark training with disjoint splits
β βββ generate_mule_dataset.py # Synthetic dataset generator
βββ docs/
β βββ pitch_script.md # 2-minute spoken pitch script
β βββ pitch_narrative.md # Extended pitch narrative
β βββ pitch_one_page.md # One-page pitch summary
β βββ gcp_architecture.md # Production GCP architecture design
β βββ synthetic_vs_amlsim_validation.md # Model validation deep-dive
βββ results/
β βββ model_metrics_amlsim_v2.json # Frozen reproducible metrics
βββ start.sh # Unified stack launcher
βββ PRD.md # Product Requirements Document
βββ ARCHITECTURE.md # Technical architecture
βββ README.md # β You are here
| Layer | Technology | Why |
|---|---|---|
| Frontend | Next.js 16, React 19, TypeScript | App Router with streaming, server components |
| Styling | Tailwind CSS 4, CSS Variables, Framer Motion | Premium dark theme with glassmorphism & micro-animations |
| Graph Viz | vis-network | Client-side force-directed canvas with custom node styling |
| AI | Google Gemini 2.5 Flash (@google/genai) |
Streaming forensic analysis & SAR narrative generation |
| ML Backend | FastAPI, PyTorch Geometric, scikit-learn | GraphSAGE GNN + Isolation Forest anomaly scoring |
| Icons | Lucide React | Clean, consistent iconography |
| Document | Purpose |
|---|---|
docs/pitch_script.md |
2-minute spoken pitch script (271 words, ~2:05 at moderate pace) |
docs/pitch_narrative.md |
Extended narrative with technical depth for Q&A |
docs/pitch_one_page.md |
One-page executive summary |
docs/gcp_architecture.md |
Production GCP architecture (BigQuery, Vertex AI, Cloud Run) |
docs/synthetic_vs_amlsim_validation.md |
Full model validation story with data leakage discovery |
PRD.md |
Product Requirements Document |
ARCHITECTURE.md |
Technical architecture overview |
ml_service/README.md |
ML service API documentation |
β "What makes this different from existing AML tools?"
Traditional AML systems use rule-based thresholds on individual transactions (e.g., flag anything over $10K). Sentinel AI uses Graph Neural Networks that analyze the structural topology of transaction networks β detecting layering patterns, mule hubs, and shared-device fraud rings that flat-file analysis completely misses. It's the difference between looking at one road vs. seeing the entire highway system.
β "Why GraphSAGE specifically?"
GraphSAGE is an inductive GNN β it generalizes to unseen nodes by sampling and aggregating neighbor features. This is critical for AML because new accounts appear constantly, and we need to score them without retraining the entire model. Traditional GCN or GAT models are transductive and require the full graph at inference time.
β "How did you catch the data leakage?"
Our model initially hit 100% AUC, which was a red flag. We audited the data split and discovered that connected components (transaction chains involving the same laundering ring) were being split across train and test sets β so the model was essentially seeing answers during training. We fixed this using component-level disjoint splitting: entire connected components go exclusively into either train or test, never both.
β "Your F1 score is 30.74% β isn't that bad?"
On the IBM AMLSim benchmark with only 5 basic features (no device fingerprints, no IP data, no velocity metrics), achieving 85.49% AUC with 99% recall at the Youden threshold is actually strong. The low F1 reflects the extreme class imbalance (11.28% positive rate). In practice, AML is a recall-first domain β it's better to flag 100 accounts and have 70 be false positives than to miss 30 actual money laundering networks. This is why the system is designed as a copilot for human investigators, not a fully autonomous system.
β "Is the Gemini integration real?"
Yes. The /api/chat endpoint streams real Gemini 2.5 Flash responses. We inject the structured graph context (node metadata, edge amounts, timeline events, detection signals) as a system prompt, and Gemini generates forensic analysis and SAR narratives in real-time. You can ask it follow-up questions β it's a real conversational AI, not a canned response.
β "What would production look like?"
We've documented a full GCP production architecture in docs/gcp_architecture.md β BigQuery for transaction storage, Vertex AI for model serving, Cloud Run for the API layer, and Pub/Sub for real-time alert ingestion. The demo uses in-memory mock data to keep the focus on the investigation UX, but the architecture is designed to scale.
β "Is the ML model running live in the demo?"
Locally: Yes. The start.sh script launches a FastAPI ML service that runs real PyTorch GraphSAGE inference and Isolation Forest anomaly scoring on port 8000.
On Vercel: No β Vercel doesn't support Python runtimes, so the deployed version uses a client-side JavaScript mock scoring fallback. We're transparent about this trade-off.
Warning
The public Vercel deployment runs frontend-only with client-side mock scoring. Run the full stack locally (via npm run dev:all) to see real GraphSAGE PyTorch inference.
Built with π§ intelligence and β caffeine
Sentinel AI β Because money laundering is a graph problem, not a spreadsheet problem.