You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+68-12Lines changed: 68 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,6 +149,11 @@ Example:
149
149
150
150
```yaml
151
151
# personalities define the system prompt level directives for this Agent
152
+
seclab-taskflow-agent:
153
+
version: 1
154
+
filetype: personality
155
+
filekey: personalities/examples/echo
156
+
152
157
personality: |
153
158
You are a simple echo bot. You use echo tools to echo things.
154
159
@@ -157,7 +162,7 @@ task: |
157
162
158
163
# personality toolboxes map to mcp servers made available to this Agent
159
164
toolboxes:
160
-
- echo
165
+
- toolboxes/echo
161
166
```
162
167
163
168
## Toolboxes
@@ -168,6 +173,11 @@ Example stdio config:
168
173
169
174
```yaml
170
175
# stdio mcp server configuration
176
+
seclab-taskflow-agent:
177
+
version: 1
178
+
filetype: toolbox
179
+
filekey: toolboxes/echo
180
+
171
181
server_params:
172
182
kind: stdio
173
183
command: python
@@ -184,6 +194,11 @@ A sequence of interdependent tasks performed by a set of Agents. Configured thro
184
194
Example:
185
195
186
196
```yaml
197
+
seclab-taskflow-agent:
198
+
version: 1
199
+
filetype: taskflow
200
+
filekey: taskflows/examples/example.yaml
201
+
187
202
taskflow:
188
203
- task:
189
204
# taskflows can optionally choose any of the support CAPI models for a task
@@ -194,18 +209,14 @@ taskflow:
194
209
must_complete: true
195
210
# taskflows can set a primary (first entry) and handoff (additional entries) agent
196
211
agents:
197
-
- c_auditer
198
-
- fruit_expert
212
+
- personalities/c_auditer.yaml
213
+
- personalities/examples/fruit_expert.yaml
199
214
user_prompt: |
200
215
Store an example vulnerable C program that uses `strcpy` in the
201
216
`vulnerable_c_example`memory key and explain why `strcpy`
202
217
is insecure in the C programming language. Do this before handing off
203
218
to any other agent.
204
219
205
-
Then provide a summary of a high impact CVE ID that involved a `strcpy`
206
-
based buffer overflow based on your GHSA knowledge as an additional
207
-
example.
208
-
209
220
Finally, why are apples and oranges healthy to eat?
210
221
211
222
# taskflows can set temporary environment variables, these support the general
@@ -217,16 +228,16 @@ taskflow:
217
228
MEMCACHE_STATE_DIR: "example_taskflow/"
218
229
MEMCACHE_BACKEND: "dictionary_file"
219
230
# taskflows can optionally override personality toolboxes, in this example
220
-
#kevin normally only has the memcache toolbox, but we extend it here with
231
+
#this normally only has the memcache toolbox, but we extend it here with
221
232
# the GHSA toolbox
222
233
toolboxes:
223
-
- ghsa
224
-
- memcache
234
+
- toolboxes/memcache.yaml
235
+
- toolboxes/codeql.yaml
225
236
- task:
226
237
must_complete: true
227
238
model: gpt-4.1
228
239
agents:
229
-
- c_auditer
240
+
- personalities/c_auditer.yaml
230
241
user_prompt: |
231
242
Retrieve C code for security review from the `vulnerable_c_example`
232
243
memory key and perform a review.
@@ -236,13 +247,58 @@ taskflow:
236
247
MEMCACHE_STATE_DIR: "example_taskflow/"
237
248
MEMCACHE_BACKEND: "dictionary_file"
238
249
toolboxes:
239
-
- memcache
250
+
- toolboxes/memcache.yaml
251
+
# headless mode does not prompt for tool call confirms configured for a server
252
+
# note: this will auto-allow, if you want control over potentially dangerous
253
+
# tool calls, then you should NOT run a task in headless mode (default: false)
254
+
headless: true
255
+
- task:
256
+
# tasks can also run shell scripts that return e.g. json output for repeat prompt iterable
257
+
must_complete: true
258
+
run: |
259
+
echo '["apple", "banana", "orange"]'
260
+
- task:
261
+
repeat_prompt: true
262
+
agents:
263
+
- personalities/assistant.yaml
264
+
user_prompt: |
265
+
What kind of fruit is {{ RESULT }}?
240
266
```
241
267
242
268
Taskflows support [Agent handoffs](https://openai.github.io/openai-agents-python/handoffs/). Handoffs are useful for implementing triage patterns where the primary Agent can decide to handoff a task to any subsequent Agents in the `Agents` list.
243
269
244
270
See the [taskflow examples](taskflows/examples) for other useful Taskflow patterns such as repeatable and asynchronous templated prompts.
245
271
272
+
## Notes about the yaml syntax
273
+
274
+
Every personality, toolbox, and taskflow is defined by a YAML file, which
275
+
should always include a header like this:
276
+
277
+
```
278
+
seclab-taskflow-agent:
279
+
version: 1
280
+
filetype: taskflow
281
+
filekey: taskflows/examples/example
282
+
```
283
+
284
+
The "filetype" determines whether the file defines a personality, toolbox, or
285
+
taskflow. This means that different types of files can be stored in the same directory.
286
+
287
+
The "filekey" is a unique name for the file. It is used to allow
288
+
cross-referencing between files. For example, a taskflow can reference
289
+
a personality by its filekey. Because filekeys are used for
290
+
cross-referencing (rather than file paths), it means that you can move
291
+
a file to a different directory without breaking the links. This also
292
+
means that you can easily import new files by dropping them into a sub-directory.
293
+
We recommend including something like your
294
+
GitHub "username/reponame" in your filekeys to make them globably unique.
295
+
296
+
The "version" number in the header should always be 1. It means that the
297
+
file uses version 1 of the seclab-taskflow-agent syntax. If we ever need
298
+
to make a major change to the syntax, then we'll update the version number.
299
+
This will hopefully enable us to make changes without breaking backwards
300
+
compatibility.
301
+
246
302
## License
247
303
248
304
This project is licensed under the terms of the MIT open source license. Please refer to the [LICENSE](./LICENSE) file for the full terms.
0 commit comments