Skip to content

Aasthaa1508/InboxTriage-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InboxTriage AI

** LLM-Powered Gmail Inbox ** Automation Agent Python Google Cloud Groq An intelligent, automated email triage system that uses the Gmail API and Llama 3.3 70B (via Groq) to ruthlessly organize your inbox. It acts as an elite executive assistant, reading unread emails, scoring their importance, and automatically trashing junk while keeping high-priority communications.

Features

  • LLM-Powered Judgment: Uses Llama 3.3 70B to evaluate email context, sender, and body snippets to rank emails on a priority scale of 1 to 10.
  • Smart Context Engine: Pre-filters senders and subjects to provide the AI with hints (e.g., flagging OTPs, interview requests, or standard marketing junk).
  • Automated Inbox Management: Automatically moves low-value emails (Rank 1-2) to the Trash and marks high-value emails as Read.
  • Pagination Handling: Safely processes unread emails in batches of 20 to respect API rate limits.
  • Dry-Run Safety Mode: Includes a built-in safety toggle to test the AI's judgment without actually modifying or deleting your emails.

Tech Stack

  • Language: Python
  • APIs: Gmail API (OAuth 2.0), Groq API
  • Libraries: google-api-python-client, google-auth-oauthlib, groq, python-dotenv

Setup & Installation

1. Prerequisites

  • Python 3.8+
  • A Groq API Key
  • A Google Cloud Project with the Gmail API enabled.

Add Your API Keys

Create a free account at the Groq Console and generate an API key.

Go to the Google Cloud Console, enable the Gmail API, and download your credentials.json.

Rename .env.example to .env and paste your Groq API key inside.

Place your credentials.json in the root folder of the project.

2. Clone and Install

git clone [https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git](https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git)
cd YOUR_REPO_NAME
pip install -r requirements.txt

**Example output from the AI Inbox Agent:**
```text
SENDER: Pinterest <recommendations@discover.pinterest.com>
   SUB:    Aasthaasharma, so iconic...
   RANK:   1/10 | Automated marketing email with no personalized content
   [DRY RUN] Would have Trashed.

SENDER: TCS Careers <Careers@tcs.com>
   SUB:    Incomplete profiles will not be able to participate...
   RANK:   5/10 | Coding competition invite
   [DRY RUN] Would have Kept.

   Once your environment variables and credentials are set up, you can run the agent:

```bash
python main.py

About

AI-powered email management system. Leverages LLM reasoning and the Gmail API to autonomously categorize high-priority messages and route spam to the trash.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages