@@ -5,8 +5,9 @@ A GitHub Action for running [cagent](https://github.com/docker/cagent) AI agents
55## Quick Start
66
771 . ** Add the action to your workflow** :
8+
89 ``` yaml
9- - uses : docker/cagent-action@v1.0.0
10+ - uses : docker/cagent-action@v1.0.4
1011 with :
1112 agent : docker/code-analyzer
1213 prompt : " Analyze this code"
@@ -15,6 +16,7 @@ A GitHub Action for running [cagent](https://github.com/docker/cagent) AI agents
1516 ` ` `
1617
17182. **Configure API key** in your repository settings:
19+
1820 - Go to ` Settings` → `Secrets and variables` → `Actions`
1921 - Add `ANTHROPIC_API_KEY` with your API key from [Anthropic Console](https://console.anthropic.com/)
2022
@@ -40,7 +42,7 @@ See [security/README.md](security/README.md) for complete security documentation
4042
4143` ` ` yaml
4244- name: Run CAgent
43- uses: docker/cagent-action@v1.0.0
45+ uses: docker/cagent-action@v1.0.4
4446 with:
4547 agent: docker/github-action-security-scanner
4648 prompt: "Analyze these commits for security vulnerabilities"
@@ -50,7 +52,7 @@ See [security/README.md](security/README.md) for complete security documentation
5052
5153# ## Analyzing Code Changes
5254
53- ` ` ` yaml
55+ ` ` ` ` yaml
5456name : Code Analysis
5557on :
5658 pull_request :
5961permissions :
6062 contents : read
6163 pull-requests : write
62- issues: write # For security incident reporting
64+ issues : write # For security incident reporting
6365
6466jobs :
6567 analyze :
7678
7779 - name : Analyze Changes
7880 id : analysis
79- uses: docker/cagent-action@v1.0.0
81+ uses : docker/cagent-action@v1.0.4
8082 with :
8183 agent : docker/code-analyzer
8284 prompt : |
@@ -94,13 +96,13 @@ jobs:
9496 --body-file "${{ steps.analysis.outputs.output-file }}"
9597 env :
9698 GH_TOKEN : ${{ github.token }}
97- ` ` `
99+ ` ` ` `
98100
99101# ## Using a Local Agent File
100102
101103` ` ` yaml
102104- name: Run Custom Agent
103- uses : docker/cagent-action@v1.0.0
105+ uses: docker/cagent-action@v1.0.4
104106 with:
105107 agent: ./agents/my-agent.yaml
106108 prompt: "Analyze the codebase"
@@ -112,16 +114,16 @@ jobs:
112114
113115` ` ` yaml
114116- name: Run CAgent with Custom Settings
115- uses : docker/cagent-action@v1.0.0
117+ uses: docker/cagent-action@v1.0.4
116118 with:
117119 agent: docker/code-analyzer
118120 prompt: "Analyze this codebase"
119121 cagent-version: v1.9.11
120- mcp-gateway : true # Set to true to install mcp-gateway
122+ mcp-gateway: true # Set to true to install mcp-gateway
121123 mcp-gateway-version: v0.22.0
122- yolo : false # Require manual approval
123- timeout : 600 # 10 minute timeout
124- debug : true # Enable debug logging
124+ yolo: false # Require manual approval
125+ timeout: 600 # 10 minute timeout
126+ debug: true # Enable debug logging
125127 working-directory: ./src
126128 extra-args: "--verbose"
127129 env:
@@ -133,7 +135,7 @@ jobs:
133135` ` ` yaml
134136- name: Run CAgent
135137 id: agent
136- uses : docker/cagent-action@v1.0.0
138+ uses: docker/cagent-action@v1.0.4
137139 with:
138140 agent: docker/code-analyzer
139141 prompt: "Analyze this codebase"
@@ -157,34 +159,34 @@ jobs:
157159
158160# # Inputs
159161
160- | Input | Description | Required | Default |
161- |-------| -------------| ----------| --------- |
162- | ` agent` | Agent identifier (e.g., `docker/code-analyzer`) or path to `.yaml` file | Yes | - |
163- | `prompt` | Prompt to pass to the agent | No | - |
164- | `cagent-version` | Version of cagent to use | No | `v1.9.12` |
165- | `mcp-gateway` | Install mcp-gateway (`true`/`false`) | No | `false` |
166- | `mcp-gateway-version` | Version of mcp-gateway to use (specifying this will enable mcp-gateway installation) | No | `v0.22.0` |
167- | `anthropic-api-key` | Anthropic API key | No | `$ANTHROPIC_API_KEY` env var |
168- | `openai-api-key` | OpenAI API key | No | `$OPENAI_API_KEY` env var |
169- | `google-api-key` | Google API key for Gemini | No | `GOOGLE_API_KEY` env var |
170- | `github-token` | GitHub token for API access | No | Auto-provided by GitHub Actions |
171- | `timeout` | Timeout in seconds for agent execution (0 for no timeout) | No | `0` |
172- | `debug` | Enable debug mode with verbose logging (`true`/`false`) | No | `false` |
173- | `working-directory` | Working directory to run the agent in | No | `.` |
174- | `yolo` | Auto-approve all prompts (`true`/`false`) | No | `true` |
175- | `extra-args` | Additional arguments to pass to `cagent exec` | No | - |
162+ | Input | Description | Required | Default |
163+ | --------------------- | ------------------------------------------------------------------------------------ | -------- | ------------------------------- |
164+ | `agent` | Agent identifier (e.g., `docker/code-analyzer`) or path to `.yaml` file | Yes | - |
165+ | `prompt` | Prompt to pass to the agent | No | - |
166+ | `cagent-version` | Version of cagent to use | No | `v1.15.6` |
167+ | `mcp-gateway` | Install mcp-gateway (`true`/`false`) | No | `false` |
168+ | `mcp-gateway-version` | Version of mcp-gateway to use (specifying this will enable mcp-gateway installation) | No | `v0.22.0` |
169+ | `anthropic-api-key` | Anthropic API key | No | `$ANTHROPIC_API_KEY` env var |
170+ | `openai-api-key` | OpenAI API key | No | `$OPENAI_API_KEY` env var |
171+ | `google-api-key` | Google API key for Gemini | No | `GOOGLE_API_KEY` env var |
172+ | `github-token` | GitHub token for API access | No | Auto-provided by GitHub Actions |
173+ | `timeout` | Timeout in seconds for agent execution (0 for no timeout) | No | `0` |
174+ | `debug` | Enable debug mode with verbose logging (`true`/`false`) | No | `false` |
175+ | `working-directory` | Working directory to run the agent in | No | `.` |
176+ | `yolo` | Auto-approve all prompts (`true`/`false`) | No | `true` |
177+ | `extra-args` | Additional arguments to pass to `cagent exec` | No | - |
176178
177179# # Outputs
178180
179- | Output | Description |
180- |--------| -------------|
181- | `exit-code` | Exit code from the cagent exec |
182- | `output-file` | Path to the output log file |
183- | `cagent-version` | Version of cagent that was used |
184- | `mcp-gateway-installed` | Whether mcp-gateway was installed (`true`/`false`) |
185- | `execution-time` | Agent execution time in seconds |
186- | `secrets-detected` | Whether secrets were detected in output |
187- | `prompt-suspicious` | Whether suspicious patterns were detected in user prompt |
181+ | Output | Description |
182+ | ----------------------- | -------------------------------------------------------- |
183+ | `exit-code` | Exit code from the cagent exec |
184+ | `output-file` | Path to the output log file |
185+ | `cagent-version` | Version of cagent that was used |
186+ | `mcp-gateway-installed` | Whether mcp-gateway was installed (`true`/`false`) |
187+ | `execution-time` | Agent execution time in seconds |
188+ | `secrets-detected` | Whether secrets were detected in output |
189+ | `prompt-suspicious` | Whether suspicious patterns were detected in user prompt |
188190
189191# # Environment Variables
190192
@@ -227,15 +229,15 @@ jobs:
227229 - uses: actions/checkout@v4
228230
229231 - name: Security Review
230- uses: docker/cagent-action@v1.0.0
232+ uses: docker/cagent-action@v1.0.4
231233 with:
232234 agent: docker/github-action-security-scanner
233235 prompt: "Analyze for security issues"
234236 env:
235237 ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
236238
237239 - name: Code Quality Analysis
238- uses: docker/cagent-action@v1.0.0
240+ uses: docker/cagent-action@v1.0.4
239241 with:
240242 agent: docker/code-quality-analyzer
241243 prompt: "Analyze code quality and best practices"
@@ -251,11 +253,11 @@ on:
251253 workflow_dispatch:
252254 inputs:
253255 agent:
254- description: ' Agent to run'
256+ description: " Agent to run"
255257 required: true
256- default: ' docker/code-analyzer'
258+ default: " docker/code-analyzer"
257259 prompt:
258- description: ' Prompt for the agent'
260+ description: " Prompt for the agent"
259261 required: true
260262
261263jobs:
@@ -265,15 +267,14 @@ jobs:
265267 - uses: actions/checkout@v4
266268
267269 - name: Run Agent
268- uses: docker/cagent-action@v1.0.0
270+ uses: docker/cagent-action@v1.0.4
269271 with:
270272 agent: ${{ github.event.inputs.agent }}
271273 prompt: ${{ github.event.inputs.prompt }}
272274 env:
273275 ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
274276` ` `
275277
276-
277278# # Contributing
278279
279280We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on :
0 commit comments