流程是拥有内部步骤的块。end 关键字把它关掉。
agentflow-beta TB
flow worker["Worker"]
job["Do the job"]@{ shape: task }
endshape: 后面的词说明这一步是什么。input、task、tool、decision、action 和 refdoc 共六种。
agentflow-beta LR
brief["Brief"]@{ shape: input }
draft["Draft copy"]@{ shape: task }
check["spell_check"]@{ shape: tool }
guide["Style guide"]@{ shape: refdoc }
ship["Publish"]@{ shape: action }
ok["Ready?"]@{ shape: decision }
brief --> draft --> check --> ship
ok --> ship带标签的箭头说明原因。十字表示重试,虚线指向要读的东西。
agentflow-beta TB
check["Tests pass?"]@{ shape: decision }
ship["Ship it"]@{ shape: action }
fix["Fix the build"]@{ shape: task }
logs["Build logs"]@{ shape: refdoc }
check -- yes --> ship
check -- no --> fix
fix --x check
fix -.- logs一个流程可以装别的流程。里面的那些是子智能体。
agentflow-beta TB
flow team["Content Team"]
flow researcher["Researcher"]
gather["Gather sources"]@{ shape: task }
end
flow writer["Writer"]
compose["Compose draft"]@{ shape: task }
end
researcher --> writer
end