AI-powered Gmail follow-up CLI agent
Project description
🚀 Nudge — AI Gmail Follow-up Agent
Nudge is an autonomous CLI agent that scans your sent Gmail threads, determines which emails need a follow-up using deterministic rules, and generates natural 2-4 sentence follow-up replies using Groq AI (Llama 3.3 70B).
With human-in-the-loop approval, Nudge attaches approved drafts directly to the original Gmail thread.
✨ Features
- 🔒 Secure OAuth 2.0 Integration: Uses official Gmail API to read threads and create drafts.
- 🧠 Smart Decision Engine: Rule-based filtering:
- Skips threads where the recipient already replied.
- Skips threads where last message was sent < 3 days ago.
- Skips threads where you've sent 2+ follow-ups already.
- ⚡️ Groq AI Generation: Generates natural, human-sounding follow-ups powered by
llama-3.3-70b-versatile. - 🤝 Human-in-the-Loop: Interactive CLI prompt
[A] Approve | [S] Skipbefore any draft is created.
🛠 Project Structure
nudge/
├── main.py # CLI Orchestrator & approval flow
├── gmail_client.py # Gmail API client (auth, read threads, create draft)
├── followup_agent.py # Decision logic & Groq AI generation
├── .env.example # Environment variables template
├── requirements.txt # Project dependencies
└── README.md
🚀 Quick Setup
-
Clone the repository:
git clone https://github.com/dhruvil-codes/nudge-agent.git cd nudge-agent
-
Create a virtual environment & install dependencies:
python -m venv venv source venv/bin/activate # On Windows: .\venv\Scripts\Activate.ps1 pip install -r requirements.txt
-
Configure Environment Variables: Create a
.envfile from.env.example:cp .env.example .env
Add your Groq API Key:
GROQ_API_KEY=gsk_your_groq_api_key_here
-
Add Google OAuth Credentials:
- Download your OAuth Client ID credentials file from Google Cloud Console.
- Save it in the project root directory as
credentials.json.
-
Run Nudge:
python main.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nudge_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nudge_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20539df7c1a2b9cfd9f8f0d468dcafc9adcf512a3f746d0d73ebb98fa1c5e610
|
|
| MD5 |
2dc250f9e890c3fb068c0f7dbc2e8ed0
|
|
| BLAKE2b-256 |
e115996b5b04109ddc7f6b70909de4e4ea746ecc57f4aac0ff3a5c9660476a56
|
Provenance
The following attestation bundles were made for nudge_agent-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on dhruvil-codes/nudge-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nudge_agent-0.1.0-py3-none-any.whl -
Subject digest:
20539df7c1a2b9cfd9f8f0d468dcafc9adcf512a3f746d0d73ebb98fa1c5e610 - Sigstore transparency entry: 2255786690
- Sigstore integration time:
-
Permalink:
dhruvil-codes/nudge-agent@d3a045150059ddf567520d99b00253a4f3e32770 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/dhruvil-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d3a045150059ddf567520d99b00253a4f3e32770 -
Trigger Event:
push
-
Statement type: