MCPcopy Create free account
hub / github.com/astercloud/aster / main

Function main

examples/workflow-agents/main.go:19–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17)
18
19func main() {
20 ctx := context.Background()
21
22 fmt.Println("=== 工作流 Agent 演示 ===")
23
24 // ====== 示例 1: SequentialAgent - 顺序工作流 ======
25 fmt.Println("📝 示例 1: SequentialAgent - 多步骤流水线")
26 sequentialExample(ctx)
27
28 // ====== 示例 2: ParallelAgent - 并行执行 ======
29 fmt.Println("\n⚡ 示例 2: ParallelAgent - 并行比较方案")
30 parallelExample(ctx)
31
32 // ====== 示例 3: LoopAgent - 循环优化 ======
33 fmt.Println("\n🔄 示例 3: LoopAgent - 迭代优化")
34 loopExample(ctx)
35
36 // ====== 示例 4: 嵌套工作流 ======
37 fmt.Println("\n🌳 示例 4: 嵌套工作流 - Sequential + Parallel")
38 nestedExample(ctx)
39
40 fmt.Println("\n✅ 所有示例完成!")
41}
42
43// sequentialExample 顺序工作流示例
44func sequentialExample(ctx context.Context) {

Callers

nothing calls this directly

Calls 4

sequentialExampleFunction · 0.85
parallelExampleFunction · 0.85
loopExampleFunction · 0.85
nestedExampleFunction · 0.85

Tested by

no test coverage detected