SaaS Intelligence Layer

Your Inbox
Is Not Your
Workflow.

Modern professionals spend hours daily reading long email chains and manually extracting tasks. SortMail fundamentally changes this by applying a "Database-First" and "Push, Don't Poll" architecture combined with a highly optimized Gemini 2.0 AI intelligence pipeline.

Live Stream
MSG_ID: 18F4A9
Review Q3 Contract.pdf
Processing attachments...
MSG_ID: 18F4B2
Client Onboarding Sync
Extracting deadline: Friday 5PM
MSG_ID: 18F4C8
Invoice.pdf.exe
MIME mismatch detected - BLOCKED
Latency< 50ms Load
Core Intelligence

A smart assistant that processes the inbox so you don't have to.

Executive Briefings

Automatically condenses long, multi-participant email threads into clear, actionable bullet points, discarding signature bloat and generic corporate noise.

Attachment Intelligence

Capable of reading and summarizing attached documents (PDF, DOCX, PPTX) via vector embedding to provide full context without forcing the user to open files.

Smart Task Generation

Automatically converts emails into prioritized tasks (do_now, do_today, can_wait) based on AI confidence scores and urgency tracking.

Draft Copilot

Context-aware reply generation that reads the specific thread history and allows users to draft responses with explicit tone parameters.

Follow-up Tracking

Automatically tracks "waiting for reply" threads and seamlessly detects meeting times and deadlines hidden within unstructured email text.

Engineering
Highlights.

01 / Instant Load

Database-First Inbox

Instead of relying on slow API calls to Gmail every time the user opens the app, SortMail loads instantly from a PostgreSQL database (under 50ms). Background synchronization uses Gmail's historyId to perform incremental delta syncs, only fetching exactly what has changed since the last sync.

02 / Pipeline Execution

Single-Pass LLM Pipeline

To keep API costs exceptionally low, the intelligence pipeline executes a single LLM call per thread. A central engine requests a structured JSON response from Gemini 2.0 Flash. Pure extractor functions route this to the database, dropping processing cost to roughly ~₹0.25 per email (50% under budget).

03 / Reactivity

"Push, Don't Poll" SSE

SortMail utilizes a Redis Pub/Sub architecture combined with Server-Sent Events (SSE). When the AI finishes processing, the FastAPI backend publishes an intel_ready event. The Next.js frontend instantly invalidates its React Query cache, magically updating the screen without manual refreshes.

04 / Stack

Strict Contracts

Built with Next.js 14, React Query, FastAPI, PostgreSQL, and ChromaDB. To maintain a robust integration between the AI engine and backend, the system utilizes strict Data Transfer Object (DTO) contracts to prevent AI hallucinations regarding database schemas.

Technical Briefing

Evidence Claim: AI Deadline Extraction & Threat Blocking

$ sortmail process --msg "NDA_Q3.eml"
[+] Semantic Analysis: "Please review by Friday EOD"
[✓] Deadline Extracted: 2026-10-02T17:00:00Z
[!] Threat Blocked: Invoice.pdf.exe (MIME mismatch: application/x-dosexec)