
Agentmail Sdk
This is the SDK guide for AgentMail, an email API built specifically for AI agents that need real inboxes, not just transactional sending. You get instant two-way email addresses, thread management, and reply extraction that automatically strips quoted text so your agent only sees the new content. The standout feature is the agent sign-up flow that lets you create accounts and get API keys entirely from code, no console required. It covers Python and TypeScript SDKs with examples for sending, receiving, drafts for human-in-the-loop approval, WebSocket notifications, and multi-tenant pods. If you're building agents that need to handle email conversations programmatically, this gives you the full workflow without dealing with IMAP parsing or Gmail OAuth headaches.
- skills.sh installs
- 778
- GitHub stars
- 26
- last updated
- Aug 21, 2026
Install
$ npx -y skills add agentmail-to/agentmail-skills --skill agentmail-sdk --agent claude-codeInstalls into .claude/skills of the current project.
Files
AgentMail SDK
AgentMail is an API-first email platform for AI agents. Use the published SDK interfaces and generated API types as the source of truth. Keep credentials in AGENTMAIL_API_KEY.
npm install agentmail
pip install agentmail
Quick start
Create an inbox, send, and read a reply. Full per-language usage lives in the references.
import { AgentMailClient } from "agentmail";
const client = new AgentMailClient({ apiKey: process.env.AGENTMAIL_API_KEY });
const inbox = await client.inboxes.create({ username: "support", clientId: "support-v1" });
await client.inboxes.messages.send(inbox.inboxId, {
to: ["customer@example.com"],
subject: "Hello",
text: "Plain-text body",
});
// .list() returns metadata only — fetch the full message to read the body.
const messages = await client.inboxes.messages.list(inbox.inboxId, { limit: 20 });
const message = await client.inboxes.messages.get(inbox.inboxId, "msg_123");
const body = message.extractedText ?? message.text ?? message.extractedHtml ?? message.html;
from agentmail import AgentMail
from agentmail.inboxes.types import CreateInboxRequest
Sponsors
Details
- Repository
- github.com/agentmail-to/agentmail-skills
- Category
- Python
- First seen
- Jun 3, 2026