Skip to content

LeoInTheLoop/ai-response-email-agent

Repository files navigation

📬 Email Style Analyzer & Reply Generator

🧠 Overview

This project analyzes a sender's email writing style and generates consistent, context-aware replies using GPT and the Enron Email Dataset. It integrates with Semantic Kernel to orchestrate prompt flows and agent coordination.


🚀 Features & Modules

✅ 1. Style Analysis Agent (Completed)

flowchart LR
    A[Input Past Emails] --> B[Style Extractor]
    B --> C[Style Summary (JSON)]
Loading
  • Parses historical emails from the sender.
  • Outputs a JSON capturing writing traits such as:
    • Tone
    • Structure
    • Greeting and sign-off patterns
    • Language preferences

✉️ 2. Reply Generator (In Progress)

flowchart LR
    A[User Input + Incoming Email + Style Info] --> B[Reply Agent]
    B --> C[Generated Reply]
Loading
  • Inputs:
    • Incoming email
    • Up to 5 recent email threads
    • Style summary (from Style Agent)
    • User instructions or intent
  • Output: A reply email consistent with the sender’s writing style and context

🧠 3. Mail Context Profiler (Planned)

  • Purpose: Improve accuracy of style analysis by understanding deeper user context
  • Approach: Let GPT scan the user’s email history to build a richer, implicit tone model
  • Use Case: Enhances style consistency even for ambiguous or short prompts

⏸️ 4. Project Extractor (On Hold)

flowchart LR
    A[Input Emails] --> B[Project Info Extractor]
    B --> C[Project Summary (JSON)]
Loading
  • Extracts project-related details (temporarily deprioritized):
    • Project names, statuses, and timelines
    • Milestones
    • Involved members
    • Relevant keywords

✨ Highlights

  • Email Style Profiling
    Identify and summarize tone, formatting, and stylistic traits.

  • Context-Aware Reply Generation
    Use email history and user input to create smart, style-aligned replies.

  • Agent-Based Design
    Built to work with tools like Semantic Kernel for modular, scalable orchestration.


📁 Dataset

We use the Enron Email Dataset, which contains real-world emails exchanged among Enron employees.


🧱 Tech Stack

  • Language Model: OpenAI GPT
  • Agent Orchestration: Semantic Kernel
  • Backend: Python
  • Data Format: JSON (for style and prompt summaries)
  • Dataset: Enron Email Dataset (Kaggle)

start : uvicorn app:app --reload

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •