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
+21-13Lines changed: 21 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,9 @@
1
-
# Seclab Taskflow Agent
1
+
# GitHub Security Lab Taskflow Agent
2
2
3
3
The Security Lab Taskflow Agent is an MCP enabled multi-Agent framework.
4
4
5
5
The Taskflow Agent is built on top of the [OpenAI Agents SDK](https://openai.github.io/openai-agents-python/).
6
6
7
-
While the Taskflow Agent does not integrate into the GitHub Dotcom Copilot UX, it does operate using the Copilot API (CAPI) as its backend, similar to Copilot IDE extensions.
8
-
9
7
## Core Concepts
10
8
11
9
The Taskflow Agent leverages a GitHub Workflow-esque YAML based grammar to perform a series of tasks using a set of Agents.
@@ -16,38 +14,48 @@ Agents are defined through [personalities](examples/personalities/), that receiv
16
14
17
15
Agents can cooperate to complete sequences of tasks through so-called [taskflows](doc/GRAMMAR.md).
18
16
19
-
You can find a detailed overview of the taskflow grammar [here](taskflows/GRAMMAR.md) and example taskflows [here](examples/taskflows/).
17
+
You can find a detailed overview of the taskflow grammar [here](doc/GRAMMAR.md) and example taskflows [here](examples/taskflows/).
20
18
21
19
## Use Cases and Examples
22
20
23
21
The Seclab Taskflow Agent framework was primarily designed to fit the iterative feedback loop driven work involved in Agentic security research workflows and vulnerability triage tasks.
24
22
25
23
Its design philosophy is centered around the belief that a prompt level focus of capturing vulnerability patterns will greatly improve and scale security research results as frontier model capabilities evolve over time.
26
24
27
-
While the maintainer himself primarily uses this framework as a code auditing toolit also serves as a more generic swiss army knife for exploring Agentic workflows. For example, the GitHub Security Lab also uses this framework for automated code scanning alert triage.
25
+
At GitHub Security Lab, we primarily use this framework as a code auditing tool, but it can also serve as a more generic swiss army knife for exploring Agentic workflows. For example, we also use this framework for automated code scanning alert triage.
28
26
29
27
The framework includes a [CodeQL](https://codeql.github.com/) MCP server that can be used for Agentic code review, see the [CVE-2023-2283](examples/taskflows/CVE-2023-2283.yaml) taskflow for an example of how to have an Agent review C code using a CodeQL database ([demo video](https://www.youtube.com/watch?v=eRSPSVW8RMo)).
30
28
31
29
Instead of generating CodeQL queries itself, the CodeQL MCP Server is used to provide CodeQL-query based MCP tools that allow an Agent to navigate and explore code. It leverages templated CodeQL queries to provide targeted context for model driven code analysis.
32
30
33
31
## Requirements
34
32
35
-
Python >= 3.9 or Docker
33
+
Python >= 3.10 or Docker
36
34
37
35
## Configuration
38
36
39
-
Provide a GitHub token for an account that is entitled to use [GitHub Models](https://models.github.ai) via the `AI_API_TOKEN` environment variable. Further configuration is use case dependent, i.e. pending which MCP servers you'd like to use in your taskflows.
37
+
Provide a GitHub token for an account that is entitled to use [GitHub Models](https://models.github.ai) via the `AI_API_TOKEN` environment variable. Further configuration is use case dependent, i.e. pending which MCP servers you'd like to use in your taskflows. In a terminal, you can add `AI_API_TOKEN` to the environment like this:
38
+
39
+
```sh
40
+
export AI_API_TOKEN=<your_github_token>
41
+
```
42
+
43
+
Or, if you are using GitHub Codespaces, then you can [add a Codespace secret](https://github.com/settings/codespaces/secrets/new) so that `AI_API_TOKEN` is automatically available when working in a Codespace.
44
+
45
+
Many of the MCP servers in the [seclab-taskflow](https://github.com/GitHubSecurityLab/seclab-taskflows) repo also need an environment variable named `GH_TOKEN` for accessing the GitHub API. You can use two separate PATs if you want, or you can use one PAT for both purposes, like this:
46
+
47
+
```sh
48
+
export GH_TOKEN=$AI_API_TOKEN
49
+
```
40
50
41
-
You can set persisting environment variables via an`.env` file in the project root.
51
+
We do not recommend storing secrets on disk, but you can persist non-sensitive environment variables by adding a`.env` file in the project root.
# taskflows can optionally choose any of the support CAPI models for a task
329
+
# taskflows can optionally choose any of the models supported by your API for a task
322
330
model: gpt-4.1
323
331
# taskflows can optionally limit the max allowed number of Agent task loop
324
332
# iterations to complete a task, this defaults to 50 when not provided
@@ -384,7 +392,7 @@ taskflow:
384
392
385
393
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.
386
394
387
-
See the [taskflow examples](taskflows/examples) for other useful Taskflow patterns such as repeatable and asynchronous templated prompts.
395
+
See the [taskflow examples](examples/taskflows) for other useful Taskflow patterns such as repeatable and asynchronous templated prompts.
388
396
389
397
390
398
You can run a taskflow from the command line like this:
0 commit comments