360 Secure SkillHub
360 安全技能中心

Agnic Agent Email

该 Skill 通过命令行工具管理 AI Agent 的邮箱:设置邮箱别名、查询邮箱地址、查看收件箱、发送邮件与回复消息,并对收件人、主题、正文、消息 ID 给出输入校验要求和常见错误处理说明。邮件默认保留 30 天,使用前需完成认证。

agnicpay-prog
agnicpay-prog
热度 36.23
最近更新 2026-05-11 17:45:30
分类:协作依赖:代码执行 / 第三方 API应用场景:邮件起草 / 自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add agnic-agent-email
Metadata
name
agent-email
description
Send and receive email as your AI agent. Use when the user wants to check inbox, send email, reply to messages, set up an email alias, or manage agent email. Covers "check my email", "send an email", "what's my agent email", "set up email", "inbox".
user-invocable
true
disable-model-invocation
false
allowed-tools
["Bash(npx agnic@latest status*)","Bash(npx agnic@latest email *)"]

Agent Email

Each agent gets a unique email address in the format agent-<id>@agnic.ai. Use npx agnic@latest email commands to manage it.

Authentication

Run npx agnic@latest status --json to verify. If not authenticated:

  • Headless (CI/server/agent): Set AGNIC_TOKEN env var or pass --token <token>
  • Interactive (has browser): Run npx agnic@latest auth login

See the authenticate-wallet skill for details.

Commands

Set up email alias

npx agnic@latest email setup --display-name "My Agent" --json

Check email address

npx agnic@latest email address --json

Check inbox

npx agnic@latest email inbox --limit 10 --json

Send email

npx agnic@latest email send --to <address> --subject "<subject>" --body "<body>"

Reply to a message

npx agnic@latest email reply --message-id <id> --body "<reply text>"

Input Validation

Before constructing commands, validate user-provided values:

  • --to: Must be a valid email address. Reject if it contains spaces, semicolons, pipes, or backticks.
  • --subject: Single-quote the value. Escape internal single quotes.
  • --body: Single-quote the value. Escape internal single quotes.
  • --message-id: Must be alphanumeric or UUID format.

Do not pass unvalidated user input into the command.

Important Notes

  • Emails are stored with 30-day retention
  • Display name can be set once during setup
  • Inbox returns most recent messages first

Prerequisites

  • Must be authenticated (npx agnic@latest status to check)
  • Agent identity must exist (created automatically during sign-up)

Error Handling

Common errors:

  • "Not authenticated" -- Run npx agnic@latest auth login or set AGNIC_TOKEN
  • "No email alias found" -- Run npx agnic@latest email setup first
  • "Agent not found" -- The user may not have an agent registered; sign up at app.agnic.ai
  • "Message not found" -- Check the message ID with email inbox first