An AI-powered email monitoring and response system
Project description
Mailos
Mailos is a Python package that transforms any email inbox into an intelligent agent powered by Large Language Models (LLMs). It monitors email accounts and can automatically respond to incoming messages using various AI providers including OpenAI, Anthropic, and AWS Bedrock.
Features
- 🤖 Multiple LLM Provider Support (OpenAI, Anthropic Claude, AWS Bedrock)
- 📧 IMAP Email Monitoring
- ⚡ Real-time Email Processing
- 🔄 Automatic Response Generation
- 🎯 Smart Reply Filtering
- 🌐 Web-based Configuration Interface
- ⏱️ Scheduled Email Checking
Installation
pip install mailos
Quick Start
- Launch the web interface:
mailos
-
Open your browser and navigate to
http://localhost:8080 -
Click "Add New Checker" and configure your email account:
- Email credentials (IMAP server, port, etc.)
- LLM provider settings
- Auto-reply preferences
Configuration
Email Settings
- IMAP server and port
- Email address and password
- Monitoring frequency
LLM Provider Options
OpenAI
{
"llm_provider": "openai",
"model": "gpt-4",
"api_key": "your-api-key"
}
Anthropic Claude
{
"llm_provider": "anthropic",
"model": "claude-3-sonnet",
"api_key": "your-api-key"
}
AWS Bedrock (Claude)
{
"llm_provider": "bedrock-anthropic",
"model": "anthropic.claude-3-sonnet",
"aws_access_key": "your-access-key",
"aws_secret_key": "your-secret-key",
"aws_region": "us-east-1"
}
Development
- Clone the repository:
git clone https://github.com/tomatyss/mailos.git
cd mailos
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install development dependencies:
pip install -e ".[dev]"
- Run tests:
pytest
Architecture
The package consists of several key components:
- Email Monitor: Continuously checks for new emails using IMAP
startLine: 29
endLine: 78
- LLM Integration: Supports multiple AI providers through a unified interface
startLine: 8
endLine: 65
- Reply Handler: Manages email response generation and filtering
startLine: 169
endLine: 192
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Ivan Iufriakov (tomatyss@gmail.com)
Acknowledgments
- PyWebIO for the web interface
- APScheduler for task scheduling
- OpenAI, Anthropic, and AWS for their LLM services
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mailos-0.1.0.tar.gz.
File metadata
- Download URL: mailos-0.1.0.tar.gz
- Upload date:
- Size: 719.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a46c9b6f0fa459061b6fd8fb5ceb5e176f1d52b3b7924351187dc65ba5e6faee
|
|
| MD5 |
e22c711d8e74c49afc6667367110e81c
|
|
| BLAKE2b-256 |
29afe880f016a647f4914fcd2ff5170f828e86a4739115fa06eeb2050cbc227c
|
File details
Details for the file mailos-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mailos-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4e80dc48058439af14baaf932d2abaf19e95ee48476458efd1e0255e1d5748d
|
|
| MD5 |
9c367e5c5b4fe2f9160f0526cd6600c9
|
|
| BLAKE2b-256 |
689571d8325ea9d0b5b3ada41a32dc68f043a9d300f0785a5ea1e5b3b12090c3
|