-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathcomprehensive_test.yaml
More file actions
125 lines (113 loc) · 4.35 KB
/
comprehensive_test.yaml
File metadata and controls
125 lines (113 loc) · 4.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# SPDX-FileCopyrightText: GitHub, Inc.
# SPDX-License-Identifier: MIT
# Comprehensive test taskflow that exercises every grammar feature:
# - model_config reference with model aliases
# - globals (with CLI override via -g)
# - inputs (task-level template variables)
# - env (task-scoped environment variables)
# - must_complete
# - exclude_from_context
# - max_steps
# - MCP toolboxes (echo)
# - shell task (run)
# - repeat_prompt + async iteration
# - reusable tasks (uses)
# - reusable prompts ({% include %})
# - agent handoffs (multi-agent)
# - headless mode
# - blocked_tools
seclab-taskflow-agent:
version: "1.0"
filetype: taskflow
model_config: examples.model_configs.model_config
globals:
topic: fruit
detail_level: brief
taskflow:
# ---------------------------------------------------------------
# Task 1: Shell task — produces a JSON array for repeat_prompt
# Features: run, must_complete
# ---------------------------------------------------------------
- task:
name: generate-items
must_complete: true
run: |
echo '[{"name": "apple", "color": "red"}, {"name": "banana", "color": "yellow"}, {"name": "orange", "color": "orange"}]'
# ---------------------------------------------------------------
# Task 2: Repeat prompt over shell output, async iteration
# Features: repeat_prompt, async, async_limit, exclude_from_context,
# model (alias), inputs, globals, env, max_steps
# ---------------------------------------------------------------
- task:
name: describe-items
repeat_prompt: true
async: true
async_limit: 3
exclude_from_context: true
must_complete: true
model: gpt_default
max_steps: 10
agents:
- examples.personalities.fruit_expert
inputs:
format: one-sentence
env:
FRUIT_MODE: "analysis"
user_prompt: |
The topic is {{ globals.topic }} at {{ globals.detail_level }} detail level.
Describe the {{ result.name }} (which is {{ result.color }}) in {{ inputs.format }} format.
# ---------------------------------------------------------------
# Task 3: MCP tool call with echo server
# Features: toolboxes, headless, blocked_tools
# ---------------------------------------------------------------
- task:
name: echo-test
must_complete: true
headless: true
agents:
- examples.personalities.echo
user_prompt: |
Echo the following message: "All {{ globals.topic }} items processed successfully"
blocked_tools:
- nonexistent_tool_to_test_filtering
# ---------------------------------------------------------------
# Task 4: Reusable task via `uses`
# Features: uses (inherits from single_step_taskflow)
# ---------------------------------------------------------------
- task:
name: reusable-task
uses: examples.taskflows.single_step_taskflow
model: gpt_default
# ---------------------------------------------------------------
# Task 5: Reusable prompt via {% include %}
# Features: Jinja2 include directive, reusable prompts
# ---------------------------------------------------------------
- task:
name: include-prompt
agents:
- examples.personalities.fruit_expert
model: gpt_default
max_steps: 5
user_prompt: |
Tell me about apples.
{% include 'examples.prompts.example_prompt' %}
Keep your answer to two sentences per fruit.
# ---------------------------------------------------------------
# Task 6: Agent handoffs (multi-agent)
# Features: multiple agents (first=primary, rest=handoff targets)
# ---------------------------------------------------------------
- task:
name: handoff-test
model: gpt_default
max_steps: 15
agents:
- examples.personalities.fruit_expert
- examples.personalities.apple_expert
- examples.personalities.banana_expert
- examples.personalities.orange_expert
user_prompt: |
You are a fruit coordinator. I need specific expert advice on each fruit.
Please hand off to the apple expert for a one-sentence fact about apples,
then to the banana expert for a one-sentence fact about bananas,
then to the orange expert for a one-sentence fact about oranges.
Each expert should provide exactly one interesting fact.