Prysm Mail

A revolutionary email client that brings on-device AI intelligence to your inbox while maintaining complete privacy

15 min read

Email remains one of our most essential digital tools, yet the experience often feels stuck in the past. Prysm Mail represents a bold reimagining of what email interfaces could be when powered by on-device intelligence and thoughtful design.

Developed solely by myself (Vittorio), this Swift-based project combines local large language models with innovative UI concepts to transform how we interact with our inboxes.

Prysm Mail App Icon Image
🧠

Local AI Processing

All AI features run entirely on-device using Apple's MLX framework

πŸ”’

Complete Privacy

Your emails never leave your device. Zero cloud processing!

✨

Liquid Glass UI

Innovative SwiftUI design with fluid, responsive interactions

πŸš€

Genesis: Why Build Another Mail Client?

The Prysm Mail project emerged from frustration with existing options that either compromise privacy by scanning emails in the cloud or offer clunky interfaces that haven't evolved with modern UI paradigms.

The goal was ambitious yet focused: create an email client that leverages local AI processing for intelligent features that legitimately improve user experience, while maintaining complete privacy and security.

πŸ’­

The Three-Action Philosophy

Every email that lands in your inbox represents a decision point. Most email clients overwhelm you with dozens of possible actions, but Prysm Mail's revolutionary approach recognizes a fundamental truth: there are only three meaningful responses to any email. This elegant simplicity drives every pixel, every gesture, and every AI decision in the application.

πŸ—‘οΈ

Delete

Some emails don’t need to stick around. Prysm Mail makes it easy to delete them instantlyβ€”clear the clutter and move on.

πŸ“¦

Archive

Not everything needs a reply. Archive emails you might need later without clogging your inbox.

βœ…

Add to To‑Do

Turn actionable emails into tasks. Keep your inbox focused and your priorities clear.

Breaking the Inbox Paradox

We've all been there: emails lingering in our inbox not because they're unread, but because they represent something we need to do. This creates the notorious "inbox anxiety"β€”a constant reminder of unfinished business that transforms our communication hub into a stress-inducing todo list.

Prysm Mail's Task View revolutionizes this dynamic. With a single gesture, emails that require action are elegantly transformed into structured tasks, complete with AI-suggested priorities and deadlines. Your inbox remains a place for communication, while your tasks get the dedicated attention they deserve.

Prysm Mail Task View interface showing email-based tasks organized in a dedicated workspace
The innovative Task View that transforms email-based todos into a proper task management system
Prysm Mail interface overview showing the main inbox view with the Liquid Glass UI effect
The main interface showcasing the distinctive UI effect that has become Prysm Mail's signature design element
βš™οΈ

Technical Architecture: Swift Meets On-Device Intelligence

At its core, Prysm Mail is built with a clean app architecture that separates email protocol handling, local cache management, and the UI layer. What makes this project stand out is its integration of Apple's MLX framework to run lightweight LLMs directly on device, enabling intelligent features without sending email content to external servers.

Prysm Mail Architecture Diagram

🧠 Local LLM Integration

The repository hosts a novel implementation of local language models, with the project evolving from initially using the open-weight 600MB Llama-2-7B-Chat quantized model to now transitioning to a custom, fine-tuned, efficient, and capable MLX-based model under 1GB. This allows Prysm Mail to run sophisticated language processing even on iPhones with limited RAM.

πŸ’¬

Smart Reply Generation

Contextual reply suggestions based on email content

πŸ”

Semantic Search

Natural language search that understands intent rather than just keywords

πŸ“

Content Summarization

Automatic extraction of key points from lengthy emails

🎯

Intent Recognition

Identifying action items, questions, and scheduling requests

Semantic search interface showing natural language query results
The semantic search feature understanding natural language queries like "emails about the conference next month"

πŸ” AI Powered Search Using Custom Email Search Tooling

One of the most innovative aspects of Prysm Mail is its sophisticated AI powered search. There are so many times where users struggle to find specific emails or information within their inboxes, and this is where Prysm Mail's AI capabilities shine.

The AI powered search system uses a tiered approach:

1 User asks the AI-powered search engine a question in natural language
2 The LLM identifies keywords from user query. Then a classic search is performed using these keywords through all inboxes.
3 The top 15 emails based on relevance are retreived from the user's inbox and included in the LLM's context window
4 The LLM chat session is initiated using the emails as an extended context window. This allows the user to directly interface with these emails
🎨

User Interface Innovations

The SwiftUI implementation showcases several advanced techniques that elevate the user experience:

πŸ‘† Gestural Interface

The commit history shows significant effort invested in creating intuitive gesture controls that extend beyond standard swipe actions.

The "momentum actions" feature allows users to continue a swipe gesture to trigger progressively more powerful actions - from archiving to batch processing similar emails.

Animation showing the gesture control system for email management

🧠 Contextual UI Adaptation

Perhaps the most subtle yet powerful UI innovation is how the interface adapts to email content and user behavior patterns. The repository shows implementation of a behavioral analysis module that tracks how users interact with different types of emails and gradually customizes the interface accordingly.

πŸ“§

IMAP and SMTP

Building a robust email client means dealing with decades-old protocols and their quirks. The commit history reveals several interesting challenges and solutions:

Asynchronous Protocol Handling

The initial implementation struggled with responsiveness during IMAP operations. This was solved through a custom asynchronous wrapper around the core protocol handlers.

MIME Parsing Intelligence

Prysm Mail implemented a smart MIME parser that uses the local LLM to make intelligent decisions about displaying complex multipart messages.

Background Sync Optimization

A sophisticated background sync system that adapts polling frequency based on user behavior patterns and message importance.

⚑

Performance & Privacy Solutions

Memory Management for LLMs

Running language models locally presents significant memory constraints. The repository shows a clever implementation of model swapping and context management that allows Prysm Mail to use different-sized models based on the device's capabilities and the specific task at hand.

For older devices, the code implements a "progressive intelligence" approach where simpler tasks use rule-based systems while more complex tasks leverage the LLM only when needed.

Battery Impact Mitigation

AI processing can be power-hungry. The commit history shows several iterations of optimization focused on minimizing battery impact:

Batched Inference

Process multiple emails in a single model pass

Smart Scheduling

LLM tasks during device charging periods

Intelligent Caching

Cache common inferences to avoid redundant processing

πŸš€

Future Directions

The repository's latest developments point to several exciting future directions:

πŸ”„

Background Sync

Privacy-preserving synchronization to the IMAP server even when the app is not in the foreground

🎯

Custom Model Fine-Tuning

Allowing users to fine-tune the local model on their communication style

πŸ“…

Expanded Protocol Support

Adding Calendar integration and contacts management to create a full productivity suite

✨

Reimagining Email for the AI Era

Prysm Mail represents a significant step forward in how we might interact with email in the age of on-device intelligence. By bringing sophisticated language models directly to the inbox while maintaining a strict commitment to privacy, the project demonstrates how AI can enhance rather than compromise our digital communication tools.

The elegant SwiftUI implementation and thoughtful design choices show that technical sophistication and user experience can evolve hand-in-hand. As local language models continue to improve in efficiency and capability, projects like Prysm Mail point the way toward a future where our software becomes not just more intelligent, but more respectful of both our attention and our privacy.

Try Prysm Mail

Prysm Mail will be available as an open-source project. Explore the innovative approach to email management powered by local AI.

Home