agentmail-sdk
v1.1.0
Published
TypeScript SDK for AgentMail - Email infrastructure for AI agents
Maintainers
Readme
AgentMail SDK
Official SDK for the AgentMail API — email infrastructure built for AI agents.
Installation
npm install @agentmail/sdkQuick Start
import { AgentMail } from "@agentmail/sdk";
const agent = new AgentMail({
apiKey: "am_sk_live_...",
baseUrl: "https://api.agentmail.to/v1",
});
// Create an inbox
const inbox = await agent.inboxes.create({
username: "support",
domain: "yourdomain.com",
});
// Send an email
await agent.emails.send({
from_inbox_id: inbox.id,
to: ["[email protected]"],
subject: "Hello",
body: "Sent programmatically from an AI agent",
});
// Listen for incoming emails
agent.ws.listen(inbox.id, {
onEmailReceived: async (email) => {
console.log("New email:", email.subject);
},
});Features
- Programmatic Inboxes — Create real email addresses via API
- Send & Receive — Full email lifecycle with webhooks and WebSockets
- Semantic Search — Find emails by meaning, not just keywords
- Custom Domains — Bring your own domain with automated DNS
- MCP Server — Native integration with Claude, Cursor, and ChatGPT
Documentation
Full API documentation: https://api.agentmail.to/docs
License
MIT
