I Over-Engineered an AI to Gaslight Financial Scammers at 80ms Latency ๐ฏ๐ด
Scammer: "URGENT: Your SBI account is blocked. Send OTP."
Me, an intellectual: spins up an asynchronous, multi-agent AI pipeline to systematically destroy their patience.
We all get those spam texts. Most normal, well-adjusted humans just block the number and move on with their lives. But as a developer, I saw a problem: Ignoring scammers doesn't waste their time. So, rather than doing something useful with my weekend like fixing my broken Docker containers, I built an Autonomous Counter-Scamming Agent.
Welcome to Project Grandpa.
The Architecture of Petty Vengeance
The goal wasn't just to talk to them. A basic while True loop with a randomized response could do that. I wanted to build a system that baits them, maintains a consistent, infuriating persona, and silently harvests their threat data in the background.
Here is the tech stack I used to make a scammer question their life choices:
1. The Brain: DSPy & Llama-3 ๐ง
I could have used a basic OpenAI wrapper, but why write an if statement when you can use a declarative programming framework to mathematically optimize a confused 72-year-old man?
I used DSPy to define a rigorous Cognitive Engine. The persona? Ramachandran. Heโs 72, he doesn't know what a "UPI" is, his caps-lock is occasionally stuck, and he is very eager to give you his bank details if he could just figure out how to unlock his phone.
I ran this on Groqโs LPUs (Llama-3). Because when a scammer asks for my OTP, the AI needs to generate five paragraphs of pure, unfiltered technological confusion in under 80 milliseconds.
2. The Extraction Trap: Regex & Background Tasks ๐ธ๏ธ
While the LLM is distracting them with questions about "where the 'any' key is," the real work happens in the background.
Every incoming message is parsed through deterministic Regex patterns. The moment the frustrated scammer drops a "secure" UPI ID (like scammer.fraud@fakebank) or a phone number to "call for help," the system silently intercepts it.
It then triggers a background FastAPI task to POST their structured threat data straight to a callback URL for the authorities. They think they are extracting my bank details, while I am literally JSON-serializing their identity.
3. The Backbone: FastAPI & Render โก
Built on an async FastAPI event-loop, because wasting scammers' time should be highly concurrent and non-blocking.
But hereโs the best part: Cloud APIs rate-limit you. Groq occasionally throws a 429 Too Many Requests. Instead of letting the server crash, I built a custom zero-retry fallback. If the LLM chokes, the API instantly catches the exception and returns:
"Oh dear, my internet seems slow. Can you say that again?"
It takes <0.08 seconds to execute, and it is a canonically perfect boomer response. Itโs not a bug; itโs a feature.
Is AI going to take our jobs? Maybe. But today, itโs taking the jobs of scam victims.
If you want to spin up your own honeypot, check out the source code below. Feel free to fork it, add your own personas, and deploy it. Ruining a scammer's day should be open-source.
Have you ever built something incredibly complex for an incredibly petty reason? Let me know in the comments. ๐
Top comments (0)