What this prompt does
This prompt has the model act as a senior AI automation engineer and specify an email triage and auto-reply agent tightly enough to build, returning code architecture and prompts rather than pseudocode hand-waving. You set the [provider], the triage [categories], the [task_system], and the [reply_tone], and it returns ingestion, a classifier, draft replies, a follow-up scheduler, action-item extraction, and guardrails.
The structure works because it keeps drafts in a human-review queue and never auto-sends. Ingestion polls or webhooks from [provider] and deduplicates threads; the classifier sorts each email into [categories] with a confidence score; reply drafting in [reply_tone] stays review-only; the follow-up scheduler nudges ignored threads; and action items become tasks in [task_system]. Guardrails redact secrets, skip low-confidence sends, and log every decision. The confidence score is what ties the pieces together: it lets the system route uncertain emails for closer review and avoid surfacing noisy, low-quality drafts that a human would just have to discard.
When to use it
- You want to automate an inbox without risking the wrong reply going out.
- You need emails classified into your own
[categories]with confidence scores. - You want drafted replies held in a review queue, never auto-sent.
- You need ignored threads nudged after a set interval.
- You want action items turned into tasks in
[task_system]automatically. - You need guardrails that redact secrets and log every decision.
- You want one agent handling triage, drafting, follow-ups, and task creation together.
Example output
Expect the code architecture, the data flow, and every prompt template. That includes the ingestion path for [provider] with deduplication, the classifier prompt that scores emails into [categories], the [reply_tone] drafting prompt that stays in a review queue, the follow-up scheduler, the action-item extraction that creates tasks in [task_system], and the guardrail layer for redaction, low-confidence handling, and decision logging. Each prompt template is concrete enough to wire into your runtime rather than a placeholder, so you can adapt tone and categories without rebuilding the flow.
Pro tips
- Lock reply drafting to review-only before anything else — an agent that auto-sends the wrong reply costs more trust than it saves time.
- Define
[categories]to match how you actually triage (e.g.urgent, question, FYI, spam) so the classifier's confidence scores mean something. - Set
[provider]to your real access method (e.g. Gmail via API) so ingestion uses polling or webhooks correctly. - Tune
[reply_tone]to your voice; a generic tone produces drafts you'll rewrite anyway. - Wire
[task_system]to where work actually lives so extracted action items don't get lost. - Use the confidence score to skip low-confidence drafts rather than queuing noise for human review.