We raised $6M in Seed FundingRead more
LovableLovable + AgentMail

Add email to your Lovable app

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.

[ Install ]

One command

The AgentMail TypeScript SDK works in any Lovable project. Add email to your app in minutes - no SMTP config, no email provider setup.

1. Install the SDK
npm install agentmail
2. Add your API key
# Add to your .env file:
AGENTMAIL_API_KEY=am_us_your_key_here
3. Import and use
import AgentMail from "agentmail";

const client = new AgentMail({
  apiKey: process.env.AGENTMAIL_API_KEY!,
});
[ Why email ]

Why your Lovable agent needs its own inbox

No email provider setup

AgentMail handles deliverability, domain management, and inbox provisioning. Your Lovable app just needs an API key.

One inbox per user or agent

Create a dedicated inbox for each user, each agent session, or each workflow. Every inbox gets its own real email address.

Works out of the box

The AgentMail SDK makes standard HTTPS requests. Drop it into any Lovable project without touching infrastructure.

[ Code ]

Working code

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}`);
}
[ FAQ ]

FAQ

Common questions about AgentMail and Lovable.

Does AgentMail work with Lovable?
Yes. The AgentMail TypeScript SDK works in any Node.js environment. Add it to your Lovable project, set your API key, and your app has full email capabilities.
Do I need to configure an email provider?
No. AgentMail handles everything - deliverability, domains, inbox provisioning. You just need an API key from console.agentmail.to.
Can I create one inbox per user?
Yes. Call client.inboxes.create() whenever you need a new inbox. Each one gets a unique email address. Free tier gives you 3 inboxes to start.
Can my app receive emails too?
Yes. Every AgentMail inbox is a real email address that can receive messages. Use webhooks to get notified in real time when new mail arrives.
Is there a free tier?
Yes. Free tier includes 3 inboxes and 3,000 emails per month. No credit card required to start.
Why not just use the Gmail API or SendGrid?
Gmail API requires OAuth and was built for human accounts, not programmatic agent use. SendGrid handles sending only - no receiving, no threading, no reply parsing. AgentMail gives your Lovable agent a dedicated inbox it can create on demand, send from, receive on, and read - with full thread context and no credential sharing.

Give your Lovable agent its own inbox

Free tier. No credit card required. Inboxes ready in under a second.

Start for free

© 2026 AgentMail, Inc. All rights reserved.

Privacy PolicyTerms of ServiceSOC 2Subprocessors