把任务沉淀为可复用工作流:让 Agent 建一次,反复运行
教你怎么让 Agent 把重复任务写成 TypeScript 工作流,跑一次配置以后反复用,省钱又好排查。
这条推文分享了一种把 AI 任务转成可复用工作流的做法:让 Agent 构建一次流程,之后反复运行。核心思路是只有模型才能完成的步骤才调用模型,其余步骤用 TypeScript 编码固定下来。这样做的好处是易于排查问题,并且这些行为可以在多个自动化流程间复用。
How to turn your tasks into workflows and reusable behavior.
You ask your agent to build it once, and then you run it again and again.
Huge advantage to doing this:
• You only use models for tasks that only models can do • Every other step is encoded in TypeScript • Very easy to troubleshoot • You can reuse your behaviors across automations