Programmatic email for AI agents via AgentMail API. Create inboxes, send/receive messages, manage threads, webhooks, pods, and custom domains. Use when you need agent email identity, email-based workflows, or real-time email processing.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Programmatic email for AI agents via AgentMail API. Create inboxes, send/receive messages, manage threads, webhooks, pods, and custom domains. Use when you need agent email identity, email-based workflows, or real-time email processing.
version
1.1.0
AgentMail Skill
Purpose: Programmatic email for AI agents via AgentMail API — create inboxes, send/receive messages, manage threads, webhooks, and domains.
Requires AGENTMAIL_API_KEY environment variable. Get your key from https://agentmail.to
Core Concepts
Inbox: Email address (e.g., random123@agentmail.to) that can send/receive
Pod: Container for multiple inboxes with shared domains
Thread: Email conversation (grouped by subject/references)
Message: Individual email in a thread
Draft: Unsent message that can be edited before sending
CLI Wrapper
Use the agentmail-cli script for common operations:
# List inboxes
./scripts/agentmail-cli inboxes list
# Create inbox
./scripts/agentmail-cli inboxes create [--username NAME] [--domain DOMAIN]
# Send email
./scripts/agentmail-cli send --inbox-id ID --to --subject --text
./scripts/agentmail-cli messages list --inbox-id ID
./scripts/agentmail-cli messages get --inbox-id ID --message-id MSG_ID
./scripts/agentmail-cli reply --inbox-id ID --message-id MSG_ID --text
./scripts/agentmail-cli threads list --inbox-id ID
./scripts/agentmail-cli webhooks create --url --events
./scripts/agentmail-cli webhooks list
"email@example.com"
"Hello"
"Body"
# List messages
# Get message
# Reply to message
"Reply body"
# List threads
# Create webhook
"https://..."
"message.received"
# List webhooks
Python SDK (Direct Usage)
from agentmail import AgentMail
client = AgentMail(api_key="YOUR_API_KEY")
# Create inbox
inbox = client.inboxes.create()
print(f"Created: {inbox.address}")
# Send message
response = client.inboxes.messages.send(
inbox_id=inbox.id,
to=["recipient@example.com"],
subject="Hello from Agent",
text="This is the message body",
html="<p>This is the <b>HTML</b> body</p>"# optional
)
# List messages in inbox
messages = client.inboxes.messages.list(inbox_id=inbox.id)
for msg in messages:
print(f"{msg.from_} -> {msg.subject}")
# Reply to a message
client.inboxes.messages.reply(
inbox_id=inbox.id,
message_id=message_id,
text="Thanks for your email!"
)
# Forward a message
client.inboxes.messages.forward(
inbox_id=inbox.id,
message_id=message_id,
to=["another@example.com"]
)
# Create pod
pod = client.pods.create(name="my-project")
# Create inbox in pod
inbox = client.pods.inboxes.create(
pod_id=pod.id,
username="support",
domain="agentmail.to"# or your verified domain
)
# List all inboxes in pod
inboxes = client.pods.inboxes.list(pod_id=pod.id)
Custom Domains
# Register domain
domain = client.domains.create(
domain="mail.yourdomain.com",
feedback_enabled=True
)
# Get DNS records to configure
zone_file = client.domains.get_zone_file(domain_id=domain.id)
# Verify domain after DNS setup
client.domains.verify(domain_id=domain.id)