Resend - AI SDK Tools

A collection of AI SDK tools that give your AI agents the ability to send and manage emails using Resend.
Installation
npm install resend-ai-sdk
Setup
Set the following environment variables:
RESEND_API_KEY="your_resend_api_key"
RESEND_EMAIL_DOMAIN="your_verified_domain.com"
Get your API key from the Resend Dashboard.
You'll also need to verify your domain to send emails.
Usage
import { generateText, stepCountIs } from "ai";
import { sendEmail, listTemplates, getTemplate } from "resend-ai-sdk";
const { text } = await generateText({
model: 'openai/gpt-5.2',
tools: { sendEmail, listTemplates, getTemplate },
prompt: "Find my welcome template and send it to user@example.com from hello@acme.com",
stopWhen: stepCountIs(5),
});
Available Tools
sendEmail | Send an email with HTML, plain text, or a template |
sendBatchEmails | Send multiple emails at once (up to 100) |
getEmail | Retrieve the status and metadata of a sent email |
listEmails | List recently sent emails |
listTemplates | List available email templates with pagination |
getTemplate | Retrieve a template's content, variables, and metadata |
createContact | Add a new contact to your Resend account |
listContacts | List contacts in your account |
removeContact | Remove a contact permanently (requires approval) |
AI SDK Library
Find other AI SDK agents and tools in the AI SDK Library.
Resources
Contributing
Contributions are welcome! Please read our Contributing Guide for more information.
License
MIT License
Author
Ben Sabic at Flash Brew Digital