agentmail
Installation
SKILL.md
Troubleshooting
If requests fail, run zero doctor check-connector --env-name AGENTMAIL_TOKEN or zero doctor check-connector --url https://api.agentmail.to/v0/inboxes --method POST
Scenarios
1. Customer Support Agent
An AI agent handles inbound support emails automatically.
- Create a dedicated inbox for support:
POST /v0/inboxeswithusername: "support" - Register a webhook listening for
message.received:POST /v0/webhookswithinbox_idsscoped to the support inbox - When a customer emails
support@agentmail.to, the webhook fires with the message payload - Read the full thread for context:
GET /v0/inboxes/{inbox-id}/threads/{thread-id} - Generate a response with your LLM, then reply in-thread:
POST /v0/inboxes/{inbox-id}/messages/{message-id}/reply - Update labels to track state:
PATCH /v0/inboxes/{inbox-id}/messages/{message-id}withadd_labels: ["replied"],remove_labels: ["unreplied"] - Periodically check for stale threads:
GET /v0/inboxes/{inbox-id}/threads?labels=unrepliedto find conversations that still need attention