Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,12 +1,69 @@
|
|
| 1 |
---
|
| 2 |
-
title: Mail Triage
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Mail Triage Agent
|
| 3 |
+
emoji: 👀
|
| 4 |
+
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
+
---
|
| 10 |
+
# AI MAIL TRIAGE AGENT SYSTEM
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
## PROJECT OVERVIEW
|
| 14 |
+
|
| 15 |
+
This project implements an **Automated Email Triage System** designed to handle high-volume incoming mail streams. Leveraging the `openenv-core` framework and **GPT-4o**, the agent serves as a primary security layer, classifying emails into distinct categories based on their security profile, metadata, and content analysis.
|
| 16 |
+
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
## SYSTEM ARCHITECTURE
|
| 20 |
+
|
| 21 |
+
### 1. OBSERVATION SPACE
|
| 22 |
+
|
| 23 |
+
The agent processes a structured `MyEnvV4Observation` for every email, evaluating:
|
| 24 |
+
|
| 25 |
+
* **Sender Identification**: Validation of origin domains (e.g., distinguishing legitimate `.edu` domains from malicious alternatives).
|
| 26 |
+
* **Content Analysis**: Scanning subjects and message bodies for high-urgency keywords, phishing links, and social engineering tactics.
|
| 27 |
+
* **Authentication Headers**: Analyzing technical metadata, including **SPF**, **DKIM**, and **DMARC** status, to detect spoofing.
|
| 28 |
+
|
| 29 |
+
### 2. ACTION SPACE
|
| 30 |
+
|
| 31 |
+
For every observation, the agent generates a `MyEnvV4Action` containing a classification:
|
| 32 |
+
|
| 33 |
+
1. **INBOX**: Legitimate academic or personal communications.
|
| 34 |
+
2. **SPAM**: Unsolicited marketing or mass junk mail.
|
| 35 |
+
3. **QUARANTINE**: High-risk phishing attempts or suspicious security alerts.
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## EVALUATION AND REWARDS
|
| 40 |
+
|
| 41 |
+
The environment assesses agent performance through a precision-based reward system:
|
| 42 |
+
|
| 43 |
+
* **CORRECT CLASSIFICATION**: `+1.0 Reward`
|
| 44 |
+
* **INCORRECT CLASSIFICATION**: `0.0 Reward`
|
| 45 |
+
* **TERMINATION**: The environment concludes once the triage dataset has been fully processed.
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## TECHNICAL STACK
|
| 50 |
+
|
| 51 |
+
* **CORE FRAMEWORK**: `openenv-core==0.2.3`
|
| 52 |
+
* **WEB SERVER**: FastAPI / Uvicorn
|
| 53 |
+
* **LANGUAGE**: Python 3.10-slim
|
| 54 |
+
* **LLM INFERENCE**: OpenAI GPT-4o
|
| 55 |
+
* **INFRASTRUCTURE**: Docker-based deployment on Hugging Face Spaces
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
## INSTALLATION AND EXECUTION
|
| 60 |
+
|
| 61 |
+
To deploy this environment:
|
| 62 |
+
|
| 63 |
+
1. Configure the `HF_TOKEN` within the Environment Secrets.
|
| 64 |
+
2. Build the container utilizing the provided `Dockerfile`.
|
| 65 |
+
3. The server initializes on **Port 8000**, exposing endpoints for `/reset`, `/step`, and `/state`.
|
| 66 |
+
|
| 67 |
---
|
| 68 |
|
| 69 |
+
**Developed by B.Tech CSE Students | Manipal Institute of Technology**
|