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-code

Installs 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

More from agentmail-to/agentmail-skills

All 7

Recommended

More Python
1alirezarezvani avatarsql-database-assistantalirezarezvani/claude-skillsUse when the user asks to write SQL queries, optimize database performance, generate migrations, explore database schemas, or work with ORMs like Prisma, Drizzl763skills.sh installs
2alirezarezvani avatarperformance-profileralirezarezvani/claude-skillsSystematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks, generates flamegraphs, analyzes bundle s750skills.sh installs
3zxkane avataraws-serverless-edazxkane/aws-skillsAWS serverless and event-driven architecture expert based on Well-Architected Framework. Use when building serverless APIs, Lambda functions, REST APIs, microse738skills.sh installs
4posit-dev avatarrelease-postposit-dev/skillsCreate professional package release blog posts following Tidyverse or Shiny blog conventions. Use when the user needs to: (1) Write a release announcement blog 737skills.sh installs
5alirezarezvani avatarcustomer-success-manageralirezarezvani/claude-skillsMonitors customer health, predicts churn risk, and identifies expansion opportunities using weighted scoring models for SaaS customer success. Use when analyzin729skills.sh installs
6inference-sh avatarbuilding-inferencesh-appsinference-sh/skillsBuild and deploy applications on inference.sh. Use when getting started, understanding the platform, creating apps, configuring resources, or needing an overvie729skills.sh installs