# Designing for Agents — Zeno Rocha, Resend

## Executive summary

This deep dive explores the infrastructure and strategic decisions behind building a modern email platform (Resend). The discussion highlights the shift from traditional, IP-based deliverability models to complex, domain-based reputation management. Key architectural takeaways include adopting an API-first, developer-centric approach, building multi-channel communication platforms, and integrating advanced agent capabilities via the Messaging Connector Protocol (MCP). The conversation also addresses the challenges of scaling support, optimizing for AI-driven search (AEO), and managing the technical debt inherent in complex, regulated industries like email.

## Key takeaways

- Domain-Based Reputation is Key: Email reputation has shifted from being primarily IP-based to being domain-based. To mitigate risk, platforms must encourage users to segment communication using multiple subdomains (e.g., `transactions.resend.com` vs. `marketing.resend.com`) to prevent a single abusive sender from damaging the entire domain's reputation.
- The Necessity of API-First Design: The platform philosophy is to be 'formless' and API-first, ensuring that the product can support any future use case without needing to rebuild the core infrastructure. This approach is crucial for integrating with modern development environments and agents.
- Agent Integration via MCP: The Messaging Connector Protocol (MCP) is positioned as a critical feature for the next generation of developer tools. The adoption of MCP is accelerating, with the platform building out 80+ named tools to maximize utility and coverage for agents.
- Scaling and Observability Challenges: Scaling support and infrastructure requires moving beyond simple staffing increases. The discussion emphasizes the need for deep observability into the entire email lifecycle—from sending to final delivery status (e.g., knowing if an email landed in the Promotions tab)—to provide true value to users.

## Technical details

- Email Deliverability & Throttling: High-volume email sending requires respecting mailbox provider rules (e.g., Gmail). Sending 100,000 emails must be managed in batches and spaced out across different IP blocks to avoid throttling. The system must analyze engagement metrics (opens, deletes, archives) to dictate the sending queue.
- Architecture and Development Stack: The platform utilizes a headless backend architecture, separating the API from the frontend components (like React Email). The architecture is designed for maximum reusability, allowing developers to build the UI using components while the core logic remains in a private API.
- Cloud Infrastructure Complexity (AWS): Building a robust service on AWS requires integrating multiple services (SNS for events, CloudWatch for logs, SQS for queues, etc.). This creates a significant operational footprint that must be managed to handle the high volume of event data generated by a communication platform.
- AI/Agent Interaction: The platform is designed to support agentic workflows, allowing agents to perform complex actions like reading pricing in Markdown, setting up accounts, and sending emails programmatically. The focus is on making the API the primary interface for these automated tasks.

## Practical implications

- Prioritize building a robust, public API layer over complex frontend widgets to ensure maximum utility for agents and external integrations.
- When designing infrastructure, anticipate the need for multiple, segregated subdomains to manage reputation and mitigate risk from abusive users.
- Focus on developer experience (DX) by providing SDKs and documentation for every major language and environment, even if the user base for that language is small.
- For high-volume services, plan for complex event handling using multiple cloud services (e.g., SQS, CloudWatch) rather than relying on a single monolithic database or service.

## Topics

Email Infrastructure, API Design, Agentic Workflows, Deliverability, Cloud Architecture, AEO (Answer Engine Optimization), React Email, Resend, AWS, Messaging Connector Protocol (MCP)

Source: https://www.youtube.com/watch?v=bdIoODXsu8k
