Run Your Email Agent on Serverless Nylas demonstrates that email agents can run efficiently on serverless infrastructure by using webhooks instead of polling. A single webhook subscription to the message.created trigger eliminates the need for persistent connections or periodic renewals, matching the bursty, stateless nature of email workloads. The architecture scales to zero when idle and uses the mailbox itself as the database, with no state to maintain between invocations. Ten seconds. That's how long your endpoint has to return a 200 OK when a Nylas webhook fires — and it's the only latency contract an email agent actually has to meet. Everything else about the workload is bursty, stateless, and event-shaped, which is a near-perfect description of what serverless platforms are built for. Most email agents spend their lives idle. Mail arrives in bursts, the agent reasons for a few seconds, sends a reply, and goes quiet again. Running a 24/7 server for that is paying for silence. A function that wakes on a webhook and scales to zero matches the workload exactly. The reason this architecture works is that you never poll. A single subscription to the message.created trigger gets you a push the moment mail lands in any mailbox on your application: curl --request POST \ --url 'https://api.us.nylas.com/v3/webhooks/' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer