agentmail
它能做什么
它帮助你的智能体使用 AgentMail,这是一项为 AI 智能体提供其专属电子邮件地址,用于发送、接收和组织邮件往来的服务。它适合希望由智能体处理自己邮件、而不是使用个人邮箱的人。
适用场景
- ✓智能体需要自己的电子邮件地址来收发消息的时候。
- ✓任务需要完成一次性邮件验证码验证的时候。
- ✓你希望通过 webhook 把收到的邮件投递给智能体的时候。
技能链接
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/email/agentmail/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我的智能体创建一个邮箱,给我的团队发送一封测试邮件,然后检查是否有回复。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体安装 agentmail 命令行工具,使用你的 API 密钥,并通过终端命令创建邮箱、发送邮件和阅读回复。当其他脚本需要 ID 时,它会使用 JSON 输出。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
AgentMail Skill
AgentMail gives an agent its own email inbox for sending mail, receiving replies, completing email OTP flows, and running inbound email loops. Use it for agent-owned inboxes, not a user's existing IMAP/SMTP mailbox.
Use the agentmail CLI first. Use MCP only when the harness expects MCP tools;
use REST only when the CLI is missing a required operation.
When to Use
- The agent needs an email address it owns.
- The task involves email OTP flows, replies, threads, labels, or attachments.
- The agent needs webhook or WebSocket delivery for inbound mail.
Prerequisites
- Run commands through the
terminaltool. - Install the CLI:
npm install -g agentmail-cli@latest
- Export an API key:
export AGENTMAIL_API_KEY="am_..."
No API key yet? Use signup.md.
How to Run
Use --format json whenever another command or script needs IDs.
agentmail inboxes list --format json
Quick Reference
- AgentMail agent reference: hosted copy.
- AgentMail: product landing page.
- Console: API keys and account management.
- Docs: full product documentation.
- signup.md: self-signup and OTP verification.
- core.md: inboxes, messages, threads, labels, attachments.
- webhooks.md: events to a public HTTPS server.
- websockets.md: events to a local agent process.
- mcp.md: MCP integration.
Procedure
- Install
agentmail-cli@latestand verifyagentmail inboxes list --format json. - If no API key is available, complete signup.md.
- Use core.md for inbox, send, read, reply, forward, label, thread, and attachment flows.
- Add webhooks.md or websockets.md only when polling is not enough.
Pitfalls
- Prefer
AGENTMAIL_API_KEYover--api-key. - Never expose
AGENTMAIL_API_KEYin prompts, logs, URLs, or committed files. - Use stable
client_idvalues for retried create operations. - Prefer
extracted_textorextracted_htmlfor LLM input when present. - React to
message.received, not messages the agent sent.
Verification
agentmail inboxes list --format json
常见问题
它能访问我的个人邮箱吗?
不能。技能说明 AgentMail 用于智能体自有的邮箱,而不是用户现有的 IMAP 或 SMTP 邮箱。
我需要安装什么?
来自 npm 的 agentmail-cli 软件包,以及 AGENTMAIL_API_KEY 环境变量。
有自助注册的选项吗?
有。技能包含一份带有邮箱验证的自助注册指南。
详情
热度
- GitHub 星标
- 260k
- 排名
- #489
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-merge-conflict-arbiter
260k以中立第三方的身份,解决两个智能体分支之间的 git 合并冲突,为代码仓库生成一个合并结果。
antigravity-cli
260k指导你安装、更新和排查 Antigravity 命令行工具,包括其插件、登录和沙盒。
blackbox
260k让你的智能体把编程任务交给 Blackbox AI 命令行工具,它会运行多个 AI 模型并挑选最佳结果。
dynamic-workflow
260k教你的智能体把大量相似的工作保存为脚本批量运行,使只有经过验证的结果才返回主对话。