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.
- Automatically generates email subject and body from raw email content.
- Produces structured JSON output including:
reply_subjectreply_bodytone(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)
- Frontend: Streamlit
- Backend: Python
- AI Model: OpenAI GPT-4o-mini / GPT-3.5-turbo
- Key Modules:
streamlit_app.py– User interface and app flowutils/llm_handler.py– Handles OpenAI API callsutils/email_utils.py– Email parsing and utilities
- Clone the repository:
git clone https://github.com/upstackpilot0710/inbox-ai-agent.git
cd inbox-ai-agent- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt-
Set up OpenAI API key:
- Create a
.streamlit/secrets.tomlfile in the project root:OPENAI_API_KEY = "your-api-key-here" - Or set as environment variable:
export OPENAI_API_KEY=your-api-key-here
- Create a
-
Run the application:
streamlit run streamlit_app.py- Open the app in your browser.
- Choose input method: Manual input or upload an email file.
- Fill in the email details or upload a file.
- Select preferred tone and signature options.
- Click "Generate Reply" to get an AI-generated response.
- Edit the reply if needed, copy to clipboard, or save to history.
- Simulate sending the reply.
User Input → Streamlit UI → LLM Handler → OpenAI API → JSON Output → Display Draft
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or issues, please open an issue on GitHub.
