-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathexample.yaml
More file actions
73 lines (67 loc) · 2.97 KB
/
example.yaml
File metadata and controls
73 lines (67 loc) · 2.97 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
# SPDX-FileCopyrightText: GitHub, Inc.
# SPDX-License-Identifier: MIT
seclab-taskflow-agent:
version: "1.0"
filetype: taskflow
# Import settings from a model_config file.
model_config: examples.model_configs.model_config
taskflow:
- task:
# taskflows can optionally choose any of the support CAPI models for a task
model: gpt_default
# taskflows can optionally limit the max allowed number of Agent task loop
# iterations to complete a task, this defaults to 50 when not provided
max_steps: 20
must_complete: true
# taskflows can set a primary (first entry) and handoff (additional entries) agent
agents:
- seclab_taskflow_agent.personalities.c_auditer
- examples.personalities.fruit_expert
user_prompt: |
Store an example vulnerable C program that uses `strcpy` in the
`vulnerable_c_example` memory key and explain why `strcpy`
is insecure in the C programming language. Do this before handing off
to any other agent.
Finally, why are apples and oranges healthy to eat?
# taskflows can set temporary environment variables, these support the general
# "{{ env('FROM_EXISTING_ENVIRONMENT') }}" pattern we use elsewhere as well
# these environment variables can then be made available to any stdio mcp server
# through its respective yaml configuration, see memcache.yaml for an example
# you can use these to override top-level environment variables on a per-task basis
env:
MEMCACHE_STATE_DIR: "example_taskflow/"
MEMCACHE_BACKEND: "dictionary_file"
# taskflows can optionally override personality toolboxes, in this example
# this normally only has the memcache toolbox, but we extend it here with
# the GHSA toolbox
toolboxes:
- seclab_taskflow_agent.toolboxes.memcache
- seclab_taskflow_agent.toolboxes.codeql
- task:
must_complete: true
agents:
- seclab_taskflow_agent.personalities.c_auditer
user_prompt: |
Retrieve C code for security review from the `vulnerable_c_example`
memory key and perform a review.
Clear the memory cache when you're done.
env:
MEMCACHE_STATE_DIR: "example_taskflow/"
MEMCACHE_BACKEND: "dictionary_file"
toolboxes:
- seclab_taskflow_agent.toolboxes.memcache
# headless mode does not prompt for tool call confirms configured for a server
# note: this will auto-allow, if you want control over potentially dangerous
# tool calls, then you should NOT run a task in headless mode (default: false)
headless: true
- task:
# tasks can also run shell scripts that return e.g. json output for repeat prompt iterable
must_complete: true
run: |
echo '["apple", "banana", "orange"]'
- task:
repeat_prompt: true
agents:
- seclab_taskflow_agent.personalities.assistant
user_prompt: |
What kind of fruit is {{ result }}?