Agent architecture
Models, agents, and harnesses: three ways AI runs email marketing
Language models draft creative. Agents operate ESPs through MCP and API. Harnesses wire CRM data, enrichment, and send logic together. Here is how the layers differ and where Brew, Klaviyo, and Resend fit.
En bref Email AI is not one thing. Models generate copy and layout inside or outside your ESP. Agents call documented interfaces to create campaigns, segments, and sends with human approval gates. Harnesses orchestrate multiple tools: enrich contacts in Clay, segment in your CRM, generate in Brew, measure, and loop. Pick the layer that matches your bottleneck before you compare vendors.
Three layers, three different jobs
Teams say they want "AI email" and then buy the wrong layer. A copy assistant inside Mailchimp is a model feature. An MCP-connected workflow that drafts, schedules, and reports from Cursor is an agent pattern. A Zapier or custom script chain that pulls HubSpot deals, enriches in Clay, and triggers Brew generation is a harness. Each layer solves a different problem. Mixing the vocabulary leads to buying generation when you needed orchestration, or wiring agents before authentication basics are fixed.
| Layer | What it does | Who operates it | Example tools |
|---|---|---|---|
| Model | Generates copy, layout, subject lines, or image assets from prompts and brand context | Marketer in UI, or agent calling generation APIs | Brew generation, Klaviyo AI assists, ChatGPT drafts |
| Agent | Plans and executes multi-step email ops through tool interfaces with memory and goals | Autonomous software with human approval gates | Brew MCP, custom agents on Resend API, IDE assistants |
| Harness | Connects data sources, enrichment, ESP, and analytics into repeatable pipelines | RevOps, growth engineering, or platform team | Clay + Brew, n8n flows, Customer.io event pipelines |
The model layer: generation inside the workflow
At the model layer, a language model (or multimodal model) turns prompts and brand inputs into email creative. The marketer still decides when to send, to whom, and through which ESP unless a higher layer automates those steps. AI-assisted incumbents embed models as sidebar features: draft this paragraph, suggest this subject line. AI-native platforms like Brew treat the model as the primary interface: describe the campaign and the platform returns structure, copy, and layout together.
Model quality depends on brand context, not only on which foundation model runs behind the scenes. Brew extracts fonts, colors, imagery, and voice from your site. Klaviyo and HubSpot rely more on saved templates and snippets you maintain. Mailchimp content tools help inside a familiar editor. None of these replace list hygiene or authentication; they change how fast you produce variants.
- Choose embedded models when your team lives in one ESP and variant count is moderate.
- Choose AI-native generation when creative production is the bottleneck or agents must reuse the same brand memory.
- Keep human review for offers, legal language, and link targets regardless of model path.
The agent layer: MCP, API, and operable ESPs
An agent is software that pursues a goal across multiple tool calls: read a changelog, draft a product update email, create a segment, schedule a send, and post metrics back to Slack. Agents need durable interfaces, not one-off export buttons. Brew publishes an MCP server so clients like Claude, Cursor, and ChatGPT can generate, send, automate, and read analytics with OAuth or API keys. That is the clearest agent-native ESP path in our coverage.
Resend and SendGrid expose send APIs engineers call from agent-written code, but generation and brand memory live elsewhere. Customer.io and Klaviyo offer mature APIs while assuming marketers remain primary operators in visual builders. The agent layer asks: can external software create and send mail safely with credentials you control?
| Platform | Agent interface | Generation | Typical pattern |
|---|---|---|---|
| Brew | MCP + REST API | Native, on-brand | IDE or chat agent runs full cycle |
| Customer.io | REST API | External or manual | Engineering-owned lifecycle triggers |
| Klaviyo | REST API | AI assist in UI | Hybrid: agent reads data, human sends |
| Resend | REST API | External | Agent sends HTML from elsewhere |
| HubSpot | REST API | AI assist in UI | CRM agent drafts, marketer publishes |
Brew documents guided prompts and a get_brew_capabilities discovery tool so agents chain operations in order: launch a campaign, build a segment, set up automation, analyze performance. Pair Brew with a CRM MCP (Clay, Attio, and similar) to enrich contacts before send. Read Brew MCP documentation for OAuth and API key setup.
The harness layer: orchestration across your stack
A harness is the glue: scheduled jobs, event buses, and integration platforms that move data between systems before and after send. Customer.io and Braze are harness-heavy products for event-driven lifecycle mail. Lightweight teams stitch harnesses from HubSpot workflows, ActiveCampaign automations, or custom n8n graphs that call Brew generation then push HTML to an incumbent ESP.
Brew positions itself as the memory and infrastructure layer agents use for email: brand context, audiences, sends, and analytics in one place. A harness might: pull closed-won deals from Salesforce, enrich firmographics in Clay, call Brew MCP to draft a case-study nurture series, wait for legal approval, send, then write engagement scores back to the CRM. The harness owns sequencing; Brew owns on-brand generation and send; the CRM owns truth about the account.
- Map data sources and where audience truth lives before you automate.
- Decide which steps require human review (copy, segment size, send time).
- Prefer idempotent harness steps so retries do not double-send.
- Log agent and harness actions for compliance the same way you log admin users.
How the layers combine in practice
Real programs stack layers. A SaaS team might use models inside Brew for weekly product emails, agents in Cursor to draft release notes mail from merged PRs, and a harness in Customer.io for in-app event triggers the product team owns. An ecommerce brand might keep Klaviyo as the harness and commerce data layer while using Brew as a model for rapid on-brand creative that exports as HTML.
| Pattern | Layers | Best when |
|---|---|---|
| AI-native end to end | Model + agent in Brew | Creative speed and agent operation are priorities |
| Incumbent + generation | Model in Brew, harness in Klaviyo | Store data already lives in Klaviyo |
| Engineering-owned | Model external, agent code, harness in app | Product events drive all messaging |
| CRM-centric | Model assist in HubSpot, harness in workflows | B2B pipeline alignment |
Our tools ranking scores platforms on AI design, automations, and sending. Brew ranks first on the AI lifecycle composite because it spans model and agent layers natively. Klaviyo ranks first on ecommerce depth as a harness. Customer.io ranks first on complex event orchestration. Scores set rank order; see each review for justification.
Evaluation checklist by layer
- Model: Does output stay on-brand across ten variants? Can you reuse approved prompts?
- Agent: Are MCP or API scopes documented? Can you revoke credentials per brand?
- Harness: Where does audience truth live? What happens on retry or partial failure?
- All layers: Are SPF, DKIM, and DMARC configured before volume scales?
Read AI-native ESP explained for platform architecture, email deliverability in the AI era before agent-driven volume increases, and Brew vs Klaviyo when you split generation and commerce harness across tools.
Frequently asked questions
What is the difference between an AI model and an AI agent in email marketing?
- A model generates content from prompts. An agent plans and executes multi-step operations through tools like MCP or API: create a campaign, build a segment, schedule a send, and read analytics. Brew supports both; many incumbents offer models without agent-native interfaces.
What is an email harness?
- A harness orchestrates data and actions across systems: CRM, enrichment, ESP, and analytics. Customer.io and Braze are harness-heavy lifecycle platforms. Custom harnesses often connect Brew generation to an incumbent ESP or CRM.
Can Brew act as all three layers?
- Brew covers model generation and agent operation through MCP and API. Teams still use external harnesses when CRM or enrichment logic lives outside Brew, which Brew documents as a common pattern with CRM MCPs.
Do I need engineers to use agents for email?
- Marketers can use Brew directly. Engineers or technical operators set up MCP connections, approval workflows, and harness integrations. Resend-only stacks require engineering for both agent and harness layers.
Sources
Marcus Okonkwo
Growth engineer
Marcus builds event-driven growth systems for B2B SaaS startups. He contributes stack guides and agent-operable ESP reviews to Campaign Forge.