跳到正文
DEV Community· Avrojit Dutta·· 3 小時前AI 評分41

ReplyLater:讓電郵收件箱在夜間整理,助你重拾私人時間

ReplyLater: I Gave My Inbox the Night Shift to Reclaim My Me Time

AI 導讀

ReplyLater 是一款以本機優先、開源的 AI 電郵協作工具,將未讀電郵整理成下週待辦,讓用戶稍後檢視分類結果和回覆草稿。它使用透過 Ollama 本機執行的 Gemma 2B,可分類電郵、擷取承諾及草擬回覆;遇到缺失資訊時會標示不確定性,而非自行編造答案。郵件內容用於推理時無須傳送至第三方模型 API,但私隱保障取決於實際部署和設定。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

ReplyLater: The Overnight Email Co-Pilot

The Sloth Philosophy: Sloths don't hurry, stress over backlogs, or react to every stimulus in real time. They pace themselves, conserve their energy, and let the world catch up.

Go to sleep with an inbox full of obligations. Wake up with next week's replies ready.

What I Built

ReplyLater is a local-first, open-source AI co-pilot that turns a chaotic email backlog into an organized, week-ahead action board.

Most AI email tools compete for your attention while you're already trying to read and respond. ReplyLater takes a different approach: batch the work, let it run in the background, and review the results when you're ready.

The workflow is simple:

  1. Import an unread .eml backlog or email export.
  2. Let ReplyLater process the conversations.
  3. Review the results in three buckets:
    • Needs Your Call: Emails that need your judgment or missing information.
    • Week-Ahead Queue: Reply drafts and extracted commitments organized for the coming week.
    • Info / Closed: Receipts, digests, and other messages that don't need a reply.

ReplyLater can classify messages, extract commitments such as “Send the revised design deck by 2 PM,” identify unanswered questions, and prepare reply drafts. When key information is missing, it is designed to flag the uncertainty rather than invent an answer.

The people who benefit are anyone who ends the week with an inbox full of obligations: students, freelancers, developers, and busy professionals who want to spend less energy on inbox triage and more time on meaningful work.

Demo

The hosted demo may have different privacy characteristics from a local installation. Use synthetic or non-sensitive email samples when testing a hosted instance unless its data-handling behavior has been verified.

Code

The project is organized around a React dashboard, a FastAPI backend, local model inference, durable workflow orchestration, and persistent semantic memory.

How I Built It

ReplyLater is built as a modular, local-first application:

  • Frontend: React, Vite, Tailwind CSS, Lucide Icons, and TanStack Query.
  • Backend: FastAPI, Python, and SQLAlchemy Async.
  • Open-weight AI: Google's Gemma 2B (gemma2:2b), running locally through Ollama.
  • Durable orchestration: The Temporal Python SDK (temporalio).
  • Semantic memory / RAG: PostgreSQL with pgvector, using Tiger Data.
  • Observability: Sentry Python SDK with custom inference and workflow spans.

Architecture

+------------------------------------------------------+
|                React + Vite Dashboard                |
|    Needs Your Call | Week-Ahead Queue | Info/Closed  |
+----------------------------+-------------------------+
                             |
                         REST API
                             |
+----------------------------v-------------------------+
|                    FastAPI Backend                   |
+------------+-------------------+---------------------+
             |                   |
      +------v------+     +------v------+     +----------------+
      |  Temporal   |     | Local Gemma |     |   PostgreSQL   |
      |  Workflow   |<--->| via Ollama  |<--->|   + pgvector   |
      | & Activities|     |             |     |                |
      +------+------+     +-------------+     +----------------+
             |
      +------v-------------------------------------------+
      |             Sentry Observability                |
      |          Custom spans, latency, errors          |
      +--------------------------------------------------+

The key design principle is separation of concerns: Temporal coordinates long-running work, FastAPI exposes application functionality, Gemma handles language tasks, PostgreSQL stores persistent data, and Sentry helps diagnose failures.

Gemma: Triage and drafting

Gemma supports two main tasks:

  1. Triage and extraction: Classifies emails, identifies urgency, extracts commitments, and suggests a target weekday.
  2. Drafting with honest uncertainty: When an email requests information the system cannot verify—such as an hourly rate or meeting availability—it can flag the missing detail and route the message to Needs Your Call instead of guessing.

Temporal: Overnight orchestration

Local batch processing can be interrupted by inference delays, hardware limits, or other transient failures. Temporal's OvernightEmailPrepWorkflow coordinates the process through separate activities for parsing, semantic retrieval, extraction, and draft staging.

Configured retry policies help recover from transient failures, while controlled concurrency helps avoid exhausting local CPU or GPU resources.

Sentry: Observability

Sentry is used to help inspect inference and workflow behavior, including custom spans, execution latency, activity transitions, and Ollama HTTP errors. Token counts are tracked where available.

Tiger Data / pgvector: Semantic memory

PostgreSQL and pgvector provide a semantic retrieval layer. Relevant sent-email examples can help the system condition drafts on a user's preferred greetings, phrasing, and sign-offs.

Why Does Open Innovation Matter?

Email contains some of our most sensitive information: personal correspondence, financial documents, travel plans, health messages, and work commitments. Sending all of that content to a hosted AI API should not be the default.

Open-weight models and open-source infrastructure made a local-first architecture possible:

  • Local inference: Gemma runs through Ollama on the configured machine, so email content used for inference does not need to be sent to a third-party model API.
  • Fewer recurring costs: Local inference avoids per-token charges from hosted model APIs.
  • Data control: Users can keep imported emails and writing samples in their own environment, depending on their deployment and configuration.
  • Inspectable orchestration: Temporal workflows make the processing stages and retry behavior explicit.
  • Flexible infrastructure: PostgreSQL and pgvector provide a foundation for semantic retrieval without locking the project to a single proprietary AI platform.

This is not a claim that every deployment has zero network traffic. Privacy depends on the actual configuration, including telemetry, hosting, and any external integrations. The goal is to make local processing practical and keep private correspondence out of hosted model inference by design.

The Lazy Payoff

The point of ReplyLater is not to make people answer email faster every minute of the day. It is to reduce the number of decisions waiting for them when they sit down to work.

In a test run using 30 .eml messages, the observed results were:

Metric Result
Total processed emails 30
Total batch execution time 3 min 48 sec
Average inference latency 2.82 seconds per message
Emails requiring replies 18
Messages routed to “Needs Your Call” 5
Receipts/digests auto-archived 7
External email-content egress during local inference 0 KB under the tested configuration

These are results from one test corpus, not a universal performance guarantee. The missing-information precision result should be interpreted in the context of the sample and labeling method.

The intended payoff is a calmer start to the week: fewer repetitive triage decisions, commitments surfaced before they are forgotten, and drafts ready for human review. ReplyLater stages drafts; it is not intended to send messages without the user's review.

Prize Categories

ReplyLater is intended for the following partner categories, based on the technologies used:

  • Gemma: Local open-weight language model for email triage, commitment extraction, and draft generation.
  • Temporal: Durable orchestration for overnight processing workflows.
  • Sentry: Observability and tracing for inference and workflow execution.
  • Tiger Data: PostgreSQL and pgvector-based semantic memory.

Please confirm these categories match the challenge's official eligibility and submission rules before publishing.

Final Thoughts

Technology shouldn't just accelerate how quickly we react; it should protect our attention and conserve our energy.

With open-weight models like Gemma, durable orchestration through Temporal, and observability from Sentry, ReplyLater explores a calmer way to handle the inbox: prepare the work while you rest, then let a human make the final call.

Shut your laptop. Get some sleep. Let ReplyLater prepare Monday morning.


來源:DEV Community · dev.to