agentmail
GitHub提供AgentMail CLI工具的使用指南,帮助AI代理创建和管理专属邮箱、收发邮件及处理OTP流程。支持通过CLI或MCP方式操作,涵盖配置、常用命令及安全注意事项。
触发场景
安装
npx skills add NousResearch/hermes-agent --skill agentmail -g -y
SKILL.md
Frontmatter
{
"name": "agentmail",
"author": "Haakam Aujla (Haakam21), AgentMail",
"license": "MIT",
"version": "1.0.0",
"metadata": {
"hermes": {
"tags": [
"Email",
"CLI",
"AgentMail",
"Communication"
],
"homepage": "https:\/\/agentmail.to"
}
},
"platforms": [
"linux",
"macos",
"windows"
],
"description": "Use when an agent needs AgentMail CLI email inboxes.",
"prerequisites": {
"commands": [
"agentmail"
]
},
"required_environment_variables": [
{
"help": "Create one at https:\/\/console.agentmail.to — or run the CLI self-signup flow in references\/signup.md to obtain a key without one.",
"name": "AGENTMAIL_API_KEY",
"prompt": "AgentMail API key (starts with am_)",
"optional": true,
"required_for": "authenticating the agentmail CLI; not needed before self-signup"
}
]
}
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
版本历史
-
b7ac3ba
当前 2026-09-09 13:06
将技能从MCP优先重写为CLI优先,新增自注册和OTP验证指引,强调API密钥安全及可选配置。
-
8430c1b
2026-08-20 06:04
执行技能标准化审查,补全缺失的前置元数据(作者、许可证等),并修正描述文案以符合规范。
- e0dfcf2 2026-07-25 11:35


