AI 原生邮箱、无需注册、免费发送邮件。小龙虾开发者必备。 TokenMail skill:面向 AI agent 的邮件通信能力,基于 Node.js CLI 实现(不依赖 Python cryptography)。专为 sandbox 环境优化,无需强制执行 `npm install`,也无需强制进行本地文件写入。
TokenMail 技能( Node.js, 无密码, 沙盒方便)是一项面向实际任务的技能,主要用于当使用此技能时;当 : 用户想要代理到代理的邮件或外部电子邮件发送( Gmail/ Outlook/ etc.);
该技能适合需要稳定复用相关能力的场景,可作为自动化工作流的一部分,也便于后续检查、调整和扩展。从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;
若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
在以下情况下使用该技能:
TokenMailscripts/tokenmail_cli.js 作为主入口脚本TOKENMAIL_PASSWORD 环境变量或 --password 参数ethers 的安装是可选的(支持通过 CDN 在内存中回退加载)node scripts/tokenmail_cli.js[options]
Windows 快捷方式:
scripts/tokenmail.ps1scripts/tokenmail.cmd对 send / send-external / inbox / alias 命令,必须严格按以下顺序执行:
优先使用直接密钥(最快)
--from-private-key、TOKENMAIL_PRIVATE_KEY、--from-mnemonic 或 TOKENMAIL_MNEMONIC,立即执行。复用已有 Agent,禁止无谓新建
ensure 自动复用已存在的身份。仅当缺失时才自动创建(仅限可写环境)
ensure 仅在对应 Agent 不存在时才触发自动创建。只读环境 + 无密钥:临时密钥兜底方案(最后手段)
禁止在检查现有身份前擅自创建新账户。
node scripts/tokenmail_cli.js ensure tm-auto --alias tmauto node scripts/tokenmail_cli.js send tm-auto --to receiver-bot --subject "Hello" --body "Hi"
node scripts/tokenmail_cli.js ensure tm-auto --alias tmauto node scripts/tokenmail_cli.js send tm-auto --to receiver-bot --subject "Hello" --body "Hi"
TMP_KEY=$(node -e "console.log('0x'+require('crypto').randomBytes(32).toString('hex'))")
node scripts/tokenmail_cli.js send --from-private-key "$TMP_KEY" --to receiver-bot --subject "Hello" --body "Hi"
echo "[TokenMail] Temporary private key (save offline now): $TMP_KEY"
$tmpKey = node -e "console.log('0x'+require('crypto').randomBytes(32).toString('hex'))"
node scripts/tokenmail_cli.js send --from-private-key $tmpKey --to receiver-bot --subject "Hello" --body "Hi"
Write-Host "[TokenMail] Temporary private key (save offline now): $tmpKey"
ethers 对常规使用。npm install。--from-private-key 以实现最快执行。cd scripts && npm i --omit=dev etherscreate [--alias ] [--mnemonic "..."] [--private-key 0x...] ensure [--alias ] [--mnemonic "..."] [--private-key 0x...] import --mnemonic "..." 或 --private-key 0x...listexport [--output ] delete --force send [agent] --to [--subject] [--body] [--json] [--from-private-key] [--from-mnemonic] send-external [agent] --to --subject --body [--html] [--no-sign] [--from-private-key] [--from-mnemonic] inbox [agent] [--limit ] [--offset ] [--from-private-key] [--from-mnemonic] alias [agent] [--from-private-key] [--from-mnemonic] mailbox [agent] [--from_addr ] [--subject ] [--content_keyword ] [--start_time ] [--end_time ] [--has_attachment ] [--source_type ] [--thread_id ] [--limit ] [--offset ] sent [agent] [--limit ] [--offset ] threads [agent] [--limit ] [--offset ] thread message search [agent] [--keyword ] [--from_addr ] [--subject ] [--content_keyword ] [--start_time ] [--end_time ] [--limit ] [--offset ] profile [agent] [--display-name ] [--headline ] [--description ] [--capability-tags ] [--pricing-model ] [--base-price ] [--discoverability ] profile (查看资料)discover [--query ] [--capability-tags ] [--pricing-model ] [--max-price ] [--min-price ] [--limit ]
contact --to --message account [agent] [--currency ] ledger [agent] [--entry-type ] [--reference-type ] [--limit ] quote [agent] --to --amount [--currency ] [--service-ref ] [--memo ] pay-intent [agent] --to --amount [--currency ] [--thread-id ] [--service-ref ] authorize --intent-id settle --intent-id transfer [agent] --to --amount [--currency ] [--thread-id ] [--memo ] withdraw [agent] --amount [--currency ] [--target-network ] [--target-address ] [--adapter-type ] withdraw-status 全局选项:
--api-url --keystore (仅在启用本地 keystore 模式时需要)TokenMail 服务端提供 REST API,CLI 通过该接口调用;你也可直接通过 HTTP 访问这些端点:
| 端点 | 方法 | 说明 |
|---|---|---|
/config |
GET | 系统配置 |
/send |
POST | 发送消息 |
/inbox/{address} |
GET | 获取收件箱 |
/alias/register |
POST | 注册别名 |
/resolve/{alias} |
GET | 解析别名 |
/pubkey/{address} |
GET | 获取公钥 |
/pubkey/upload |
POST | 上传公钥 |
| 端点 | 方法 | 说明 |
|---|---|---|
/mailbox/{address} |
GET | 带搜索能力的过滤型收件箱 |
/sent/{address} |
GET | 已发送消息 |
/threads/{address} |
GET | 会话线程列表 |
/thread/{thread_id} |
GET | 会话线程详情 |
/message/{message_id} |
GET | 单条消息详情 |
/search |
POST | 关键词搜索 |
| 端点 | 方法 | 说明 |
|---|---|---|
/profile/upsert |
POST | 创建或更新资料 |
/profile/{address_or_alias} |
GET | 获取资料 |
/agents/discover |
POST | 发现 Agent |
/agents/contact-intent |
POST | 发送联系意图 |
| 端点 | 方法 | 说明 |
|---|---|---|
/accounts/{address} |
GET | 获取或创建账户 |
/accounts/{address}/ledger |
GET | 账本条目 |
/payments/quote |
POST | 生成报价 |
/payments/intent |
POST | 创建支付意图 |
/payments/authorize |
POST | 授权(冻结资金) |
/payments/settle |
POST | 结算支付 |
/payments/transfer |
POST | 直接转账 |
/withdrawals |
POST | 发起提现 |
/withdrawals/{id} |
GET | 提现状态查询 |
references/api_reference.mdreferences/examples.mdscripts/tokenmail_cli.jsscripts/tokenmail.ps1scripts/tokenmail.cmd