Email automation for gptme agents with shared communication utilities
Project description
gptmail
Email automation for gptme agents with shared communication utilities.
Overview
gptmail provides email automation capabilities including:
- CLI tools for reading, composing, and sending emails
- Background watcher for processing unreplied emails
- Shared communication utilities (auth, rate limiting, monitoring, state)
- Integration with Gmail via IMAP/SMTP
This package was originally developed as part of an agent workspace and upstreamed to gptme-contrib and upstreamed to gptme-contrib for use by all gptme agents.
Installation
Standalone (recommended for agents without uv workspace)
# Using uv tool
uv tool install git+https://github.com/gptme/gptme-contrib#subdirectory=packages/gptmail
# Or using pipx
pipx install git+https://github.com/gptme/gptme-contrib#subdirectory=packages/gptmail
From workspace
# From workspace root
uv pip install -e packages/gptmail
# Or using the Makefile
cd packages/gptmail && make install
Usage
CLI Tools
# Check for unreplied emails
gptmail check-unreplied
# Read specific email with thread
gptmail read <MESSAGE_ID> --thread
# Compose a reply
gptmail reply <MESSAGE_ID> "Your reply message"
# Send composed message
gptmail send <REPLY_MESSAGE_ID>
# See all commands
gptmail --help
Note: If installed in development mode, use python -m gptmail instead.
Background Watcher
# Run watcher in daemon mode
python -m gptmail.watcher
# Process one email and exit
python -m gptmail.watcher --mode one
Configuration
Environment variables:
AGENT_EMAIL: Default sender email addressEMAIL_ALLOWLIST: Comma-separated list of allowed sender addressesEMAIL_WORKSPACE: Path to email workspace directory
Architecture
The package structure:
src/gptmail/- Main package codecli.py- Command-line interfacelib.py- Core email librarywatcher.py- Background email processorcomplexity.py- Email complexity analysiscommunication_utils/- Shared utilities (auth, rate limiting, etc.)
tests/- Test suiteexamples/- Usage examples
Note: scripts/email Removed
The gptme-contrib/scripts/email/ directory has been removed. This package (gptmail)
is now the canonical implementation. Key features:
- Proper Python package structure (src layout)
- Part of uv workspace
- Enhanced communication utilities
- Better test coverage
- Full maildir import/export support
Usage:
python -m gptmail check-unreplied
# Or if installed: gptmail check-unreplied
Contributing
Contributions welcome! Please ensure:
- Tests pass:
make test - Type checking passes:
make typecheck - Code is formatted:
make format
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 gptmail-0.1.0.tar.gz.
File metadata
- Download URL: gptmail-0.1.0.tar.gz
- Upload date:
- Size: 48.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99cdbd774995fa94fbd1e7b950eeef9f0f80e060de9c9a4071d25de444e906d3
|
|
| MD5 |
e2dfa6e4c0c12c92e7e5683414a93a4d
|
|
| BLAKE2b-256 |
5c32240a361397317d20e2d74ab1fa5da4adc0d01bffc710aee74df9d9dfcd15
|
File details
Details for the file gptmail-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gptmail-0.1.0-py3-none-any.whl
- Upload date:
- Size: 57.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b75fad7efe74ea3941a52feb851783767c8c74d67518f9c68bf1bd606c579980
|
|
| MD5 |
1f59c319369d46f9b793e5d4c170bac7
|
|
| BLAKE2b-256 |
ed5aff65ec7443630ff3ce261555d100f951ac322db40d1add9ff29d42827229
|