Skip to main content

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

  1. Launch the web interface:
mailos
  1. Open your browser and navigate to http://localhost:8080

  2. 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

  1. Clone the repository:
git clone https://github.com/tomatyss/mailos.git
cd mailos
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest

Architecture

The package consists of several key components:

  1. Email Monitor: Continuously checks for new emails using IMAP
startLine: 29
endLine: 78
  1. LLM Integration: Supports multiple AI providers through a unified interface
startLine: 8
endLine: 65
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mailos-0.1.0.tar.gz (719.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mailos-0.1.0-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

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

Hashes for mailos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a46c9b6f0fa459061b6fd8fb5ceb5e176f1d52b3b7924351187dc65ba5e6faee
MD5 e22c711d8e74c49afc6667367110e81c
BLAKE2b-256 29afe880f016a647f4914fcd2ff5170f828e86a4739115fa06eeb2050cbc227c

See more details on using hashes here.

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

Hashes for mailos-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4e80dc48058439af14baaf932d2abaf19e95ee48476458efd1e0255e1d5748d
MD5 9c367e5c5b4fe2f9160f0526cd6600c9
BLAKE2b-256 689571d8325ea9d0b5b3ada41a32dc68f043a9d300f0785a5ea1e5b3b12090c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page