05_workflow

command
v1.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 10 Imported by: 0

README

工作流引擎 (Workflow)

展示 AgentFlow 当前推荐的 DAG 工作流主链(单入口)。

功能

  • DAG 节点编排:通过有向无环图表达节点依赖
  • Action Step 执行:每个节点通过 workflow.Step 执行任务
  • 单入口执行:统一通过 DAGWorkflow.Execute 触发

前置条件

  • Go 1.24+
  • 环境变量 OPENAI_API_KEY

运行

cd examples/05_workflow
go run main.go

代码说明

示例使用 workflow.NewDAGGraph + workflow.NewDAGWorkflow 构建并执行 “翻译 -> 总结” 的两节点 DAG。
translate 节点输出作为 summarize 节点输入,符合当前 Workflow 单入口执行模型。

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL