Skip to content

Ayushhgit/AutoMail_Agent

Repository files navigation

Mail Agent

Production-grade, project-aware automated outreach system with LLM-powered email personalization.

Features

  • Project-Aware AI: Every email references YOUR specific projects
  • Semantic Matching: Vector embeddings match projects to job roles
  • Selection Reasoning: LLM explains WHY each project was chosen
  • Quality Controls: Word limits, forbidden phrases, project mention enforcement
  • Rate Limiting: Safe sending at scale (50/hour, 500/day default)
  • Preview Mode: Review emails before sending

Quick Start

1. Install

cd Mail_Agent
pip install -e .

2. Configure

cp .env.example .env
# Edit .env with your OpenAI API key and SMTP credentials

3. Validate CSV

mail-agent validate-csv your_contacts.csv

4. Preview Emails

mail-agent preview your_contacts.csv your_resume.pdf --limit 3

5. Send

# Dry run first
mail-agent send contacts.csv resume.pdf --dry-run

# Actually send
mail-agent send contacts.csv resume.pdf --delay 5

CSV Format

company_name,hr_name,email,job_role,company_domain
Stripe,Alex Chen,alex@stripe.com,Software Engineering Intern,stripe.com

Required columns: company_name, hr_name, email, job_role Optional: company_domain

Configuration

Set in .env:

OPENAI_API_KEY=sk-...
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=you@gmail.com
SMTP_PASSWORD=your-app-password
MAX_EMAILS_PER_HOUR=50
MAX_EMAILS_PER_DAY=500

Commands

Command Description
preview Generate and preview emails without sending
send Generate and send emails
test-smtp Test SMTP connection
validate-csv Validate CSV schema

How It Works

  1. Resume Parsing: Extracts all projects with structured schema
  2. Vector Indexing: Embeds projects in ChromaDB for semantic search
  3. Role Analysis: LLM extracts requirements from job role
  4. Project Selection: Semantic + skill matching, with reasoning
  5. Email Generation: Context-injected LLM with quality validation
  6. Rate-Limited Sending: SMTP with attachments

License

MIT

About

Production-grade, project-aware automated outreach system with LLM-powered email personalization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages