Frontmatter
The frontmatter (YAML configuration section between --- markers) of GitHub Agentic Workflows includes the triggers, permissions, AI engines (which AI model/provider to use), and workflow settings. For example:
---on: issues: types: [opened]
tools: edit: bash: ["gh issue comment"]---...markdown instructions...Frontmatter Elements
Section titled “Frontmatter Elements”Below is a comprehensive reference to all available frontmatter fields for GitHub Agentic Workflows.
Description (description:)
Section titled “Description (description:)”Provides a human-readable description of the workflow rendered as a comment in the generated lock file.
description: "Workflow that analyzes pull requests and provides feedback"Emoji (emoji:)
Section titled “Emoji (emoji:)”An optional emoji to represent the workflow visually, for example in listings and UI surfaces.
emoji: ""Labels (labels:)
Section titled “Labels (labels:)”Optional array of strings for categorizing workflows by purpose, team, or functionality. Labels appear in gh aw status output as [automation ci diagnostics] (or a JSON array in --json mode) and can be filtered with gh aw status --label automation.
labels: ["automation", "ci", "diagnostics"]Metadata (metadata:)
Section titled “Metadata (metadata:)”Optional key-value pairs for storing custom metadata compatible with the GitHub Copilot custom agent spec.
metadata: author: John Doe version: 1.0.0 category: automationKeys must be 1–64 characters; values are string-only, up to 1024 characters.
Trigger Events (on:)
Section titled “Trigger Events (on:)”The on: section uses standard GitHub Actions syntax to define workflow triggers, with additional fields for security and approval controls:
- Standard GitHub Actions triggers (push, pull_request, issues, schedule, etc.)
reaction:- Add emoji reactions to triggering itemsstatus-comment:- Post a started/completed comment with a workflow run link (automatically enabled forslash_commandandlabel_commandtriggers; must be explicitly set totruefor other trigger types). Accepts a boolean or an object with optionalissues,pull-requests, anddiscussionstoggle fields to selectively disable status comments for specific target types.stop-after:- Automatically disable triggers after a deadlinemanual-approval:- Require manual approval using environment protection rulesforks:- Configure fork filtering for pull_request triggersskip-roles:- Skip workflow execution for specific repository rolesskip-bots:- Skip workflow execution for specific GitHub actorsskip-author-associations:- Skip execution for configured event +author_associationcombinationsroles:- Restrict which repository roles can trigger the workflow (default:[admin, maintainer, write])bots:- Allow specific bot accounts to trigger the workflowskip-if-match:- Skip execution when a search query has matches (supportsscope: none; use top-levelon.github-token/on.github-appfor custom auth)skip-if-no-match:- Skip execution when a search query has no matches (supportsscope: none; use top-levelon.github-token/on.github-appfor custom auth)steps:- Inject custom deterministic steps into the pre-activation job (saves one workflow job vs. multi-job pattern)permissions:- Grant additional GitHub token scopes to the pre-activation job (for use withon.steps:API calls)needs:- Add custom job dependencies that bothpre_activationandactivationmust wait forgithub-token:- Custom token for activation job reactions, status comments, and skip-if search queriesgithub-app:- GitHub App for minting a short-lived token used by the activation job and all skip-if search steps
See Trigger Events for complete documentation.
Conditional Execution (if:)
Section titled “Conditional Execution (if:)”Standard GitHub Actions if: syntax:
if: github.event_name == 'push'Imports (imports:)
Section titled “Imports (imports:)”Share and reuse workflow components across multiple workflows. The imports: field in frontmatter (or {{#import ...}} in markdown) composes shared tools, steps, MCP servers, and prompts from other workflow files.
imports: - shared/common-tools.md - shared/mcp/tavily.mdSee Imports for complete documentation on syntax, shared components, APM package dependencies, and composition patterns.
Custom Steps and Jobs (steps:, pre-agent-steps:, post-steps:, jobs:)
Section titled “Custom Steps and Jobs (steps:, pre-agent-steps:, post-steps:, jobs:)”Add deterministic steps before or after agentic execution, or define full custom GitHub Actions jobs that run before the agent. See Custom Steps and Jobs for complete documentation.
Cache Configuration (cache:)
Section titled “Cache Configuration (cache:)”Cache configuration using standard GitHub Actions actions/cache syntax:
Single cache:
cache: key: node-modules-${{ hashFiles('package-lock.json') }} path: node_modules restore-keys: | node-modules-Repository Checkout (checkout:)
Section titled “Repository Checkout (checkout:)”Configure how actions/checkout is invoked in the agent job. Override default checkout settings or check out multiple repositories for cross-repository workflows.
Set checkout: false to disable the default repository checkout entirely — useful for workflows that access repositories through MCP servers or other mechanisms that do not require a local clone:
checkout: falseSee Cross-Repository Operations for complete documentation on checkout configuration options (including fetch:, checkout: false), merging behavior, and cross-repo examples.
Permissions (permissions:)
Section titled “Permissions (permissions:)”The permissions: section uses a syntax similar to standard GitHub Actions permissions syntax to specify the GitHub read permissions relevant to the agentic (natural language) part of the execution of the workflow. See GitHub Tools Read Permissions.
AI Engine (engine:)
Section titled “AI Engine (engine:)”Specifies which AI engine interprets the markdown section. See AI Engines for details.
engine: copilotNetwork Permissions (network:)
Section titled “Network Permissions (network:)”Controls network access using ecosystem identifiers and domain allowlists. See Network Permissions for full documentation.
network: allowed: - defaults # Basic infrastructure - python # Python/PyPI ecosystem - "api.example.com" # Custom domainTools (tools:)
Section titled “Tools (tools:)”Specifies which GitHub API calls, bash commands, browser automation, and MCP servers are available to the AI agent.
tools: edit: bash: ["gh issue comment"] github: toolsets: [default]See Tools for complete documentation on built-in tools, GitHub toolsets, and MCP server configuration.
MCP Scripts (mcp-scripts:)
Section titled “MCP Scripts (mcp-scripts:)”Enables defining custom MCP tools inline using JavaScript or shell scripts. See MCP Scripts for complete documentation on creating custom tools with controlled secret access.
Safe Outputs (safe-outputs:)
Section titled “Safe Outputs (safe-outputs:)”Enables automatic issue creation, comment posting, and other safe outputs. See Safe Outputs Processing.
Run Configuration (run-name:, runs-on:, runs-on-slim:, timeout-minutes:)
Section titled “Run Configuration (run-name:, runs-on:, runs-on-slim:, timeout-minutes:)”Standard GitHub Actions properties:
run-name: "Custom workflow run name" # Defaults to workflow nameruns-on: ubuntu-latest # Defaults to ubuntu-latest (main job only)runs-on-slim: ubuntu-slim # Defaults to ubuntu-slim (framework jobs only)timeout-minutes: 30 # Defaults to 20 minutesruns-on applies to the main agent job only. runs-on-slim applies to all framework/generated jobs (activation, safe-outputs, unlock, etc.) and defaults to ubuntu-slim. safe-outputs.runs-on takes precedence over runs-on-slim for safe-output jobs specifically.
timeout-minutes accepts an integer or a GitHub Actions expression string (e.g. ${{ inputs.timeout }}), letting a reusable workflow_call workflow parameterize its own timeout from caller inputs. It applies to the workflow being compiled, not to plain caller jobs that invoke a reusable workflow with job-level uses: — GitHub rejects timeout-minutes there.
Supported runners for runs-on:
| Runner | Status |
|---|---|
ubuntu-latest | ✓ Default. Recommended for most workflows. |
ubuntu-24.04 / ubuntu-22.04 | ✓ Supported. |
ubuntu-24.04-arm | ✓ Supported. Linux ARM64 runner. |
macos-* | ✗ Not supported. Docker is unavailable on macOS runners (no nested virtualization). See FAQ. |
windows-* | ✗ Not supported. AWF requires Linux. |
Workflow Concurrency Control (concurrency:)
Section titled “Workflow Concurrency Control (concurrency:)”Automatically generates concurrency policies for the agent job. See Concurrency Control.
Environment Variables (env:)
Section titled “Environment Variables (env:)”Standard GitHub Actions env: syntax for workflow-level environment variables:
env: CUSTOM_VAR: "value"Environment variables can be defined at multiple scopes (workflow, job, step, engine, safe-outputs, etc.) with clear precedence rules. See Environment Variables for complete documentation on all 13 env scopes and precedence order.
[!WARNING] Do not use
${{ secrets.* }}expressions in the workflow-levelenv:section. Environment variables defined here are passed directly to the agent container, which means secret values would be visible to the AI model. In strict mode, this is a compilation error. In non-strict mode, it emits a warning.Use engine-specific secret configuration instead of the
env:section to pass secrets securely.
Effective Token Budget (max-effective-tokens:)
Section titled “Effective Token Budget (max-effective-tokens:)”Sets the AWF effective-token budget used for cost enforcement. Defaults to 25M when omitted. Token steering (budget-warning messages at 80%, 90%, 95%, and 99% of the budget) is enabled by default. Use plain integers or K/M suffixes such as 100000K or 100M. Set to a negative value to disable both budget enforcement and token steering.
max-effective-tokens: 5M# Equivalent shorthandmax-effective-tokens: 100M# Disable budget enforcement and token steeringmax-effective-tokens: -1Daily Per-Workflow Effective Token Guardrail (max-daily-effective-tokens:)
Section titled “Daily Per-Workflow Effective Token Guardrail (max-daily-effective-tokens:)”Sets a 24-hour effective-token cap for a single workflow, aggregated across recent runs of the same workflow started by the triggering user. When the activation job detects that the previous 24 hours already exceed this threshold, it warns, creates an issue, skips the agent job, and lets the conclusion job report the specialized failure context. Use plain integers or K/M suffixes such as 100000K or 100M.
This guardrail is disabled by default when omitted, and -1 explicitly disables it. This guardrail is skipped for workflow_call, repository_dispatch, and workflow_dispatch runs that carry internal aw_context dispatch metadata.
max-daily-effective-tokens: 15M# Equivalent shorthandmax-daily-effective-tokens: 100M# Disable the guardrail explicitlymax-daily-effective-tokens: -1Secrets (secrets:)
Section titled “Secrets (secrets:)”Defines secret values passed to workflow execution. Secrets are typically used to provide sensitive configuration to MCP servers or workflow components. Values must be GitHub Actions expressions that reference secrets (e.g., ${{ secrets.API_KEY }}).
secrets: API_TOKEN: ${{ secrets.API_TOKEN }} DATABASE_URL: ${{ secrets.DB_URL }}Secrets can also include descriptions for documentation:
secrets: API_TOKEN: value: ${{ secrets.API_TOKEN }} description: "API token for external service" DATABASE_URL: value: ${{ secrets.DB_URL }} description: "Production database connection string"Always reference secrets through ${{ secrets.NAME }} expressions, never plaintext; prefer environment-specific secrets (via the environment: field) and limit access to the components that need them.
Note: For passing secrets to reusable workflows, use the jobs.<job_id>.secrets field instead. The top-level secrets: field is for workflow-level secret configuration.
Environment Protection (environment:)
Section titled “Environment Protection (environment:)”Specifies the environment for deployment protection rules and environment-specific secrets. Standard GitHub Actions syntax.
environment: productionSee GitHub Actions environment docs.
Container Configuration (container:)
Section titled “Container Configuration (container:)”Specifies a container to run job steps in.
container: node:18See GitHub Actions container docs.
Service Containers (services:)
Section titled “Service Containers (services:)”Defines service containers that run alongside your job (databases, caches, etc.).
services: postgres: image: postgres:13 env: POSTGRES_PASSWORD: postgres ports: - 5432:5432[!NOTE] The AWF agent runs inside an isolated Docker container. Service containers expose ports on the runner host, not within the agent’s network namespace. To connect to a service from the agent, use
host.docker.internalas the hostname instead oflocalhost. For example, a Postgres service configured with port5432:5432is accessible athost.docker.internal:5432.
See GitHub Actions service docs.
Observability (observability:)
Section titled “Observability (observability:)”Use observability.otlp to export distributed traces from workflow runs to an OpenTelemetry Protocol (OTLP) compatible backend.
observability: otlp: endpoint: ${{ secrets.OTLP_ENDPOINT }} headers: Authorization: ${{ secrets.OTLP_TOKEN }} X-Tenant: my-orgendpoint accepts a string, a {url, headers} object, or an array of endpoint objects for fan-out; headers accepts a map or comma-separated key=value string; if-missing supports error (default), warn, and ignore; and attributes is an optional map of custom span attributes (values support GitHub Actions expressions). See OpenTelemetry for runtime variables, endpoint forms, span attributes, and artifact files.
Resources (resources:)
Section titled “Resources (resources:)”Declares additional workflow or action files to fetch alongside this workflow when running gh aw add. Use this field when the workflow depends on companion workflows or custom actions stored in the same directory.
resources: - triage-issue.md # companion workflow - label-issue.md # companion workflow - shared/helper-action.yml # supporting GitHub ActionEntries are relative paths from the workflow’s location in the source repository (GitHub Actions expression syntax ${{ is not allowed). When gh aw add installs this workflow, each listed file is downloaded alongside it so dependencies are available after installation. gh aw add also automatically fetches workflows referenced in the dispatch-workflow safe output, even when not listed here.
Runtimes (runtimes:)
Section titled “Runtimes (runtimes:)”Override default runtime versions for languages and tools used in workflows. The compiler detects which runtimes are needed from tool configurations (e.g. bash: ["node"]) and workflow steps, then installs the specified versions. Pin versions for reproducibility, opt into preview releases, or point at custom setup actions (forks, enterprise mirrors).
Each runtime takes a required version string, plus optional action-repo and action-version to override the default setup action:
| Runtime | Default Version | Default Setup Action |
|---|---|---|
node | 24 | actions/setup-node@v6 |
python | 3.12 | actions/setup-python@v5 |
go | 1.25 | actions/setup-go@v5 |
uv | latest | astral-sh/setup-uv@v5 |
bun | 1.1 | oven-sh/setup-bun@v2 |
deno | 2.x | denoland/setup-deno@v2 |
ruby | 3.3 | ruby/setup-ruby@v1 |
java | 21 | actions/setup-java@v4 |
dotnet | 8.0 | actions/setup-dotnet@v4 |
elixir | 1.17 | erlef/setup-beam@v1 |
haskell | 9.10 | haskell-actions/setup@v2 |
Override one or more runtimes, optionally with a custom setup action:
runtimes: node: version: "20" python: version: "3.12" action-repo: "actions/setup-python" action-version: "v5"Omitted runtimes use the defaults above. Runtimes from imported shared workflows are merged with your workflow’s configuration.
run-install-scripts
Section titled “run-install-scripts”Controls whether npm pre/post-install scripts are allowed during package installation. Configure this under runtimes.node.run-install-scripts. The default is false.
runtimes: node: run-install-scripts: trueEnabling this increases supply chain risk because install hooks from dependencies can execute arbitrary code. In strict mode, run-install-scripts: true is rejected.
Source Tracking (source:)
Section titled “Source Tracking (source:)”Tracks workflow origin in format owner/repo/path@ref. Automatically populated when using gh aw add to install workflows from external repositories. Optional for manually created workflows.
source: "githubnext/agentics/workflows/ci-doctor.md@v1.0.0"Redirect (redirect:)
Section titled “Redirect (redirect:)”Specifies a new canonical location, using the same owner/repo/path@ref format as source:, when a workflow has been moved or renamed. gh aw add, gh aw add-wizard, and gh aw update follow redirect chains transitively (up to a depth limit) to the resolved location, rewrite the local source field accordingly, and report redirect loops as errors. gh aw compile emits an informational message when a redirect is configured.
redirect: "githubnext/agentics/workflows/new-workflow-name.md@main"Use gh aw update --no-redirect to fail the update instead of following the redirect — useful for auditing or controlling exactly when redirects are applied.
[!NOTE] The
redirectfield is set by workflow authors to signal that a workflow has moved. It is not typically set by end-users. If you see a redirect when runninggh aw update, it means the upstream workflow has been relocated.
Tracker ID (tracker-id:)
Section titled “Tracker ID (tracker-id:)”Tags every asset (issues, pull requests, discussions, comments) the workflow creates with a hidden HTML comment — <!-- gh-aw-tracker-id: … --> — enabling GitHub search to find all items associated with this workflow.
tracker-id: code-simplifierAccepts 8–128 alphanumeric characters, hyphens, and underscores. Most workflows use their filename as the tracker ID.
Search for all assets created by a specific workflow:
repo:owner/repo "gh-aw-tracker-id: code-simplifier" in:bodySee Footers for marker details and footer visibility control.
Private Workflows (private:)
Section titled “Private Workflows (private:)”Mark a workflow as private to prevent it from being installed into other repositories via gh aw add.
private: trueAdding the workflow from another repository then fails with workflow 'owner/repo/internal-tooling' is private and cannot be added to other repositories. Use this for internal tooling, sensitive automation, or repository-specific workflows not intended for reuse.
This only blocks installation via gh aw add; the visibility of the workflow file itself is controlled by your repository’s access settings.
check-for-updates
Section titled “check-for-updates”Controls whether the compile-agentic version update check runs in the activation job.
check-for-updates: trueWhen true (default), the activation job verifies the compiled version is not blocked and meets the minimum supported version. Set to false to disable this check (not allowed in strict mode).
Feature Flags (features:)
Section titled “Feature Flags (features:)”Enable experimental or optional compiler and runtime behaviors as key-value pairs. See Feature Flags for complete documentation.
Strict Mode (strict:)
Section titled “Strict Mode (strict:)”Disables enhanced security validation for production workflows.
strict: false # Disable for development/testingWorkflows compiled with strict: false cannot run on public repositories. The workflow fails at runtime with an error message prompting recompilation with strict mode.
See Network Permissions - Strict Mode Validation for details on network validation and CLI Commands for compilation options.
Related Documentation
Section titled “Related Documentation”See also: Trigger Events, AI Engines, CLI Commands, Workflow Structure, Network Permissions, Feature Flags, Custom Steps and Jobs, OpenTelemetry, Command Triggers, MCPs, Tools, Imports