GitHub Agentic Workflows: what it is and how to use it in GitHub Actions with Copilot, Claude, or Codex

GitHub Agentic Workflows lets you write repository automations in a Markdown file—a short YAML frontmatter plus instructions in natural language—that the gh aw CLI compiles to a normal GitHub Actions workflow executed by an AI agent. GitHub announced it as generally available (GA) on October 28, 2026 for GitHub Free, Team, and Enterprise on github.com.

Note on status: at the time of publishing this note, the docs.github.com tutorial still described the feature as “public preview”. The GitHub changelog from October 28 is the GA announcement.

The pitch is simple: those triage tasks, labeling, CI failure investigation, or status reports for which you’d never write 300 lines of YAML are now described in a paragraph, and an agent executes them on each event, with read-only permissions by default.

What is GitHub Agentic Workflows and how does it differ from GitHub Actions?

It’s a layer on top of GitHub Actions, not a replacement. GitHub Actions is the CI/CD system built into GitHub: workflows in YAML inside .github/workflows/ that trigger on repository events (a push, a pull request, a new issue) and execute deterministic steps. Agentic Workflows adds a new file type in that same folder, with .md extension.

The gh aw compile command converts that Markdown into a .lock.yml file alongside it: a normal Actions workflow, and that’s what GitHub actually executes. You commit both.

The Markdown file has two parts:

  • Frontmatter (YAML): when it runs (on:), what the agent can read (permissions:), what it’s allowed to produce (safe-outputs:), which engine executes it (engine:), and limits like timeout-minutes:.
  • Body (Markdown): the instructions for the agent, written as you’d explain the task to a team member.

Why compile instead of reading the Markdown directly? The lock file is where security barriers become concrete: the sandbox, the firewall, and separate jobs that enforce what the agent proposes. Editing the body instructions doesn’t require recompiling; changing the frontmatter does.

Does it work with Claude Code, Codex, or Gemini, or just Copilot?

It works with all four. The engine is chosen per workflow with the engine: key, and if you don’t define it, the default is Copilot.

Engine engine: value Credential (repository secret)
GitHub Copilot CLI copilot (default) Organization repos: none; add copilot-requests: write to permissions and the built-in GITHUB_TOKEN is used. Personal repos: COPILOT_GITHUB_TOKEN
Claude Code claude ANTHROPIC_API_KEY
OpenAI Codex codex OPENAI_API_KEY
Google Gemini CLI gemini GEMINI_API_KEY

On personal repositories, COPILOT_GITHUB_TOKEN is a fine-grained personal access token from your account with the Copilot Requests permission set to Read. It’s separate from the default GITHUB_TOKEN.

That is, a Copilot license is only required if you use the Copilot engine. A team that already pays for Anthropic or OpenAI API access can run the same workflows with those keys: Claude Code on GitHub Actions is literally one line of frontmatter.

What do you need to use it and does it work on Windows?

  • GitHub CLI gh version 2.0.0 or higher (gh --version)
  • Write permission in the repository, with GitHub Actions enabled
  • An account with one of the four engines from the table above
  • Linux, macOS, or Windows through WSL: the quickstart doesn’t offer a native path for Windows

If gh isn’t authenticated with the necessary scopes:

gh auth login --scopes repo,workflow

How do you install gh aw and add your first workflow?

Install the CLI extension:

gh extension install github/gh-aw

Then, from your repository root, add a ready-to-use workflow from GitHub Next’s agentics collection. Let’s go with Issue Triage:

gh aw add-wizard githubnext/agentics/issue-triage

The wizard asks which engine to use; add --engine claude (or codex, gemini) to skip the question. It writes two files in .github/workflows/: the Markdown source and its compiled .lock.yml. Configure your engine’s secret, commit both files to the default branch, and the workflow is live.

To review executions:

gh aw status
gh run watch

The agentics repository has dozens more workflows that you add the same way: CI Doctor (investigates CI failures), Daily Repo Status, PR Fix, Link Checker, Daily Malicious Code Scan, and others.

What does an issue triage workflow look like inside?

This is the frontmatter from the Issue Triage workflow you just added:

---
on:
  issues:
    types: [opened, reopened]
  reaction: eyes

permissions:
  contents: read
  issues: read

safe-outputs:
  add-labels:
    allowed:
      - bug
      - feature
      - question
      - needs-info
      - priority/p0
      - priority/p1
      - priority/p2
      - duplicate
      - invalid
      - spam
    max: 4
  add-comment:
    max: 1
  set-issue-type:
    max: 1

timeout-minutes: 10
---

(The actual file also includes a description: field, which we’ve omitted here.)

Notice the detail that matters: issues: read. The agent can’t write a label. What it can do is propose up to four labels, only from that allowed list, plus a comment and an issue type. A separate job, with its own write permission, applies them after the checks.

The body is a plain English brief in six steps: gather context (read the issue, the repo’s labels, recently opened and closed issues, the documentation), assess completeness (ask for what’s missing rather than guess), classify and prioritize (with explicit definitions of p0, p1, and p2), detect duplicates (and never mark one just because the title looks similar), evaluate if a code agent could take it, and publish a report.

Two practical notes from the workflow’s own documentation:

  • The labels in allowed must exist in your repository. Create them or edit the list to match your conventions.
  • It only triggers when an issue is opened or reopened; you can’t run it manually.

How do you change the instructions or the AI engine?

Edit .github/workflows/issue-triage.md. If you only change the body instructions, commit and push. If you change the frontmatter—a new trigger, another label list, another engine—recompile first:

gh aw compile

Then commit both files: the .md and the regenerated .lock.yml. Switching engines is one line:

---
engine: claude
---

For workflows that support manual execution, gh aw run <workflow-name> launches a run whenever you want.

If you’d rather not write the file, gh aw init adds the skills and instructions a code agent needs to create agentic workflows for you. The official GitHub tutorial does exactly that: you ask the agent to create a PR reviewer that verifies changes have tests, review what it generates, and commit.

Is it safe to let an agent touch your repository?

This is the section for the CTO. The defaults, according to the GA announcement and reference documentation, are:

  • Read-only by default. The agent’s job runs without write permissions.
  • Safe outputs. Everything the agent wants to change—a label, a comment, an issue, a PR—is declared in safe-outputs with limits (max, allowed, blocked), and a separate job applies them.
  • Threat detection. A job reviews each proposed change before applying it.
  • Sandbox and firewall. The agent runs in an isolated container behind the Agent Workflow Firewall, and integrity filter rules control what GitHub content it can access.

What about merging? GitHub’s technical guide from February 2026, written during preview, stated that agentic workflow pull requests “never auto-merge”. The GA reference has more nuance: it now includes a merge-pull-request safe output that merges “after passing policy gates”, marked as experimental and limited to one. The accurate summary is: an agent can’t merge anything unless you explicitly declare that output in the frontmatter. If merge isn’t in your safe-outputs, it doesn’t happen. That line is your governance policy, and it’s reviewed in a PR like any other code.

How much does GitHub Agentic Workflows cost?

The GA announcement doesn’t mention a separate price for Agentic Workflows. Each workflow runs as a GitHub Actions job, so the cost is Actions execution plus whatever the engine consumes.

  • Copilot engine: GitHub’s technical guide from February indicated that each execution typically consumes two premium requests: one for the agent’s work and another for the safe outputs check. This is a figure from GitHub itself during preview; check your actual consumption once you have it running.
  • Claude, Codex, Gemini: billed to your API key at each provider’s rates.

With GA, gh aw forecast is no longer experimental: it estimates in ranges the monthly spend in AI credits, including threat detection credits. Run it before deploying a workflow across dozens of repositories.

When should you use it and when shouldn’t you?

It shines at repetitive, low-judgment work that nobody wants to own: triage, labeling, CI failure investigation, daily reports, stale documentation. It doesn’t replace a deterministic pipeline: builds, tests, and deploys should stay in normal Actions YAML, where the same input always gives the same output.

If you already automate with agents outside GitHub, the direct comparison is with Cursor Automations and Claude Code Routines: the difference is that here the agent lives inside Actions, with repository permissions as the boundary.

A good first step is a single, mostly read-only workflow—triage or Daily Repo Status—on an active repository, with gh aw forecast run beforehand. Then scale up.


What about you? What repetitive task in your repository would be the first one you’d delegate to an agent?

Would you let an agent merge pull requests in your repository?
  • Never: merging is always done by a person
  • Yes, with policy gates and only in low-risk repositories
  • Haven’t decided yet
  • I prefer another option (tell us which)
0 votantes

Comment below or, if this article reached you by email, reply directly to the email: your answer is published here.

Related: GitHub Copilot No Longer Wants to Be a Copilot