<?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: Himanshuraj Nimse</title>
    <description>The latest articles on DEV Community by Himanshuraj Nimse (@himanshurajnimse).</description>
    <link>https://dev.to/himanshurajnimse</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%2F4140557%2Fb876ed70-0383-43e8-954c-c1989d4fd665.jpg</url>
      <title>DEV Community: Himanshuraj Nimse</title>
      <link>https://dev.to/himanshurajnimse</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/himanshurajnimse"/>
    <language>en</language>
    <item>
      <title>FraudLens AI: An Autonomous Graph Agent That Investigates Financial Crime</title>
      <dc:creator>Himanshuraj Nimse</dc:creator>
      <pubDate>Thu, 24 Sep 2026 07:17:23 +0000</pubDate>
      <link>https://dev.to/himanshurajnimse/fraudlens-ai-an-autonomous-graph-agent-that-investigates-financial-crime-4l16</link>
      <guid>https://dev.to/himanshurajnimse/fraudlens-ai-an-autonomous-graph-agent-that-investigates-financial-crime-4l16</guid>
      <description>&lt;p&gt;Fraud rarely looks like fraud in a single row of data. It shows up in the connections: a shared IP address, a reused device, a chain of accounts that all trace back to one bad actor.&lt;/p&gt;

&lt;p&gt;Investigators still find those connections by hand, cross-referencing CSVs and relational tables. One synthetic identity cluster can take hours to untangle, and by the time the ring is mapped, the money has moved.&lt;/p&gt;

&lt;p&gt;For the &lt;strong&gt;Hackathon&lt;/strong&gt;, we built &lt;strong&gt;FraudLens AI&lt;/strong&gt; to close that gap. It is an agentic triage system that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔍 &lt;strong&gt;Investigates&lt;/strong&gt; flagged transactions autonomously&lt;/li&gt;
&lt;li&gt;🕸️ &lt;strong&gt;Maps the multi-hop blast radius&lt;/strong&gt; of a threat inside TigerGraph&lt;/li&gt;
&lt;li&gt;⚖️ &lt;strong&gt;Decides the next best action&lt;/strong&gt;: autonomous freeze or human escalation&lt;/li&gt;
&lt;li&gt;📄 &lt;strong&gt;Generates a compliance-ready Suspicious Activity Report (SAR)&lt;/strong&gt; as a downloadable PDF&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎬 Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/cs-Tc8nTyoc" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ Architecture
&lt;/h2&gt;

&lt;p&gt;FraudLens has four layers. A &lt;strong&gt;React + Tailwind&lt;/strong&gt; dashboard is the investigator's workspace. A &lt;strong&gt;Django&lt;/strong&gt; backend streams the agent's reasoning live over Server-Sent Events. A &lt;strong&gt;LangGraph&lt;/strong&gt; agent runs the investigation loop. &lt;strong&gt;TigerGraph&lt;/strong&gt; is both the knowledge engine and the long-term case memory.&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart LR
    classDef trigger fill:#EF4444,stroke:#7F1D1D,stroke-width:2px,color:#fff
    classDef frontend fill:#3B82F6,stroke:#1E3A8A,stroke-width:2px,color:#fff
    classDef backend fill:#10B981,stroke:#064E3B,stroke-width:2px,color:#fff
    classDef ai fill:#8B5CF6,stroke:#4C1D95,stroke-width:2px,color:#fff
    classDef db fill:#F59E0B,stroke:#78350F,stroke-width:2px,color:#fff
    classDef out fill:#0EA5E9,stroke:#0C4A6E,stroke-width:2px,color:#fff

    ML["ML Fraud Model&amp;lt;br/&amp;gt;flags high-risk transaction"]:::trigger
    User((Investigator))

    subgraph Client ["Frontend"]
        React["React Dashboard&amp;lt;br/&amp;gt;Vite + Tailwind"]:::frontend
        Plotly["Plotly 3D&amp;lt;br/&amp;gt;Blast-radius visualization"]:::frontend
    end

    subgraph Server ["Backend"]
        Django["Django REST API"]:::backend
        SSE["Server-Sent Events&amp;lt;br/&amp;gt;live chain of thought"]:::backend
    end

    subgraph Agent ["Agent Core"]
        LG["LangGraph Agent&amp;lt;br/&amp;gt;investigation loop"]:::ai
        LLM["LLM&amp;lt;br/&amp;gt;Gemini / OpenAI"]:::ai
        T1["Tool: Blast Radius"]:::ai
        T2["Tool: Policy Check"]:::ai
    end

    subgraph Graph ["Graph Database"]
        TG[("TigerGraph&amp;lt;br/&amp;gt;entity graph + GraphRAG memory")]:::db
    end

    subgraph Decision ["Decision and Output"]
        D{"Next Best&amp;lt;br/&amp;gt;Action"}:::out
        L1["L1: Autonomous&amp;lt;br/&amp;gt;freeze"]:::out
        L2["L2: Human&amp;lt;br/&amp;gt;approval"]:::out
        SAR["PDF SAR&amp;lt;br/&amp;gt;report"]:::out
    end

    ML --&amp;gt;|alert| Django
    User --&amp;gt;|opens case| React
    React --&amp;gt;|API request| Django
    Django --&amp;gt;|initializes state| LG

    LG &amp;lt;--&amp;gt;|prompts and reasoning| LLM
    LG --&amp;gt;|calls| T1
    LG --&amp;gt;|calls| T2
    T1 --&amp;gt;|GSQL queries| TG
    TG --&amp;gt;|connected entities| T1
    T1 -.-&amp;gt;|writes embeddings back| TG

    LG --&amp;gt; D
    D --&amp;gt;|can act autonomously| L1
    D --&amp;gt;|requires escalation| L2
    LG --&amp;gt; SAR

    LG --&amp;gt;|chain of thought| SSE
    SSE --&amp;gt;|live updates| React
    React --&amp;gt;|graph nodes| Plotly&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Data flows from trigger to decision, and memory flows back: finished cases are embedded and written into TigerGraph so later investigations have more context.&lt;/p&gt;




&lt;h2&gt;
  
  
  🐯 Why TigerGraph, and How We Used It
&lt;/h2&gt;

&lt;p&gt;Fraud is a relationship problem. Customer A shares an IP address with Customer B, who shares a device ID with a known fraudster, Customer C. In a relational database, that is a chain of self-joins that gets slower and harder to write with every extra hop. In a graph database, it is a single traversal.&lt;/p&gt;

&lt;p&gt;We modeled customers, accounts, devices, IPs, and transactions as a native graph in &lt;strong&gt;TigerGraph&lt;/strong&gt;, then built &lt;strong&gt;GraphRAG&lt;/strong&gt; on top of it.&lt;/p&gt;

&lt;p&gt;Standard RAG retrieves text chunks by similarity. Our agent retrieves &lt;em&gt;structure&lt;/em&gt;. It runs &lt;strong&gt;GSQL&lt;/strong&gt; queries to pull the connected subgraph around a flagged entity and calculates its &lt;strong&gt;blast radius&lt;/strong&gt;: every account, device, and money flow reachable within N hops. That subgraph becomes the context the LLM reasons over, so its claims are grounded in the data.&lt;/p&gt;

&lt;p&gt;TigerGraph is also the agent's memory. When an investigation finishes, the agent embeds the case summary and writes it back to the graph, giving each new investigation more context to draw on.&lt;/p&gt;




&lt;h2&gt;
  
  
  🤖 How the Agent Works
&lt;/h2&gt;

&lt;p&gt;We wanted an agent that does the investigation, not a chatbot that answers questions about it. LangGraph gave us the control flow to build that.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Trigger:&lt;/strong&gt; Our ML model flags a high-risk transaction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Investigate:&lt;/strong&gt; The agent calls its tools to pull connected entities from TigerGraph and check the case against internal fraud policy rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reason in the open:&lt;/strong&gt; Its chain of thought streams to the dashboard over Server-Sent Events, so investigators can watch it work and audit every step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Act:&lt;/strong&gt; The agent chooses a next best action. When it can act on its own, it executes a freeze (&lt;strong&gt;L1 Execution&lt;/strong&gt;). When the case needs human judgment, it escalates (&lt;strong&gt;L2 Approval&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Report:&lt;/strong&gt; It generates a downloadable PDF &lt;strong&gt;Suspicious Activity Report&lt;/strong&gt; containing the findings and supporting evidence.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The L1/L2 split is deliberate. Autonomy handles the routine volume, and people stay in control of decisions that carry risk.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 What We Learned
&lt;/h2&gt;

&lt;p&gt;LLMs reason fluently, but without grounding they will confidently invent connections that don't exist. In financial crime, that matters: a fabricated link can freeze an innocent customer's account or let a real threat slip through.&lt;/p&gt;

&lt;p&gt;Giving the agent tools that return real graph paths from TigerGraph changed how it behaves. It cites entities and relationships that exist in the data instead of guessing. The LLM is still probabilistic, but every claim it makes can be checked against an actual path in the graph, which gives investigators an evidence trail they can verify.&lt;/p&gt;

&lt;p&gt;The LLM supplies the reasoning. TigerGraph supplies the facts. Neither is enough alone.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What We'd Build Next
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Multi-agent architecture:&lt;/strong&gt; A triage agent that routes complex cases to specialists, such as a Synthetic ID agent or a Card Testing agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming ingestion:&lt;/strong&gt; Connect TigerGraph to a Kafka stream so the agent reacts to fraud as it happens instead of waiting for batch triggers.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🔗 Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/HimanshurajNimse/TigerGraph-Fruad" rel="noopener noreferrer"&gt;github.com/HimanshurajNimse/TigerGraph-Fruad&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Demo video:&lt;/strong&gt; &lt;a href="https://youtu.be/cs-Tc8nTyoc" rel="noopener noreferrer"&gt;youtu.be/cs-Tc8nTyoc&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Built for the Hackathon.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>tigergraph</category>
      <category>ai</category>
      <category>hackathon</category>
      <category>graphdatabase</category>
    </item>
  </channel>
</rss>
