All projects

Agentic AIStatus: Prototype

Email Digital Twin

AI-powered email persona and draft engine for Gmail workflows.

A look inside

4 screens from the real build. Select any to see it full size.

The extension adds this panel to the bottom-right corner of Gmail: Build Persona, Draft Reply, sign-out, and the connected account. It is shown signed out, on a blank stand-in page instead of a real inbox.
Build Persona asks how many sent emails to learn from, between 5 and 50. On Start, the extension reads that many sent messages from the past year through the read-only Gmail API and sends their text to the server for style analysis.
After Start, the status line and the progress panel follow each phase: listing, fetching messages one by one, analyzing, done. This is the first phase, captured while the extension waits for Google sign-in.
The Node server has a health check and two routes, /persona/build and /drafts/generate. Each route has its own prompt file and calls Gemini 2.5 Flash, and both reject incomplete requests before any model call. Here it runs on a local test port with no Gemini key.

Overview

Analyzes sent-email history to model tone, formality, and structure, then generates reply drafts that mirror the user's communication style.

The problem

Generic AI email replies rarely match a person's actual writing habits, creating drafts that require heavy editing before they feel usable.

What I built

Designed the product flow, OAuth-backed email analysis path, backend integration, and prompt structure for reply generation.

What it does

  • Email history analysis
  • Tone and formality modeling
  • Formal, concise, casual, and context-adjusted drafts

System and architecture

A Chrome Extension and Node.js backend authorize Gmail access, analyze sent-mail writing signals, and generate multiple draft styles with Gemini.

Chrome Extension with a Node.js backend. OAuth2 authorizes Gmail access, sent mail is analyzed for behavioral writing signals, and Gemini generates Formal, Concise, Casual, and Context-Adjusted variants.

System map4 layers
  1. Interface
  2. Security & identity
  3. API & services
  4. AI & models
  • OAuth2-backed Gmail integration
  • Recursive MIME extraction and PII-safe writing-persona analysis
  • Multiple draft variants for different reply contexts

Technology

  • Chrome Extension
  • Node.js
  • OAuth2
  • Gmail API
  • Gemini
  • NLP

Themes

  • AI email
  • Persona modeling
  • Prompting

Challenges and trade-offs

  • Keeping AI-generated replies useful without overstating persona accuracy.
  • Handling private email data through an explicit OAuth-based flow.

Outcome

At a glance

Chrome Extension · OAuth2 Gmail API · 4 draft variants · Gemini LLM

  • Built a working prototype for personalized AI email drafting.
  • Integrated real Gmail API access instead of relying on pasted sample text.
  • Made generated drafts easier to compare by producing multiple variants.

Learnings

  • Personalized AI products need clear user control and fallback paths.
  • Prompt quality improves when generation is grounded in concrete behavior signals.

Next steps

  • Add stronger privacy controls and explicit local/remote processing boundaries.