工作流定义

触发器 · webhook

trigger: { type: "webhook" }

输入请求的源头开始运行, 输入内容就会变成输入。 输入内容并非您信任的触发点 。

an inbound requestinput is the bodyuntrusted by nature
Using Python?

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

trigger: { type: "webhook" }

// A step reads what arrived
{ id: "classify", type: "model.generate", config: {
    model: "gemini-3.5-flash",
    prompt: "Classify this event: {{input.event}}" } }
trigger = {"type": "webhook"}

# A step reads what arrived
{"id": "classify", "type": "model.generate", "config": {
    "model": "gemini-3.5-flash",
    "prompt": "Classify this event: {{input.event}}"}}

输入来自外部

把它当作数据, 绝不作为指示

达到模型提示的机体是您指令中其他人的文字。 说一下该用它做什么 —— “ 分类 ” , “ 提取字段 ” , 而不是让内容设置任务 。

自己校验形状

没有什么能保证有田地存在。 condition 早期一步在链条中,检查你需要的东西是否存在, 将错误的调用转换成分支, 而不是失败的五个步骤之后 。

{ id: "has_id", type: "condition", config: {
    left: "{{input.id}}", operator: "exists" } }
{"id": "has_id", "type": "condition", "config": {
    "left": "{{input.id}}", "operator": "exists"}}

批准规则适用

发出、发布或写 DNS 需要a human 上上一步,没有定义的定义被拒绝。

量是成本

每一个到达的电话都是一次运行,每次运行的成本都与其步骤的成本有关。 将廉价的支票放在首位 — — 一种条件是模型电话是免费的,另一种方式不是。