TOKREPO · 主题包
稳定

工作流编排

n8n / Prefect / Inngest / Kestra / Activepieces — 把 AI agent 包进定时 / 重试 / 可观测的持久化引擎。

8 个资产

这个 pack 装了什么

这个 pack 收齐了 AI 团队在「prompt 套循环」不够用之后会摸到的 8 个生产级工作流引擎。每个解决的都是同三件事 —— 调度 / 重试 / 观测 —— 但 ergonomics 不同。按你团队已经在的栈选(Python / Node / 无代码 / JVM)。

# 引擎 适合场景
1 n8n 无代码 / 低代码,400+ 集成,可自托管
2 Prefect Python-first 数据 + AI 工作流,动态 DAG
3 Inngest TypeScript / Node,事件驱动 step function
4 Kestra YAML 声明式,JVM,插件生态
5 Activepieces 开源 Zapier 替代,分支流程
6 Trigger.dev 长时 TypeScript job,自带重试
7 Temporal 分布式工作流原语,认真规模就用它
8 Windmill 多语言脚本(Python/TS/Bash/Go)+ UI

每个都开源可自托管。多数有 SaaS 托管层,但这个 pack 优先记开源装路径。

为什么 AI agent 需要编排

Prompt 第一次跑是确定的,之后每次都是抛硬币。再加个真实动作 —— 调 API、写库、发 Slack —— 「凌晨三点失败一次」就会变成每周固定节目。工作流引擎解决三件事:

  1. 幂等。step 可安全重放。LLM 调用成功但后一步崩了,重试不会重复扣 API 钱
  2. 回退 + 死信。失败 step 按指数退避重试,再不行落进 DLQ 让人看
  3. 可观测。每个 step 记录输入、输出、延迟、成本。agent 出怪事时能精确回放它当时看到的上下文

没有这些,你的 agent 就是一个加了步骤的 Jupyter notebook。有这些它才是服务。

一条命令装齐

# 装整个 pack(8 个引擎的 manifest)
tokrepo install pack/workflow-orchestration

# 或装你团队在用的那个
tokrepo install n8n
tokrepo install prefect
tokrepo install inngest

TokRepo manifest 给你 Docker Compose / Helm 起步配置 + agent 友好默认值(幂等 key、重试策略、观测钩子)。卸载就 tokrepo uninstall <slug>

常见踩坑

  • 当重试是无限的。多数引擎默认重试 3–5 次。如果你的 LLM 服务商正赶上糟糕一小时,你会把预算烧光还是失败。付费 LLM 调用上限设 3 次,失败后路由到更慢的备用模型
  • 幂等 key 设错。常见错误是用每次重试都变的 request_id。用输入 hash 当 key,重试才会针对同一逻辑任务去重
  • 少了 token 成本观测。普通编排器记录延迟但不记 LLM token 花费。把模型调用包一层,每个 step 输出 tokens_in / tokens_out / cost_usd 指标,否则爆预算了你都不知道是哪个工作流干的
  • 调度粒度选错。基于 cron 的引擎(n8n / Activepieces)拼不过亚分钟触发。要事件驱动亚秒响应,用 Inngest / Trigger.dev / Temporal
  • 引擎跟 agent 同节点。野的 agent 会把编排器 OOM。引擎放独立节点或容器并设硬内存上限

这个 pack 单独不够时

工作流编排是 持久化 层。它不给你 agent 本身、LLM 网关或评测。配套:

  • Python Agent Frameworks —— 真在 step 里跑的 agent 代码
  • MCP Server Stack —— 要让 agent 通过 MCP 触发编排器
  • LLM Eval & Guardrails —— 在每个工作流里加评测 step,再决定是否上线

四个 pack 一起,才是无人值守 AI 工作流的最小栈。

安装 · 一行命令
$ tokrepo install pack/workflow-orchestration
丢给 agent,或粘到终端
包内含什么

8 个资产打包就绪

Config#01
Awesome n8n — Workflow Automation Template Collection

Curated n8n workflow templates for data sync, notifications, CRM automation, and more. Import directly into your n8n instance.

by n8n·285 views
$ tokrepo install awesome-n8n-workflow-automation-template-collection-ab76a229
Skill#02
n8n-as-code — AI Agent Superpowers for n8n

Give your AI agent n8n superpowers with 537 node schemas, 7,700+ templates, and TypeScript workflow definitions. Works with Claude Code, Cursor, VS Code, and OpenClaw. MIT license.

by n8n·143 views
$ tokrepo install n8n-code-ai-agent-superpowers-n8n-9de58e04
Agent#03
n8n — AI-Native Workflow Automation

Open-source workflow automation with 400+ integrations and built-in AI capabilities. Build AI agents, RAG pipelines, and automation workflows with a visual editor.

by n8n·103 views
$ tokrepo install n8n-ai-native-workflow-automation-b7ec9ae7
MCP#04
n8n MCP Server — Build Automations with AI, 1,396 Nodes

MCP server giving AI agents access to 1,396 n8n nodes and 2,709 workflow templates. Build and manage n8n automations through natural language.

by n8n·81 views
$ tokrepo install n8n-mcp-server-build-automations-ai-1-396-nodes-4635d46c
Agent#05
Prefect — Python Workflow Orchestration

Prefect orchestrates resilient data pipelines in Python with scheduling, retries, caching, and event-driven automation. 22K+ stars. Apache 2.0.

by AI Open Source·130 views
$ tokrepo install prefect-python-workflow-orchestration-dfa1e8d2
Script#06
Inngest — Durable AI Workflow Orchestration

Run reliable AI workflows with automatic retries and state persistence. Replace queues and scheduling with durable step functions. TypeScript, Python, Go SDKs. 5,200+ stars.

by Script Depot·130 views
$ tokrepo install inngest-durable-ai-workflow-orchestration-f09e8059
Config#07
Kestra — Event-Driven Orchestration & Scheduling Platform

Kestra is an open-source orchestration platform for scheduling and running complex data pipelines, ETL jobs, and automation workflows with declarative YAML.

by AI Open Source·117 views
$ tokrepo install kestra-event-driven-orchestration-scheduling-platform-556ae291
Agent#08
Activepieces — Open-Source AI Workflow Automation

Open-source workflow automation with 400+ integrations and AI agent support. Visual builder, MCP server compatibility, self-hostable alternative to Zapier. 21K+ stars.

by AI Open Source·91 views
$ tokrepo install activepieces-open-source-ai-workflow-automation-13ddf27d
FAQ

常见问题

工作流编排免费吗?

本 pack 八个引擎全部开源可自托管。n8n / Prefect / Inngest / Kestra / Activepieces / Trigger.dev / Temporal / Windmill 都发开源 Docker 镜像。代价是引擎要你自己运维 —— DB、队列、扩缩容。多数有 SaaS 托管层(n8n Cloud / Prefect Cloud / Inngest Cloud),不想运维就付钱。

跟 cron + Python 脚本比怎么样?

cron 没有重试、没有幂等、没有观测、没有 DLQ。脚本要么成功要么下次再跑。AI agent 调付费 API 还有副作用,cron 不安全。这个 pack 最便宜的版本 —— Inngest 免费层 + Vercel function —— 大约就是 cron 等价表面但带重试和 UI,且免费。

Claude Code 或 Cursor 的 agent 能用吗?

能,但是间接的。Claude Code 和 Cursor 是交互式编码 agent,跑在你笔记本上。工作流引擎跑在服务器上。模式是:Claude Code 写 agent 代码,你把代码包进 step function(Inngest / Prefect task),引擎按计划跑。引擎不在乎 step 里调的是 Claude API。

跟 Apache Airflow 有啥区别?

Airflow 在用,但它的 DAG-as-Python 模型和慢调度心跳让它对需要事件驱动亚秒响应、频繁动态分支的 AI agent 不友好。Prefect / Inngest / Temporal 都是「现代 Airflow」起家。我们没收 Airflow 是因为团队拿它跑 AI agent 半年内都会迁出去。

上线该提前防的运维坑?

反压。下游 LLM 服务商一慢,你编排器队列会膨胀把引擎 OOM。生产规模前先设每队列并发上限和全局出站 LLM 调用限速器。Inngest 和 Trigger.dev 自带;n8n 和 Prefect 要显式配。

更多主题包

12 个主题包 · 80+ 精选资产

回首页浏览全部精选合集

返回主题包总览