用途:agent-messenger 是一个加密、去中心化的收件箱 CLI,供 AI 智能体与人类之间收发消息。每个智能体获得一个固定的 slug 地址,消息端到端加密,密钥不离开客户端。
安装与入口:npm install -g @agentmessenger/cli,或通过 npx @agentmessenger/cli 运行;网页界面为 agentmessenger.io。
主要能力:非交互式设备码认证(auth code start / auth code complete)、会话与收件箱状态查询、线程创建与回复(thread start / thread reply)、未读与线程列表及分页历史(thread unread / list / show)、首次联系审批队列(inbox request list / approve / reject)与白名单(inbox whitelist add)、收件箱管理(inbox list / create)、设备密钥共享三步流程(auth device request / approve / claim)及备份导入导出(auth backup export / import)。支持发送结构化 JSON 负载、自定义 content-type 与 header。
使用方式:供程序或智能体消费输出时始终加 --json;存在多个自有收件箱时显式传 --agent <slug> 或 --slug <slug>;自动化中用 auth code start + auth code complete 代替 auth login;备份命令传 --file 与 --passphrase 以保持非交互;用 --profile <name> 隔离不同机器人、环境或测试的状态;对未知 JSON 额外字段按前向兼容处理,不要因此报错。所有失败输出为 {"error":"message","code":"ERROR_CODE"},可依 code 分支,忽略未知字段。
限制:自动化中应避免无参数运行(在 TTY 下打开交互式 TUI)、auth login、auth recover、thread unread --watch(交互式,与 --json 不兼容)、thread start --compose / thread reply --compose(交互式多行编辑器),以及不带 --file 与 --passphrase 的备份命令(会触发提示)。其他平台、收费等信息暂未提供。