Agent Email Quickstart
Give your agent a sender that lives in your AWS account.
Wire Wraps into your agent's tool calls. The infrastructure lives in your AWS account; the agent just calls a typed function.
What you'll build
Time: ~5 minutes
Before you begin, make sure you have:
The CLI deploys SES, DKIM, bounce handling, and EventBridge event processing into your AWS account. Same command as the base email quickstart.
npx @wraps.dev/cli email initInstall @wraps.dev/email in the package where your agent code lives:
npm install @wraps.dev/email
Wrap wraps.emails.send() in a typed function. The same shape registers as a tool in any major agent framework.
import { Wraps } from "@wraps.dev/email";const wraps = new Wraps();// The shape works for any agent framework.// LangGraph: register as a tool. Vercel AI SDK: pass to tool({}).// Mastra: wrap with createTool. The signature stays the same.export async function sendEmailTool(input: { to: string; subject: string; html: string;}) { const result = await wraps.emails.send({ from: "agent@yourdomain.com", to: input.to, subject: input.subject, html: input.html, }); if (!result.success) { throw new Error(`Email failed: ${result.error.message}`); } return { messageId: result.data.messageId };}Credentials
The SDK resolves AWS credentials from your environment — the same chain the AWS CLI uses. Your agent never sees an API key; it calls a function.
Add Context7 to your MCP config so Claude Code, Cursor, Windsurf, or any MCP-compatible editor can pull the latest Wraps docs into context. Prevents hallucinated APIs.
{ "mcpServers": { "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"] } }}Full setup (per-editor instructions, library IDs) in the Context7 guide.
Every method, option, and response shape your agent can call.
View SDK DocsManage, inspect, and destroy the infrastructure your agent uses.
View CLI Docs