Skip to main content

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] Skip before 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

  1. Clone the repository:

    git clone https://github.com/dhruvil-codes/nudge-agent.git
    cd nudge-agent
    
  2. 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
    
  3. Configure Environment Variables: Create a .env file from .env.example:

    cp .env.example .env
    

    Add your Groq API Key:

    GROQ_API_KEY=gsk_your_groq_api_key_here
    
  4. 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.
  5. 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nudge_agent-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

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

Hashes for nudge_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20539df7c1a2b9cfd9f8f0d468dcafc9adcf512a3f746d0d73ebb98fa1c5e610
MD5 2dc250f9e890c3fb068c0f7dbc2e8ed0
BLAKE2b-256 e115996b5b04109ddc7f6b70909de4e4ea746ecc57f4aac0ff3a5c9660476a56

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page