工作流定义

触发器 · 邮件

trigger: { type: "mail" }

到达账户自己的信箱的一条消息 开始运行, 以信息作为输入 。

an arriving messagethe body is untrustedneeds a mailbox
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

trigger: { type: "mail" }

{ id: "triage", type: "model.generate", config: {
    model: "gemini-3.5-flash",
    prompt: "Classify this message. Subject: {{input.subject}}\n\n{{input.text}}" } }
trigger = {"type": "mail"}

{"id": "triage", "type": "model.generate", "config": {
    "model": "gemini-3.5-flash",
    "prompt": "Classify this message. Subject: {{input.subject}}\n\n{{input.text}}"}}

需要一个邮箱

账户必须拥有一个账户——见 api.mail。没有信息,信息就没有什么可传递的。

消息是最不信任的输入

任何人都可以寄一个

其内容达到了模型的迅速程度。 说一下该用它做什么, 并且绝不让机构决定任务—— 要求传递的信息是信息,而不是指示。

出于同样的原因,特工自己的邮件工具在描述中也载有同样的规则。

答复需要批准

答复最后的链条 mail.send,要求 human 自动回答到达的消息 绝对不能在无人监督的情况下发生

通常形状

  • 用模型对信件进行分类 。
  • 分类处 condition 或 a switch.
  • 以 storage.write -不需要批准,它就留在账户里
  • 任何答案:a human 步步, 然后 mail.send.