How utkarshkant/scamguardai works
ScamGuardAI is a message-level scam detector with both a terminal runner and a Streamlit interface. A user submits a message; the interface calls the detector, which builds a strategy-specific prompt, sends it through the LLM executor/client to Google Gemini, and parses the response into a label, reasoning, intent, and risk factors for display or terminal output. The README documents both entry points and Gemini API-key setup. The graph follows the sampled source; unsampled behavior is not inferred beyond documented capabilities.
Main entry points: detector.py Scam Detector · prompts.py Prompt Generator · client.py Gemini Client · main.py Terminal Runner
Components 13
User Interfaces
- Terminal Runner
main.py - Streamlit Interface
streamlit/app.py
Detection Pipeline
- Scam Detector
pipeline/scam_detector/detector.py - Prompt Builder
pipeline/scam_detector/builder.py - Output Parser
pipeline/scam_detector/parser.py - LLM Executor
pipeline/scam_detector/executor.py
LLM Integration
- Prompt Generator
llm/prompts.py - ReAct Prompt
llm/prompt_library/react.md - Gemini Client
llm/client.py
Configuration and Helpers
- Runtime Configuration
config.py - Shared Helpers
utils.py
Other components
- Message Submitter
- Google Gemini
Connections 16
- Message Submitter → Terminal Runner: enters message
main.py - Message Submitter → Streamlit Interface: enters message
streamlit/app.py - Terminal Runner → Scam Detector: calls detection
main.py - Streamlit Interface → Scam Detector: calls detection
streamlit/app.py - Scam Detector → Prompt Builder: builds prompt
pipeline/scam_detector/detector.py - Prompt Builder → Prompt Generator: generates prompt
pipeline/scam_detector/builder.py - Prompt Generator → ReAct Prompt: loads template
llm/prompts.py - Prompt Generator → Shared Helpers: reads file
llm/prompts.py - Scam Detector → LLM Executor: executes prompt
pipeline/scam_detector/detector.py - LLM Executor → Gemini Client: calls model
pipeline/scam_detector/executor.py - Gemini Client → Runtime Configuration: reads settings
llm/client.py - Gemini Client → Google Gemini: sends prompt
llm/client.py - Scam Detector → Output Parser: parses response
pipeline/scam_detector/detector.py - Output Parser → Shared Helpers: extracts JSON
pipeline/scam_detector/parser.py - Scam Detector → Terminal Runner: returns result
main.py - Scam Detector → Streamlit Interface: returns result
streamlit/app.py