AgentMail is the fastest way to give a Lovable agent its own email inbox. Every user or agent gets a dedicated inbox, created programmatically - no email provider configuration required.
The AgentMail TypeScript SDK works in any Lovable project. Add email to your app in minutes - no SMTP config, no email provider setup.
npm install agentmail# Add to your .env file:
AGENTMAIL_API_KEY=am_us_your_key_hereimport AgentMail from "agentmail";
const client = new AgentMail({
apiKey: process.env.AGENTMAIL_API_KEY!,
});AgentMail handles deliverability, domain management, and inbox provisioning. Your Lovable app just needs an API key.
Create a dedicated inbox for each user, each agent session, or each workflow. Every inbox gets its own real email address.
The AgentMail SDK makes standard HTTPS requests. Drop it into any Lovable project without touching infrastructure.
import AgentMail from "agentmail";
const client = new AgentMail({ apiKey: process.env.AGENTMAIL_API_KEY! });
// Create a dedicated inbox for this agent
const inbox = await client.inboxes.create();
console.log("Agent inbox:", inbox.inboxId);
// agent-abc123@agentmail.to
// Send an email
await client.inboxes.messages.send({
inboxId: inbox.inboxId,
to: "user@example.com",
subject: "Hello from your agent",
text: "This was sent by your Lovable app via AgentMail.",
});
// Check for replies
const messages = await client.inboxes.messages.list({ inboxId: inbox.inboxId });
for (const msg of messages.messages ?? []) {
console.log(`${msg.fromAddress}: ${msg.subject}`);
}Common questions about AgentMail and Lovable.
Free tier. No credit card required. Inboxes ready in under a second.
Start for free© 2026 AgentMail, Inc. All rights reserved.