Building a Real-Time Agentic Fraud Sentinel using TigerGraph, FastAPI, and Vercel A developer built Agentic Fraud Sentinel, a real-time fraud detection system that combines TigerGraph's GraphRAG engine with a FastAPI backend and a Vercel-hosted dashboard to traverse multi-hop entity relationships and return explainable chain-of-thought risk decisions. The system matches new transactions against historical fraud cases with similarity scores and adjusts confidence dynamically, moving from a 78% pre-NBA score requiring step-up authentication to a 95% post-NBA score triggering an automated card block and SAR filing. The developer also documented a Vercel deployment failure caused by the platform auto-detecting Python files as a serverless function, resolved by forcing static-site treatment via vercel.json rewrites and empty build commands. Financial fraud in the modern digital age is complex, fast, and highly networked. Traditional relational SQL databases struggle when analyzing multi-hop connectionsβ€”such as shared IP addresses, linked device IDs, and rapid money transfers across accountsβ€”because deeply nested JOIN operations introduce severe latency. To tackle this, we built Agentic Fraud Sentinel: an autonomous, real-time fraud detection system powered by TigerGraph’s GraphRAG engine and a FastAPI backend. It analyzes transaction streams, traverses deep graph networks in milliseconds, and provides actionable decisions with explainable Chain-of-Thought CoT reasoning. πŸ—οΈ High-Level System Architecture Our solution follows a decoupled full-stack architecture to ensure low latency and high scalability: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Frontend Vercel β”‚ HTTP β”‚ Backend Render β”‚ β”‚ - Single-page Dashboard β”‚ ─────── β”‚ - FastAPI Application β”‚ β”‚ - Tailwind CSS / JS β”‚ <─────── β”‚ - Python 3.x β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ RESTPP APIs β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ TigerGraph Database β”‚ β”‚ - Graph Analytics β”‚ β”‚ - GraphRAG Traversal β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Frontend Vercel : Responsive dashboard providing live simulation triggers, risk score meters, and step-by-step reasoning views. Backend Render : FastAPI service handling REST endpoints, orchestration, and business logic. Graph Engine TigerGraph : Core graph engine running RESTPP endpoints to execute deep multi-hop queries and power GraphRAG evidence extraction. ⚑ Core Features Walkthrough Real-Time Simulation & Event Triggering The system accepts live transaction payloads via REST API endpoints. Through an interactive simulation modal, security analysts can trigger test transactions and monitor instant system responses. Multi-Hop Graph Traversal via GraphRAG When a transaction is flagged, TigerGraph performs rapid graph traversal across connected entity nodes cards, devices, IPs, merchants . The system returns structured Chain-of-Thought CoT steps explaining why a transaction is risky. Historical Case Matching By querying historical fraud benchmark cases stored in the graph database, the system calculates similarity scores e.g., 0.94 similarity to prior proxy fraud patterns to validate new threats instantly. Dynamic Scoring & Next Best Action NBA The sentinel dynamically adjusts confidence scores based on graph evidence: Pre-NBA Score: 78% Requires Step-Up Auth Post-NBA Score: 95% Automated Action: BLOCK CARD & FILE SAR πŸ› οΈ Key Technical Challenge: Troubleshooting Vercel Deployment Deploying a repository containing both static frontend files index.html and backend Python files main.py, requirements.txt to Vercel presented a unique engineering roadblock. The Error Upon deployment, Vercel threw a 500 FUNCTION INVOCATION FAILED error. Root Cause Vercel automatically detected Python files in the root folder and attempted to build the app as a Serverless Python Function. Because no serverless wrapper was present, function execution failed. The Solution We decoupled the execution layer by instructing Vercel to treat the repository strictly as a static web application: Created vercel.json for URL Rewrites: JSON { "rewrites": { "source": "/ . ", "destination": "/index.html" } } Updated Vercel Project Settings: Set Framework Preset to Other. Overrode Build Command and Install Command to remain empty. Redeployed without build cache. This successfully rendered our static dashboard on Vercel while our FastAPI backend remained independently hosted on Render. πŸ”₯ Why TigerGraph? Choosing TigerGraph as our graph engine was pivotal to achieving enterprise-level fraud detection performance: Unmatched Query Speed: TigerGraph’s RESTPP endpoints execute multi-hop graph traversals with sub-second response times. GraphRAG Power: Integrating Graph-based Retrieval-Augmented Generation provides rich contextual evidence directly to AI decision workflows. Scalability: Handles massive dataset connections without degradation in query latency. πŸš€ Conclusion & Future Roadmap The Agentic Fraud Sentinel demonstrates how combining graph databases with modern API-first architectures enables real-time, explainable threat detection. πŸ”— Live Frontend Demo: https://tiger-graph-gilt.vercel.app https://tiger-graph-gilt.vercel.app πŸ“‚ GitHub Repository: github.com/das09power/tiger-graph https://github.com/das09power/tiger-graph