Skip to content

Commit 0ba79be

Browse files
author
Bas Alberts
committed
Update README in prep for OSS release
1 parent 0698bd3 commit 0ba79be

File tree

1 file changed

+91
-15
lines changed

1 file changed

+91
-15
lines changed

README.md

Lines changed: 91 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
The Security Lab Taskflow Agent is an MCP enabled multi-Agent framework.
22

3-
While the [Security Lab Copilot Extensions Framework](https://github.com/github/seclab-copilot-extensions) was created for team-internal prototyping and exploring various Agentic workflow ideas and approaches, the Taskflow Agent is intended as a "production" implementation.
4-
53
The Taskflow Agent is built on top of the [OpenAI Agents SDK](https://openai.github.io/openai-agents-python/) in contrast to the largely custom backend implementations of our original Copilot extensions framework.
64

7-
As such the Taskflow Agent provides a more future-proof CLI focused Agent tool as we leverage the SDK for keeping pace with e.g. evolving MCP protocol specifications.
8-
95
While the Taskflow Agent does not integrate into the dotcom Copilot UX, it does operate using the Copilot API (CAPI) as its backend.
106

117
# Core Concepts
@@ -26,29 +22,115 @@ python -m pip install -r requirements.txt
2622

2723
## System Requirements
2824

29-
Python >= 3.9
25+
Python >= 3.9 or Docker
3026

3127
# Usage
3228

3329
Provide a Copilot entitled GitHub PAT via the `COPILOT_TOKEN` environment variable.
3430

31+
## Source
32+
3533
Run `python main.py` for help.
3634

3735
Example: deploying a prompt to an Agent Personality:
3836

39-
```
37+
```sh
4038
python main.py -p assistant 'explain modems to me please'
4139
```
4240

4341
Example: deploying a Taskflow:
4442

45-
```
43+
```sh
4644
python main.py -t example
4745
```
4846

49-
## Configuration
47+
## Docker
48+
49+
Alternatively you can deploy the Agent via it's accompanying Docker image using `docker/run.sh`.
50+
51+
The image entrypoint is `main.py` and thus it operates the same as invoking the Agent from source directly.
52+
53+
You can find the Docker image for the Seclab Taskflow Agent [here](https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pkgs/container/seclab-taskflow-agent) and how it is built [here](release_tools/).
54+
55+
Note that this image is based on a public release of the Taskflow Agent, and you will have to mount any custom taskflows, personalities, or prompts into the image for them to be available to the Agent.
56+
57+
See [docker/run.sh](docker/run.sh) for configuration details.
58+
59+
Example: deploying a Taskflow:
60+
61+
```sh
62+
docker/run.sh -t example
63+
```
64+
Example: deploying a custom taskflow:
65+
66+
```sh
67+
MY_TASKFLOWS=~/my_taskflows docker/run.sh -t custom_taskflow
68+
```
69+
70+
Available image mount points are:
71+
72+
- Custom data via `MY_DATA` environment variable
73+
- Custom personalities via `MY_PERSONALITIES` environment variable
74+
- Custom taskflows via `MY_TASKFLOWS` environment variable
75+
- Custom prompts via `MY_PROMPTS` environment variable
76+
- Custom toolboxes via `MY_TOOLBOXES` environment variable
5077

51-
Set environment variables via an `.env` file in the project root as required.
78+
For more advanced scenarios like e.g. making custom MCP server code available, you can alter the run script to mount your custom code into the image and configure your toolboxes to use said code accordingly.
79+
80+
Example: custom MCP server deployment via Docker image:
81+
82+
```sh
83+
export MY_MCP_SERVERS=./mcp_servers
84+
export MY_TOOLBOXES=./toolboxes
85+
export MY_PERSONALITIES=./personalities
86+
export MY_TASKFLOWS=./taskflows
87+
export MY_PROMPTS=./prompts
88+
89+
if [ ! -f ".env" ]; then
90+
touch ".env"
91+
fi
92+
93+
docker run \
94+
--volume /var/run/docker.sock:/var/run/docker.sock \
95+
--volume logs:/app/logs \
96+
--mount type=bind,src=.env,dst=/app/.env,ro \
97+
${MY_DATA:+--mount type=bind,src=$MY_DATA,dst=/app/my_data} \
98+
${MY_MCP_SERVERS:+--mount type=bind,src=$MY_MCP_SERVERS,dst=/app/my_mcp_servers,ro} \
99+
${MY_TASKFLOWS:+--mount type=bind,src=$MY_TASKFLOWS,dst=/app/taskflows/my_taskflows,ro} \
100+
${MY_TOOLBOXES:+--mount type=bind,src=$MY_TOOLBOXES,dst=/app/toolboxes/my_toolboxes,ro} \
101+
${MY_PROMPTS:+--mount type=bind,src=$MY_PROMPTS,dst=/app/prompts/my_prompts,ro} \
102+
${MY_PERSONALITIES:+--mount type=bind,src=$MY_PERSONALITIES,dst=/app/personalities/my_personalities,ro} \
103+
"ghcr.io/githubsecuritylab/seclab-taskflow-agent" "$@"
104+
```
105+
106+
Our default run script makes the Docker socket available to the image, which contains the Docker cli, so 3rd party Docker based stdio MCP servers also function as normal.
107+
108+
Example: a toolbox configuration for the official GitHub MCP Server:
109+
110+
```yaml
111+
server_params:
112+
kind: stdio
113+
command: docker
114+
args: ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"]
115+
env:
116+
GITHUB_PERSONAL_ACCESS_TOKEN: "{{ env GITHUB_PERSONAL_ACCESS_TOKEN }}"
117+
```
118+
119+
## Framework Configuration
120+
121+
Set environment variables via an `.env` file in the project root.
122+
123+
Example: a persistent Agent configuration with various MCP server environment variables set:
124+
125+
```sh
126+
# Tokens
127+
COPILOT_TOKEN=...
128+
# Docker config, MY_DATA is mounted to /app/my_data
129+
MY_DATA="/home/user/my_data""
130+
# MCP configs
131+
GITHUB_PERSONAL_ACCESS_TOKEN=...
132+
CODEQL_DBS_BASE_PATH="/app/my_data/"
133+
```
52134

53135
# Personalities
54136

@@ -164,9 +246,3 @@ taskflow:
164246
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.
165247

166248
See the [taskflow examples](taskflows/examples) for other useful Taskflow patterns such as repeatable and asynchronous templated prompts.
167-
168-
# Docker based deployments
169-
170-
You can find a Docker image for the Seclab Taskflow Agent [here](https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pkgs/container/seclab-taskflow-agent)
171-
172-
Note that this image is based on the public release of the Taskflow Agent, and you will have to mount any custom taskflows, personalities, or prompts into the image for them to be available to the Agent. See [docker/run.sh](docker/run.sh) for examples of use.

0 commit comments

Comments
 (0)