<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aman Kumar</title>
    <description>The latest articles on DEV Community by Aman Kumar (@amankumar01).</description>
    <link>https://dev.to/amankumar01</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4140485%2Fce38ddc1-67f3-4c4e-b021-d5bac12000f5.png</url>
      <title>DEV Community: Aman Kumar</title>
      <link>https://dev.to/amankumar01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amankumar01"/>
    <language>en</language>
    <item>
      <title>Building an Autonomous Fraud Investigation Agent with TigerGraph and MCP</title>
      <dc:creator>Aman Kumar</dc:creator>
      <pubDate>Thu, 24 Sep 2026 06:08:40 +0000</pubDate>
      <link>https://dev.to/amankumar01/building-an-autonomous-fraud-investigation-agent-with-tigergraph-and-mcp-3fg2</link>
      <guid>https://dev.to/amankumar01/building-an-autonomous-fraud-investigation-agent-with-tigergraph-and-mcp-3fg2</guid>
      <description>&lt;h1&gt;
  
  
  Building an Autonomous Fraud Investigation Agent with TigerGraph and MCP
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Combining Native Parallel Graph Analytics, Model Context Protocol, and Agentic Reasoning to Automate Financial Crime Triage and SAR Compliance
&lt;/h3&gt;




&lt;h2&gt;
  
  
  1. The Problem: Relational Blind Spots in Modern Fraud
&lt;/h2&gt;

&lt;p&gt;Traditional fraud engines evaluate incoming transactions as single, isolated rows in a relational database. The catch? Organized financial crime rarely happens in isolation. Modern fraud syndicates rely heavily on synthetic identities, distributed money-mule rings, and shared hardware infrastructure.&lt;/p&gt;

&lt;p&gt;On paper, an isolated $75 transaction looks benign. However, inspecting the &lt;strong&gt;network topology&lt;/strong&gt; reveals the true picture: multiple accounts authenticating from the exact same hardware fingerprint, rapidly layering funds into a common beneficiary cluster.&lt;/p&gt;

&lt;p&gt;To bridge this gap, I engineered an &lt;strong&gt;Autonomous Fraud Investigation Agent&lt;/strong&gt; backed by &lt;strong&gt;TigerGraph&lt;/strong&gt; and standard &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; interfaces.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Architecture Overview
&lt;/h2&gt;

&lt;p&gt;The system operates across three interconnected layers:&lt;br&gt;
[ Case Trigger / CSV Pack ]&lt;br&gt;
│&lt;br&gt;
▼&lt;br&gt;
[ app.py / agent.py ] ◄───► [ TigerGraph Client (tg_client.py) ]&lt;br&gt;
│                                 │&lt;br&gt;
▼                                 ▼&lt;br&gt;
[ MCP Server (mcp_server.py) ] ──► [ Graph Query &amp;amp; Traversal ]&lt;br&gt;
│&lt;br&gt;
├── Risk Scoring &amp;amp; Feature Extraction&lt;br&gt;
├── Prior Case History Matching (closed_cases_history.csv)&lt;br&gt;
├── Next-Best-Action (NBA) Policy Routing&lt;br&gt;
│&lt;br&gt;
▼&lt;br&gt;
[ Evaluation Results (cases/HHG-001.json - HHG-020.json) ]&lt;br&gt;
│&lt;br&gt;
├── Structured SAR Filing Determinations&lt;br&gt;
├── Exposure Calculations &amp;amp; Approval Routing&lt;br&gt;
└── Executive Forensic Summaries&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TigerGraph Layer&lt;/strong&gt;: Stores heterogeneous financial graphs (Accounts, Devices, IP Addresses, Transactions, Merchants) and runs real-time multi-hop neighborhood traversals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Decision Engine&lt;/strong&gt;: Exposes deterministic graph queries, feature extraction tools, and historical lookup routines to the LLM agent via typed tool interfaces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous Agent Loop&lt;/strong&gt;: Evaluates signals, proposes two-stage Next-Best-Actions (NBAs), compiles regulatory Suspicious Activity Reports (SARs), and writes the investigative conclusions back into the graph.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. How TigerGraph Powers the Investigation
&lt;/h2&gt;

&lt;p&gt;TigerGraph serves two essential roles in the pipeline:&lt;/p&gt;

&lt;h3&gt;
  
  
  A. Deep-Link Graph Introspection
&lt;/h3&gt;

&lt;p&gt;When a fraud alert triggers, the agent queries the MCP server, which invokes parameterized GSQL queries to trace paths up to 2–3 hops away:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Device &amp;amp; Identity Sharing&lt;/strong&gt;: Discovering whether an account's device fingerprint or IP address has been observed across other flagged accounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flow-of-Funds Analysis&lt;/strong&gt;: Detecting circular routing, velocity spikes, or rapid fund dispersion to newly linked beneficiaries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because TigerGraph uses native parallel processing (MPP), these multi-hop subgraphs return in sub-second latency, giving the agent real-time relational context.&lt;/p&gt;

&lt;h3&gt;
  
  
  B. Closing the Loop: In-Graph Case Persistence
&lt;/h3&gt;

&lt;p&gt;An investigation is incomplete if its output remains trapped in a static log. The agent persists the entire case record back into TigerGraph:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating &lt;code&gt;FraudCase&lt;/code&gt; vertices.&lt;/li&gt;
&lt;li&gt;Drawing &lt;code&gt;ASSOCIATED_WITH&lt;/code&gt; and &lt;code&gt;FLAGGED_DEVICE&lt;/code&gt; edges to affected accounts and devices.&lt;/li&gt;
&lt;li&gt;Storing risk scores, investigator decisions, and SAR reference tags directly on the graph so future agent runs immediately benefit from historical findings.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Agentic Capabilities Implemented
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Two-Stage Next-Best-Action (NBA) Policy Engine&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stage 1 (Pre-Evidence)&lt;/strong&gt;: Proposes minimal friction actions (e.g., step-up biometric prompt, Tier 1 Ops manual check) while initial data is gathered.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 2 (Post-Evidence)&lt;/strong&gt;: Upon receiving secondary graph traversals or behavioral evidence, upgrades the routing (e.g., immediate freeze, escalation to Tier 2 Senior Fraud Specialist).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Compliance &amp;amp; SAR Drafting&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Analyzes risk thresholds and exposure figures against federal AML/SAR filing policies.&lt;/li&gt;
&lt;li&gt;Automatically synthesizes structured narratives linking entities, suspicious patterns, and regulatory justifications.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured Verification via Schemas&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Constrains agent outputs to strict schemas, ensuring 100% machine-readable outputs for downstream banking microservices.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  5. Benchmark Performance Across 20 Cases
&lt;/h2&gt;

&lt;p&gt;We validated the pipeline across 20 diverse, multi-vector fraud evaluation scenarios (&lt;code&gt;HHG-001&lt;/code&gt; through &lt;code&gt;HHG-020&lt;/code&gt;):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Target Policy&lt;/th&gt;
&lt;th&gt;Achieved Score&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Case Completion Rate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;100% (20 / 20 cases)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SAR Determination Accuracy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&amp;gt; 95%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Approval Route Precision&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tier 1 / Tier 2 Compliance&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Schema Validation Rate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;100% Strict JSON&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Low-Risk Transacting (&lt;code&gt;risk_score &amp;lt; 0.30&lt;/code&gt;)&lt;/strong&gt;: Correctly classified as low exposure with non-invasive friction (e.g., standard monitoring, cleared outcome).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medium-Risk Anomalies (&lt;code&gt;0.30 ≤ risk_score &amp;lt; 0.70&lt;/code&gt;)&lt;/strong&gt;: Prompted intermediate next-best actions without triggering premature account freezes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High-Risk Syndicates (&lt;code&gt;risk_score ≥ 0.70&lt;/code&gt;)&lt;/strong&gt;: Flagged for mandatory SAR filing, immediate beneficiary restrictions, and escalation to Senior Fraud Specialists.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. What I Would Improve With More Time
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Streaming Graph Analytics via Kafka&lt;/strong&gt;: Integrate an event-driven ingestion pipeline directly into TigerGraph’s streaming upsert API to trigger sub-second graph investigations the moment a transaction fires, replacing batch CSV processing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph Neural Network (GNN) Embeddings&lt;/strong&gt;: Train a Graph Convolutional Network (GCN) or Graph Attention Network (GAT) directly over TigerGraph topologies to generate structural entity embeddings for proactive anomaly detection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Agent Orchestration&lt;/strong&gt;: Deconstruct the monolithic agent into collaborative sub-agents (Evidence Investigator Agent, Compliance &amp;amp; Legal Agent, and an Adversarial Red-Team Agent to mitigate false positives).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Graphs Eliminate Hallucinations&lt;/strong&gt;: Providing an LLM with verified relational subgraphs grounds its reasoning in structural enterprise facts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Simplifies AI Integration&lt;/strong&gt;: Standardizing tool schemas via the Model Context Protocol keeps domain logic decoupled from model orchestration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write Back to the Graph&lt;/strong&gt;: The most effective graph agents don't just read data—they write their conclusions back into the topology, compounding institutional memory over time.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tigergraph</category>
      <category>ai</category>
      <category>python</category>
      <category>fintech</category>
    </item>
  </channel>
</rss>
