Skip to content

upstackpilot0710/inbox-ai-agent

Repository files navigation

AI Email Responder

AI Email Responder is a Streamlit-based application that uses OpenAI's GPT-4o-mini model to automatically generate professional email replies. It helps users save time, maintain a consistent tone, and improve productivity by drafting polite and context-aware responses.

🚀 Features

  • Automatically generates email subject and body from raw email content.
  • Produces structured JSON output including:
    • reply_subject
    • reply_body
    • tone (Formal | Friendly | Casual)
    • actions (e.g., apologize, request info, escalate)
  • Copy-and-send ready email drafts.
  • Configurable OpenAI API key via Streamlit secrets or environment variables.
  • New Features:
    • File upload for email content (.txt or .eml files)
    • Reply history with save and delete options
    • Copy generated replies to clipboard
    • Improved input validation
    • Support for multiple AI models (GPT-4o-mini, GPT-3.5-turbo)

🛠 Tech Stack

  • Frontend: Streamlit
  • Backend: Python
  • AI Model: OpenAI GPT-4o-mini / GPT-3.5-turbo
  • Key Modules:
    • streamlit_app.py – User interface and app flow
    • utils/llm_handler.py – Handles OpenAI API calls
    • utils/email_utils.py – Email parsing and utilities

⚡ Installation

  1. Clone the repository:
git clone https://github.com/upstackpilot0710/inbox-ai-agent.git
cd inbox-ai-agent
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up OpenAI API key:

    • Create a .streamlit/secrets.toml file in the project root:
      OPENAI_API_KEY = "your-api-key-here"
      
    • Or set as environment variable: export OPENAI_API_KEY=your-api-key-here
  2. Run the application:

streamlit run streamlit_app.py

📖 Usage

  1. Open the app in your browser.
  2. Choose input method: Manual input or upload an email file.
  3. Fill in the email details or upload a file.
  4. Select preferred tone and signature options.
  5. Click "Generate Reply" to get an AI-generated response.
  6. Edit the reply if needed, copy to clipboard, or save to history.
  7. Simulate sending the reply.

🏗 Workflow / Architecture

User Input → Streamlit UI → LLM Handler → OpenAI API → JSON Output → Display Draft

🧭 Architecture Diagram

AI Email Responder Architecture

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📞 Support

If you have any questions or issues, please open an issue on GitHub.

About

AI-powered email assistant built with Streamlit that generates smart replies, classifies messages, and automates inbox workflows using LLMs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors