File size: 2,083 Bytes
1838600
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# πŸ›‘οΈ Sentinel Scam Honeypot - GUVI Submission

## Quick Start
```bash
# Install dependencies
pip install -r requirements.txt

# Set API key
export GROQ_API_KEY="your-key-here"

# Run server
uvicorn app.main:app --host 0.0.0.0 --port 7860
```

## API Endpoint
```
POST /api/guvi/analyze
Header: x-api-key: GUVI_HACKATHON_V2
```

## Features
| Feature | Status |
|---------|--------|
| Scam Detection | βœ… Regex + LLM |
| Multi-turn Conversations | βœ… Session-based |
| Human-like Personas | βœ… 5 Indian personas |
| Intelligence Extraction | βœ… Regex-primary (UPI, Phone, Bank, etc.) |
| GUVI Callback | βœ… Automatic on completion |
| Key Rotation | βœ… Multi-key support |
| Static Fallbacks | βœ… Budget exhaustion safety |
| Rate Limit Handling | βœ… Proactive cooldowns |

## Architecture
```
app/
β”œβ”€β”€ main.py              # FastAPI entry point
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ orchestrator.py  # Main pipeline
β”‚   β”œβ”€β”€ persona_engine.py # Human-like responses
β”‚   └── scam_detector.py  # Detection logic
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ llm_client.py    # Groq with rotation
β”‚   └── personas.py      # Persona definitions
└── utils/
    β”œβ”€β”€ guvi_handler.py  # GUVI API adapter
    └── extractors.py    # Regex intelligence
```

## Personas
- **Sharma Uncle** (65, Delhi) - Elderly, trusting
- **Rahul Kumar** (24, Bihar) - Desperate jobseeker
- **Meena Patel** (45, Gujarat) - Worried housewife
- **Shyam Sharma** (52) - Scared citizen
- **Curious Investor** (35) - Analytical, cautious

## Response Format
```json
{
  "status": "success",
  "scamDetected": true,
  "scamConfidence": 0.95,
  "reply": "Arre yaar, UPI se kaise bhejun?",
  "extractedIntelligence": {
    "upiIds": ["scammer@upi"],
    "phoneNumbers": ["+919876543210"]
  },
  "agentNotes": "[HIGH RISK] Banking fraud detected"
}
```

## GUVI Callback
Automatically sent when:
- High-value intel captured (UPI/Bank) + 2 turns
- Medium intel + 3 turns
- 6 turn hard cap
- Budget exhausted

---
**Team:** AvinashAnalytics  
**Project:** Sentinel Scam Honeypot