Email Agent

Read, classify, and auto-reply to incoming emails with AI-driven classification and outreach drafting.

Email is where founders lose the most hours to work that follows rules. Triage, intro drafts, follow-ups, the reply that says the same thing the last forty replies said. This blueprint is a complete agent that takes that work: it reads the inbox, classifies what matters, drafts outreach, and answers threads on its own.

Everything you need to run it is on this page: the live console it ships with, its full anatomy, the system prompt, the source, and the setup. It deploys in an afternoon.

See it running

This is the console the agent ships with: an inbox where every AI action waits for your approval before it sends. Click into it, it is live.

crescendo.51ultron.com/kits/agent-inbox

The anatomy

An agent is not a prompt. It is a composition: a model, tools it is allowed to call, an integration that gives those tools reach, and guardrails that decide what it may never do alone. This is the whole machine on one card.

Email Agentblueprint
Model
claude-sonnet-4-6
Tools
send_intro_emailread_inboxauto_reply
Integration
AgentMail
Trigger
inbound email, or on request in chat
Memory
thread context plus contact history
Output
sent reply plus one short status line
Guardrails
no invented claims; asks one targeted question when input is missing

The system prompt

Twelve lines. Short on purpose: every rule the agent needs and nothing it could misread. Copy it as a starting point for any operations agent you build, the structure transfers.

Email operations copilot
You are an email operations copilot for early-stage teams. Core workflows: 1) Send intro email: draft concise outreach and call send_intro_email. 2) Review inbox: call read_inbox when user asks to check responses. 3) Auto-reply: call auto_reply to answer the latest inbound or a provided message ID. Rules: - Keep responses concise and execution-focused. - Do not invent product claims or customer facts. - If required input is missing (recipient or user intent), ask one targeted question. - After each send_intro_email call, respond with one short status line. - If any tool returns a failure payload, explain what to fix in plain language.

The source, on disk

Three files carry the whole agent: the agent definition with its three tools, the environment it expects, and the setup. Walk them.

email-agent/email-agent.ts1.4 KB
1import { agent, tool } from "@agent-sdk"
2import { z } from "zod"
3
4const sendIntroEmailInput = z.object({
5 to: z.string().email(),
6 subject: z.string().min(3).max(200),
7 text: z.string().min(10),
8 html: z.string().optional(),
9})
10
11const readInboxInput = z.object({
12 limit: z.number().int().min(1).max(50).optional(),
13})
14
15const autoReplyInput = z.object({
16 text: z.string().min(3),
17 html: z.string().optional(),
18 messageId: z.string().optional(),
19 replyAll: z.boolean().optional(),
20})
21
22export default agent({
23 model: "claude-sonnet-4-6",
24 permissionMode: "bypassPermissions",
25 maxTurns: 12,
26 systemPrompt, // prompt.md, verbatim
27 tools: {
28 send_intro_email: tool({
29 description: "Send an intro/outreach email",
30 inputSchema: sendIntroEmailInput,
31 execute: async ({ to, subject, text, html }) => {
32 // POST /v0/inboxes/{id}/messages/send
33 },
34 }),
35 read_inbox: tool({
36 description: "Read recent inbox messages",
37 inputSchema: readInboxInput,
38 execute: async ({ limit = 10 }) => {
39 // GET /v0/inboxes/{id}/messages?limit={limit}
40 },
41 }),
42 auto_reply: tool({
43 description: "Auto-reply to latest inbound or a specific message",
44 inputSchema: autoReplyInput,
45 execute: async ({ text, html, messageId, replyAll }) => {
46 // POST /v0/inboxes/{id}/messages/{messageId}/reply
47 },
48 }),
49 },
50})

The daily loop

Once deployed, the agent runs the same four-beat loop on every message, all day. You only exist in the approve step of the console above.

01

Receive

Every inbound lands through AgentMail with full thread context.

New threadswebhook, instant
Repliesmatched to history
02

Classify

Priority and intent before anything is written.

Needs a humanflagged, untouched
Routineagent handles it
03

Act

Drafts, replies, and follow-ups within its guardrails.

Intro emailson request
Auto-replieslatest or by thread
Follow-upsno reply in 72h
04

Report

One status line per action, receipts in the console.

Status linesper send
Inbox summaryon demand

The business case

If you run an agency, this blueprint is also a product. Email operations is the first thing every client wants off their plate, and the numbers work at very small scale.

$2,500

setup fee you can charge

$400/mo

retainer per client

15h+

email ops saved weekly

Ship it

The whole install is five commands and three keys. Run the list, and use the first-run ritual in setup.md to prove the loop end to end before you point it at a real inbox.

Deploy checklist

0 of 6

That is the entire blueprint: one model, three tools, one integration, and guardrails that keep it honest. Built by hand it costs you an afternoon of cloning, keys, and deploys. Inside Ultron it costs you a sentence, because you can build this exact agent in the workforce and watch it come alive before you wire anything.

Build the Email Agent in Ultron

1
Describe what you want

Start from this blueprint or your own words. Ultron reads the intent and picks the tools.

2
It builds the agent

The model, the three tools, the prompt, the console. Assembled in front of you, nothing to wire.

3
Watch it run

Test it live against a real thread, then put it to work. You review a feed, it handles the inbox.

Keep reading