Core email processing
- IMAP connection — read-only access to any IMAP-compatible mail server
- Unlimited email accounts — no cap on the number of mailboxes you can connect
- Multi-inbox routing — route each account to a different Telegram chat
- Attachment reading — PDF (pypdf), Excel (openpyxl/xlrd), Word (python-docx), without Office installed
- Body segmentation — separates main text from forwards, signatures, disclaimers
- 20+ mail type classification — INVOICE, CONTRACT, SECURITY_ALERT, DEADLINE, and more
Priority and decision engine
- Deterministic priority — rules-based scoring that works without any AI
- Fact extraction — amounts, dates, document numbers, currencies from body and attachments
- Evidence windows — each fact is anchored to ±3 lines of surrounding context
- Consistency checks — cross-validates amounts, dates, currencies for accuracy
- Explainable reason codes — PRIO_INVOICE, PRIO_DEADLINE_1D, PRIO_SILENCE_14D
- Confidence scoring — 0.0–1.0 confidence per decision, affects action suggestions
- Optional LLM enhancement — GigaChat (Sber) or Cloudflare Workers AI for complex emails
Telegram interface
- One-message rule — one email = one Telegram message, always
- Priority buttons — 🔴 Urgent / 🟡 Important / 🔵 Low, tap to correct
- Snooze — 2h, 6h, or tomorrow, with context restoration on return
- Edit-in-place — priority changes update the original message, no spam
- Daily and weekly digest — scheduled summaries with invoices, contracts, obligations
- Bot commands — /help, /status, /doctor, /stats, /week, /lang en|ru
- EN/RU bilingual — full interface localization, switchable at runtime
Learning and intelligence
- Adaptive priority learning — learns from corrections per sender+account pair
- Quality gates — minimum 3 corrections, ≥80% accuracy before auto-applying
- Sender trust scores — reliability profile per contact with temporal decay
- Obligation tracking — detects "will send by Friday" and surfaces missed deadlines
- Silence detection — alerts when regular contacts go quiet
- Stalled thread detection — notices unanswered email chains
Reliability and observability
- Graceful degradation — FULL → DEGRADED_NO_LLM → continues working
- Delivery SLA metrics — latency, error rate, salvage rate
- Web cockpit — localhost:8787, read-only, health/archive/events/AI traces
- 1,541 tests — pytest on GitHub Actions CI, including 138 golden corpus cases
- Self-checks on startup — schema validation, config preflight, health snapshot
- Doctor diagnostics — built-in system check command