Token导航 LogoToken导航

Agent Skill · 研究检索

agentmail(agentmail 邮件管理)

agentmail 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

agentmail 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 41,306。

总安装 1,187周安装 48GitHub Stars 56下载 372核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agentmail(agentmail 邮件管理)
来源仓库:https://github.com/vm0-ai/vm0-skills
仓库路径:skills/agentmail
安装命令:
npx skills add https://github.com/vm0-ai/vm0-skills --skill agentmail
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vm0-ai/vm0-skills --skill agentmail

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

agentmail 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于需要根据关键词或任务场景从来源线索中获取信息的场景。通过 npx skills add 命令从 GitHub 仓库安装并使用。

安装前建议确认权限范围和维护状态,注意可能触发联网或文件读写操作。可结合原始 README 进一步核验具体用法和功能细节。

来源仓库内路径:skills/agentmail

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vm0-ai/vm0-skills --skill agentmail;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

agentmail 怎么安装?

在终端执行 npx skills add https://github.com/vm0-ai/vm0-skills --skill agentmail。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

agentmail 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

agentmail 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

agentmail 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

agentmail 用的人多吗?

公开数据是累计安装 1,187 次,近一周安装 48 次,下载 372 次,GitHub 56 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

agentmail 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
agentmail

agentmail 邮件管理 · 本页

1,18756需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

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.

  1. Create a dedicated inbox for support: POST /v0/inboxes with username: "support"
  2. Register a webhook listening for message.received: POST /v0/webhooks with inbox_ids scoped to the support inbox
  3. When a customer emails support@agentmail.to, the webhook fires with the message payload
  4. Read the full thread for context: GET /v0/inboxes/{inbox-id}/threads/{thread-id}
  5. Generate a response with your LLM, then reply in-thread: POST /v0/inboxes/{inbox-id}/messages/{message-id}/reply
  6. Update labels to track state: PATCH /v0/inboxes/{inbox-id}/messages/{message-id} with add_labels: ["replied"], remove_labels: ["unreplied"]
  7. Periodically check for stale threads: GET /v0/inboxes/{inbox-id}/threads?labels=unreplied to find conversations that still need attention

2. Sales Outreach with Scheduled Follow-ups

An AI agent sends personalized cold emails and manages follow-up sequences.

  1. Create an inbox per sales campaign: POST /v0/inboxes with client_id: "campaign-q1" for idempotency
  2. Send initial outreach: POST /v0/inboxes/{inbox-id}/messages/send with personalized subject/body
  3. Create scheduled follow-up drafts for non-responders: POST /v0/inboxes/{inbox-id}/drafts with send_at set to 3 days later
  4. Register a webhook for message.received to detect replies
  5. When a prospect replies, cancel the scheduled draft: DELETE /v0/inboxes/{inbox-id}/drafts/{draft-id}
  6. Monitor delivery health: GET /v0/metrics?event_types=message.bounced&event_types=message.complained to detect reputation issues early

3. Document Processing Pipeline

An AI agent receives documents via email, processes them, and sends results back.

  1. Create an inbox: POST /v0/inboxes with username: "doc-processor"
  2. Set up a webhook for message.received
  3. When an email arrives with attachments, the webhook payload includes attachment metadata
  4. Download the attachment: GET /v0/inboxes/{inbox-id}/messages/{message-id}/attachments/{attachment-id} → returns a temporary download_url
  5. Download and process the file (OCR, summarization, data extraction, etc.)
  6. Reply with results: POST /v0/inboxes/{inbox-id}/messages/{message-id}/reply including processed output in the body or a new attachment

4. Multi-Agent Team Coordination

Multiple AI agents each have their own inbox, organized by team.

  1. Create a pod for the team: POST /v0/pods with name: "Research Team"
  2. Create an inbox per agent with pod_id: POST /v0/inboxes for each agent (e.g. researcher-1, researcher-2, summarizer)
  3. Set up per-inbox webhooks to route events to each agent's handler: POST /v0/webhooks with inbox_ids scoped per agent
  4. Agents send emails to each other using their @agentmail.to addresses for inter-agent communication
  5. List all inboxes in the pod for oversight: GET /v0/inboxes filtered by pod

5. Human-in-the-Loop Draft Approval

An AI agent drafts emails for human review before sending.

  1. Create a draft with the AI-generated content: POST /v0/inboxes/{inbox-id}/drafts
  2. Notify the human reviewer (via Slack, UI, etc.) with the draft ID
  3. Human reviews the draft: GET /v0/inboxes/{inbox-id}/drafts/{draft-id}
  4. If approved, send the draft: POST /v0/inboxes/{inbox-id}/drafts/{draft-id}/send
  5. If changes needed, update and re-review: PATCH /v0/inboxes/{inbox-id}/drafts/{draft-id} with revised content
  6. If rejected, delete the draft: DELETE /v0/inboxes/{inbox-id}/drafts/{draft-id}

6. Ephemeral Inboxes for One-off Tasks

Create disposable inboxes for short-lived tasks, then clean up.

  1. Create a temporary inbox with client_id tied to the task ID: POST /v0/inboxes with client_id: "task-abc123"
  2. Use the inbox to send/receive emails for this specific task (e.g. verifying an account, requesting info from an external party)
  3. Poll or webhook for responses
  4. When the task is complete, delete the inbox: DELETE /v0/inboxes/{inbox-id} — all associated threads and messages are cleaned up

7. Email Monitoring and Analytics

Track email delivery health across all agent inboxes.

  1. Query delivery metrics over a time range: GET /v0/metrics?start_timestamp=...&end_timestamp=...
  2. Filter by event type to find problems: GET /v0/metrics?event_types=message.bounced&event_types=message.rejected
  3. If bounce rates are high, investigate specific inboxes using GET /v0/inboxes/{inbox-id}/messages?labels=bounced
  4. Set up a webhook for message.bounced and message.complained to get real-time alerts on deliverability issues

8. Inbound Lead Qualification

An AI agent triages inbound emails and routes them appropriately.

  1. Create an inbox as the public-facing entry point: POST /v0/inboxes with username: "hello"
  2. Register a webhook for message.received
  3. When a new email arrives, use your LLM to classify intent (sales inquiry, support request, partnership, spam)
  4. Label the message by category: PATCH /v0/inboxes/{inbox-id}/messages/{message-id} with add_labels: ["sales-lead"]
  5. Send an auto-acknowledgment: POST /v0/inboxes/{inbox-id}/messages/{message-id}/reply
  6. Forward to the right team by sending a new email from a different inbox or notifying via webhook
  7. Review unhandled messages: GET /v0/inboxes/{inbox-id}/messages?labels=needs-review

Inboxes

Create Inbox

curl -s -X POST "https://api.agentmail.to/v0/inboxes" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d '{"username": "my-agent", "display_name": "My Agent"}' | jq .

Create with idempotent client_id (safe to retry without creating duplicates):

curl -s -X POST "https://api.agentmail.to/v0/inboxes" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d '{"username": "my-agent", "display_name": "My Agent", "client_id": "my-agent-inbox"}' | jq .

List Inboxes

curl -s "https://api.agentmail.to/v0/inboxes" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

With pagination:

curl -s "https://api.agentmail.to/v0/inboxes?limit=10" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Get Inbox

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Update Inbox

curl -s -X PATCH "https://api.agentmail.to/v0/inboxes/{inbox-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d '{"display_name": "New Name"}' | jq .

Delete Inbox

curl -s -X DELETE "https://api.agentmail.to/v0/inboxes/{inbox-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN"

Messages

Send Email

Write to /tmp/agentmail_request.json:

{
  "to": ["recipient@example.com"],
  "subject": "Hello from my agent",
  "text": "Plain text body",
  "html": "<p>HTML body</p>"
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages/send" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

Send Email with CC/BCC

Write to /tmp/agentmail_request.json:

{
  "to": ["recipient@example.com"],
  "cc": ["cc@example.com"],
  "bcc": ["bcc@example.com"],
  "subject": "Hello",
  "text": "Plain text body",
  "html": "<p>HTML body</p>"
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages/send" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

Send Email with Labels

Write to /tmp/agentmail_request.json:

{
  "to": ["recipient@example.com"],
  "subject": "Hello",
  "text": "Plain text body",
  "labels": ["outreach", "onboarding"]
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages/send" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

Send Email with Attachment

Write to /tmp/agentmail_request.json:

{
  "to": ["recipient@example.com"],
  "subject": "Report attached",
  "text": "Please find the report attached.",
  "attachments": [
    {
      "filename": "report.txt",
      "content_type": "text/plain",
      "content": "<base64-encoded-content>"
    }
  ]
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages/send" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

To base64 encode a file:

base64 -w 0 /path/to/file.pdf

Reply to Message

Write to /tmp/agentmail_request.json:

{
  "text": "Thanks for your message!",
  "html": "<p>Thanks for your message!</p>"
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages/{message-id}/reply" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

Reply All

Write to /tmp/agentmail_request.json:

{
  "reply_all": true,
  "text": "Thanks everyone!",
  "html": "<p>Thanks everyone!</p>"
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages/{message-id}/reply" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

List Messages

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

With filters:

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages?labels=unreplied&limit=10" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Get Message

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages/{message-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Update Message Labels

Write to /tmp/agentmail_request.json:

{
  "add_labels": ["replied"],
  "remove_labels": ["unreplied"]
}

Then run:

curl -s -X PATCH "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages/{message-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

Get Message Attachment

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/messages/{message-id}/attachments/{attachment-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Returns a download_url (temporary pre-signed URL) and expires_at. Download the file:

curl -s -o attachment.bin "{download-url}"

Threads

List Threads

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/threads" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

With filters:

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/threads?labels=unreplied&after=2025-01-01T00:00:00Z&limit=10" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Get Thread

Returns thread with all messages ordered by timestamp ascending:

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/threads/{thread-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Get Thread Attachment

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/threads/{thread-id}/attachments/{attachment-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Delete Thread

curl -s -X DELETE "https://api.agentmail.to/v0/inboxes/{inbox-id}/threads/{thread-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN"

Drafts

Create Draft

Write to /tmp/agentmail_request.json:

{
  "to": ["recipient@example.com"],
  "subject": "Draft email",
  "text": "This is a draft.",
  "html": "<p>This is a draft.</p>"
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/inboxes/{inbox-id}/drafts" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

Create Scheduled Draft

Write to /tmp/agentmail_request.json:

{
  "to": ["recipient@example.com"],
  "subject": "Scheduled email",
  "text": "This will be sent later.",
  "send_at": "2025-12-01T10:00:00Z"
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/inboxes/{inbox-id}/drafts" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

List Drafts

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/drafts" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Get Draft

curl -s "https://api.agentmail.to/v0/inboxes/{inbox-id}/drafts/{draft-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Update Draft

Write to /tmp/agentmail_request.json:

{
  "subject": "Updated subject",
  "text": "Updated body"
}

Then run:

curl -s -X PATCH "https://api.agentmail.to/v0/inboxes/{inbox-id}/drafts/{draft-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

Send Draft

curl -s -X POST "https://api.agentmail.to/v0/inboxes/{inbox-id}/drafts/{draft-id}/send" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d '{}' | jq .

Delete Draft

curl -s -X DELETE "https://api.agentmail.to/v0/inboxes/{inbox-id}/drafts/{draft-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN"

Webhooks

Create Webhook

Write to /tmp/agentmail_request.json:

{
  "url": "https://your-server.com/webhooks",
  "event_types": ["message.received", "message.sent", "message.delivered"],
  "client_id": "my-webhook"
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/webhooks" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

Supported event types: message.received, message.sent, message.delivered, message.bounced, message.complained, message.rejected, domain.verified

Create Webhook for Specific Inboxes

Write to /tmp/agentmail_request.json:

{
  "url": "https://your-server.com/webhooks",
  "event_types": ["message.received"],
  "inbox_ids": ["{inbox-id-1}", "{inbox-id-2}"],
  "client_id": "inbox-webhook"
}

Then run:

curl -s -X POST "https://api.agentmail.to/v0/webhooks" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

List Webhooks

curl -s "https://api.agentmail.to/v0/webhooks" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Get Webhook

curl -s "https://api.agentmail.to/v0/webhooks/{webhook-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Update Webhook (Add/Remove Inboxes)

Write to /tmp/agentmail_request.json:

{
  "add_inbox_ids": ["{new-inbox-id}"],
  "remove_inbox_ids": ["{old-inbox-id}"]
}

Then run:

curl -s -X PATCH "https://api.agentmail.to/v0/webhooks/{webhook-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/agentmail_request.json' | jq .

Delete Webhook

curl -s -X DELETE "https://api.agentmail.to/v0/webhooks/{webhook-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN"

Domains

Create Domain

curl -s -X POST "https://api.agentmail.to/v0/domains" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d '{"domain": "yourdomain.com", "feedback_enabled": true}' | jq .

Returns DNS records (TXT, CNAME, MX) that must be added to your DNS provider.

List Domains

curl -s "https://api.agentmail.to/v0/domains" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Get Domain

curl -s "https://api.agentmail.to/v0/domains/{domain-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Verify Domain

Trigger DNS verification after adding records:

curl -s -X POST "https://api.agentmail.to/v0/domains/{domain-id}/verify" --header "Authorization: Bearer $AGENTMAIL_TOKEN"

Domain status values: NOT_STARTED, PENDING, INVALID, FAILED, VERIFYING, VERIFIED

Delete Domain

curl -s -X DELETE "https://api.agentmail.to/v0/domains/{domain-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN"

Pods

Pods are organizational groups for inboxes.

Create Pod

curl -s -X POST "https://api.agentmail.to/v0/pods" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d '{"name": "Support Team", "client_id": "support-pod"}' | jq .

List Pods

curl -s "https://api.agentmail.to/v0/pods" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Get Pod

curl -s "https://api.agentmail.to/v0/pods/{pod-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Delete Pod

curl -s -X DELETE "https://api.agentmail.to/v0/pods/{pod-id}" --header "Authorization: Bearer $AGENTMAIL_TOKEN"

Metrics

Get Delivery Metrics

curl -s "https://api.agentmail.to/v0/metrics?start_timestamp=2025-01-01T00:00:00Z&end_timestamp=2025-12-31T23:59:59Z" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Filter by event type:

curl -s "https://api.agentmail.to/v0/metrics?start_timestamp=2025-01-01T00:00:00Z&end_timestamp=2025-12-31T23:59:59Z&event_types=message.sent&event_types=message.bounced" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Supported event types: message.sent, message.delivered, message.bounced, message.delayed, message.rejected, message.complained, message.received

API Keys

List API Keys

curl -s "https://api.agentmail.to/v0/api-keys" --header "Authorization: Bearer $AGENTMAIL_TOKEN" | jq .

Create API Key

curl -s -X POST "https://api.agentmail.to/v0/api-keys" --header "Authorization: Bearer $AGENTMAIL_TOKEN" --header "Content-Type: application/json" -d '{"name": "production-key"}' | jq .

The api_key value is only returned once at creation time. Save it immediately.

Delete API Key

curl -s -X DELETE "https://api.agentmail.to/v0/api-keys/{api-key}" --header "Authorization: Bearer $AGENTMAIL_TOKEN"

Webhook Event Payload

When a webhook fires, AgentMail sends a POST request with this JSON payload:

{
  "type": "event",
  "event_type": "message.received",
  "event_id": "unique-event-id",
  "message": {
    "inbox_id": "...",
    "thread_id": "...",
    "message_id": "...",
    "from": "sender@example.com",
    "to": ["your-inbox@agentmail.to"],
    "subject": "Hello",
    "text": "Message body",
    "html": "<p>Message body</p>",
    "attachments": []
  },
  "thread": {
    "thread_id": "...",
    "subject": "Hello",
    "message_count": 1
  }
}

Your endpoint should return HTTP 200 immediately and process the payload asynchronously.

Send Parameters Reference

ParameterTypeDescription
tostring[]Recipients
ccstring[]CC recipients
bccstring[]BCC recipients
reply_tostring[]Reply-to addresses
subjectstringEmail subject
textstringPlain text body
htmlstringHTML body
labelsstring[]Custom labels
attachmentsobject[]Attachments (with filename, content_type, content as base64 or url)
headersobjectCustom email headers

Response Codes

StatusDescription
200Success
202Accepted (async delete for inboxes, threads)
204No Content (delete success for webhooks, pods, API keys)
400Invalid parameters
403Forbidden (sending not allowed)
404Resource not found

Guidelines

  1. Always send both text and HTML: Provide both formats for best deliverability across email clients
  2. Use client_id for idempotency: When creating inboxes, webhooks, or drafts, use client_id to prevent duplicates on retries
  3. Use labels for state tracking: Tag messages as unreplied/replied to manage conversation state
  4. Use webhooks over polling: Webhooks are the recommended way to handle incoming emails in production
  5. Custom domains improve deliverability: Set up verified custom domains for production use
  6. Default domain: Without a custom domain, inboxes use @agentmail.to
  7. Webhook response: Return HTTP 200 immediately from webhook endpoints; process payloads asynchronously

API Reference

平台分布

Codex

37.17%
按下载量换算138

Claude

29.59%
按下载量换算110

Cursor

19.18%
按下载量换算71

Gemini CLI

8.87%
按下载量换算33

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills