Inspiration

As a 5th-semester Information Systems student in Indonesia, I've witnessed firsthand how phishing and social engineering attacks devastate ordinary people. My own family members have received fake bank verification messages, fraudulent package delivery scams, and impersonation attempts via WhatsApp. The problem isn't just technical—it's that most victims lack the knowledge to verify suspicious links before panic sets in.

I wanted to build something that doesn't just tell people "this might be a scam," but actually proves it by investigating like a real cybersecurity analyst would.

What I Learned

Building ScamPilot AI taught me that the most powerful AI applications aren't chatbots that answer questions—they're agents that take action. The biggest lesson was learning to balance AI's reasoning capabilities with deterministic, evidence-based scoring. I discovered that if you let LLMs calculate risk scores directly, they hallucinate. But if you collect hard evidence first (URL patterns, password fields, urgency keywords) and only ask the AI to explain that evidence, you get transparent, trustworthy results.

Integrating Playwright for remote browser control was another breakthrough. Instead of just analyzing text, the AI now physically opens links in a sandbox environment, captures screenshots, and detects form fields—exactly what a human investigator would do, but in seconds.

How I Built It

I architected ScamPilot AI with a strict "evidence-first" pipeline:

  1. Text Analysis Layer: Regex-based extraction identifies URLs, phone numbers, urgency keywords, and credential requests. PII redaction ensures user privacy before any AI processing.

  2. Deterministic Scoring Engine: A transparent scoring system (+15 for urgency, +25 for password fields, +10 for suspicious domains) calculates risk without AI hallucination.

  3. Remote Browser Agent: Playwright controls a headless Chromium browser to safely open suspicious URLs, capture screenshots, detect password forms, and collect visual evidence.

  4. AI Explanation Layer: Groq's LLM receives only the collected evidence and generates plain-language explanations, safe action recommendations, and draft responses.

The tech stack—Next.js 15, TypeScript, Prisma, SQLite, Playwright, and Groq SDK—was chosen for 100% free-tier compatibility and rapid development within the hackathon timeframe.

Challenges I Faced

Challenge 1: Preventing AI Hallucination
Initially, I let the LLM calculate risk scores directly. The results were inconsistent—sometimes flagging legitimate messages as high-risk. Solution: I separated concerns completely. Deterministic tools collect evidence; AI only explains it.

Challenge 2: Playwright in Next.js API Routes
Running headless browsers in serverless environments is tricky. I had to implement strict timeouts (10 seconds), graceful fallbacks when scans fail, and demo mode for local testing without external dependencies.

Challenge 3: Groq Model Availability
The llama3-70b-8192 model was decommissioned mid-development. I implemented automatic retry logic with fallback models and a deterministic explanation generator as the final safety net.

Challenge 4: Making It Demo-Proof
Hackathon demos fail when APIs are down or internet is slow. I built a robust demo mode with local mock phishing pages, cached fixtures, and offline-capable scoring.

What's Next

  • Multi-URL Investigation: Scan all links in a message, not just the first one
  • Browser Extension: Real-time protection as users browse
  • Community Reports: Crowdsourced phishing database
  • SSRF Hardening: DNS-rebinding protection for production deployment
  • Mobile App: Bring ScamPilot to the platforms where scams happen most (WhatsApp, SMS)

ScamPilot AI proves that AI's future isn't in answering questions—it's in taking controlled, evidence-based action to protect people in the real world.

Built With

Share this project:

Updates

Submission history