|
| 1 | +--- |
| 2 | +title: Artifacts |
| 3 | +description: Complete reference for artifact names, directory structures, and download patterns used by GitHub Agentic Workflows. |
| 4 | +sidebar: |
| 5 | + order: 298 |
| 6 | +--- |
| 7 | + |
| 8 | +GitHub Agentic Workflows upload several artifacts during workflow execution. This reference documents every artifact name, its contents, and how to access the data — especially for downstream workflows that use `gh run download` directly instead of `gh aw logs`. |
| 9 | + |
| 10 | +## Quick Reference |
| 11 | + |
| 12 | +| Artifact Name | Constant | Type | Description | |
| 13 | +|---------------|----------|------|-------------| |
| 14 | +| `agent` | `constants.AgentArtifactName` | Multi-file | Unified agent job outputs (logs, safe outputs, token usage summary) | |
| 15 | +| `activation` | `constants.ActivationArtifactName` | Multi-file | Activation job output (`aw_info.json`, `prompt.txt`, rate limits) | |
| 16 | +| `firewall-audit-logs` | `constants.FirewallAuditArtifactName` | Multi-file | AWF firewall audit/observability logs (token usage, network policy, audit trail) | |
| 17 | +| `detection` | `constants.DetectionArtifactName` | Single-file | Threat detection log (`detection.log`) | |
| 18 | +| `safe-output` | `constants.SafeOutputArtifactName` | Legacy/back-compat | Historical standalone safe output artifact (`safe_output.jsonl`); in current compiled workflows this content is included in the unified `agent` artifact instead | |
| 19 | +| `agent-output` | `constants.AgentOutputArtifactName` | Legacy/back-compat | Historical standalone agent output artifact (`agent_output.json`); in current compiled workflows this content is included in the unified `agent` artifact instead | |
| 20 | +| `aw-info` | — | Single-file | Engine configuration (`aw_info.json`) | |
| 21 | +| `prompt` | — | Single-file | Generated prompt (`prompt.txt`) | |
| 22 | +| `safe-outputs-items` | `constants.SafeOutputItemsArtifactName` | Single-file | Safe output items manifest | |
| 23 | +| `code-scanning-sarif` | `constants.SarifArtifactName` | Single-file | SARIF file for code scanning results | |
| 24 | + |
| 25 | +## Artifact Sets |
| 26 | + |
| 27 | +The `gh aw logs` and `gh aw audit` commands support `--artifacts` to download only specific artifact groups: |
| 28 | + |
| 29 | +| Set Name | Artifacts Downloaded | Use Case | |
| 30 | +|----------|---------------------|----------| |
| 31 | +| `all` | Everything | Full analysis (default) | |
| 32 | +| `agent` | `agent` | Agent logs and outputs | |
| 33 | +| `activation` | `activation` | Activation data (`aw_info.json`, `prompt.txt`) | |
| 34 | +| `firewall` | `firewall-audit-logs` | Network policy and firewall audit data | |
| 35 | +| `mcp` | `firewall-audit-logs` | MCP gateway traffic logs | |
| 36 | +| `detection` | `detection` | Threat detection output | |
| 37 | +| `github-api` | `activation`, `agent` | GitHub API rate limit logs | |
| 38 | + |
| 39 | +```bash |
| 40 | +# Download only firewall artifacts |
| 41 | +gh aw logs <run-id> --artifacts firewall |
| 42 | + |
| 43 | +# Download agent and firewall artifacts |
| 44 | +gh aw logs <run-id> --artifacts agent --artifacts firewall |
| 45 | + |
| 46 | +# Download everything (default) |
| 47 | +gh aw logs <run-id> |
| 48 | +``` |
| 49 | + |
| 50 | +## `firewall-audit-logs` |
| 51 | + |
| 52 | +The `firewall-audit-logs` artifact is uploaded by **all firewall-enabled workflows**. It contains AWF (Agent Workflow Firewall) structured audit and observability logs. |
| 53 | + |
| 54 | +> **⚠️ Important:** This artifact is **separate** from the `agent` artifact. Token usage data (`token-usage.jsonl`) lives here, not in the `agent` artifact. |
| 55 | +
|
| 56 | +### Directory Structure |
| 57 | + |
| 58 | +``` |
| 59 | +firewall-audit-logs/ |
| 60 | +├── api-proxy-logs/ |
| 61 | +│ └── token-usage.jsonl ← Token usage data (input/output/cache tokens per API request) |
| 62 | +├── squid-logs/ |
| 63 | +│ └── access.log ← Network policy log (domain allow/deny decisions) |
| 64 | +├── audit.jsonl ← Firewall audit trail (policy matches, rule evaluations) |
| 65 | +└── policy-manifest.json ← Policy configuration snapshot |
| 66 | +``` |
| 67 | + |
| 68 | +### Accessing Token Usage Data |
| 69 | + |
| 70 | +**Recommended: Use `gh aw logs`** |
| 71 | + |
| 72 | +```bash |
| 73 | +# Download and analyze firewall data |
| 74 | +gh aw logs <run-id> --artifacts firewall |
| 75 | + |
| 76 | +# Output as JSON for scripting |
| 77 | +gh aw logs <run-id> --artifacts firewall --json |
| 78 | +``` |
| 79 | + |
| 80 | +**Direct download with `gh run download`:** |
| 81 | + |
| 82 | +```bash |
| 83 | +# Download the firewall-audit-logs artifact |
| 84 | +gh run download <run-id> -n firewall-audit-logs |
| 85 | + |
| 86 | +# Token usage data is at: |
| 87 | +cat firewall-audit-logs/api-proxy-logs/token-usage.jsonl |
| 88 | + |
| 89 | +# Network access log is at: |
| 90 | +cat firewall-audit-logs/squid-logs/access.log |
| 91 | + |
| 92 | +# Audit trail is at: |
| 93 | +cat firewall-audit-logs/audit.jsonl |
| 94 | + |
| 95 | +# Policy manifest is at: |
| 96 | +cat firewall-audit-logs/policy-manifest.json |
| 97 | +``` |
| 98 | + |
| 99 | +### Common Mistake |
| 100 | + |
| 101 | +Downstream workflows sometimes download `agent-artifacts` or `agent` expecting to find `token-usage.jsonl`. This will silently return no data — the token usage file is only in the `firewall-audit-logs` artifact. |
| 102 | + |
| 103 | +```bash |
| 104 | +# ❌ WRONG — token-usage.jsonl is NOT in the agent artifact |
| 105 | +gh run download <run-id> -n agent |
| 106 | +cat agent/token-usage.jsonl # File not found! |
| 107 | + |
| 108 | +# ✅ CORRECT — download from firewall-audit-logs |
| 109 | +gh run download <run-id> -n firewall-audit-logs |
| 110 | +cat firewall-audit-logs/api-proxy-logs/token-usage.jsonl |
| 111 | +``` |
| 112 | + |
| 113 | +## `agent` |
| 114 | + |
| 115 | +The unified `agent` artifact contains all agent job outputs. |
| 116 | + |
| 117 | +### Contents |
| 118 | + |
| 119 | +- Agent execution logs |
| 120 | +- Safe output data (`agent_output.json`) |
| 121 | +- GitHub API rate limit logs (`github_rate_limits.jsonl`) |
| 122 | +- Token usage summary (`agent_usage.json`) — aggregated totals only; per-request data is in `firewall-audit-logs` |
| 123 | + |
| 124 | +## `activation` |
| 125 | + |
| 126 | +The `activation` artifact contains activation job outputs. |
| 127 | + |
| 128 | +### Contents |
| 129 | + |
| 130 | +- `aw_info.json` — Engine configuration and workflow metadata |
| 131 | +- `prompt.txt` — The generated prompt sent to the AI agent |
| 132 | +- `github_rate_limits.jsonl` — Rate limit data from the activation job |
| 133 | + |
| 134 | +## `detection` |
| 135 | + |
| 136 | +The `detection` artifact contains threat detection output. |
| 137 | + |
| 138 | +### Contents |
| 139 | + |
| 140 | +- `detection.log` — Threat detection analysis results |
| 141 | + |
| 142 | +Legacy name: `threat-detection.log` (still supported for backward compatibility). |
| 143 | + |
| 144 | +## Naming Compatibility |
| 145 | + |
| 146 | +Artifact names changed between upload-artifact v4 and v5. The `gh aw logs` and `gh aw audit` commands handle both naming schemes transparently: |
| 147 | + |
| 148 | +| Old Name (pre-v5) | New Name (v5+) | File Inside | |
| 149 | +|--------------------|----------------|-------------| |
| 150 | +| `aw_info.json` | `aw-info` | `aw_info.json` | |
| 151 | +| `safe_output.jsonl` | `safe-output` | `safe_output.jsonl` | |
| 152 | +| `agent_output.json` | `agent-output` | `agent_output.json` | |
| 153 | +| `prompt.txt` | `prompt` | `prompt.txt` | |
| 154 | +| `threat-detection.log` | `detection` | `detection.log` | |
| 155 | + |
| 156 | +Single-file artifacts are automatically flattened to root level regardless of their artifact directory name. Multi-file artifacts (`firewall-audit-logs`, `agent`, `activation`) retain their directory structure. |
| 157 | + |
| 158 | +## Workflow Call Prefixes |
| 159 | + |
| 160 | +When workflows are invoked via `workflow_call`, GitHub Actions prepends a short hash to artifact names (e.g., `abc123-firewall-audit-logs`). The CLI handles this automatically by matching artifact names that end with `-{base-name}`. |
| 161 | + |
| 162 | +```bash |
| 163 | +# Both of these are recognized as the firewall artifact: |
| 164 | +# - firewall-audit-logs (direct invocation) |
| 165 | +# - abc123-firewall-audit-logs (workflow_call invocation) |
| 166 | +``` |
| 167 | + |
| 168 | +## Related Documentation |
| 169 | + |
| 170 | +- [Audit Commands](/gh-aw/reference/audit/) — Download and analyze workflow run artifacts |
| 171 | +- [Cost Management](/gh-aw/reference/cost-management/) — Track token usage and inference spend |
| 172 | +- [Network](/gh-aw/reference/network/) — Firewall and domain allow/deny configuration |
| 173 | +- [Compilation Process](/gh-aw/reference/compilation-process/) — How workflows are compiled including artifact upload steps |
0 commit comments