GitHub's pitch for Agentic Workflows is that you describe a repository chore in plain English and a coding agent carries it out on GitHub's own automation platform. The general-availability announcement puts it simply: you "define your automation in natural language Markdown files," and the tooling compiles them "into standard Actions YAML." The feature is available on GitHub Free, Team and Enterprise. One condition matters for most small teams: using the default GitHub Copilot engine "requires a Copilot license."

That compilation step is easy to overlook, and it is the most important thing to understand before you start. YAML (a human-readable configuration format) is what GitHub Actions actually executes. The Markdown file feels like a prompt, but it is really source code for a workflow that runs on GitHub's machines with whatever permissions the compiled file grants. Treat it the way you would treat a shell script that someone emailed you: it can be useful, and you should still read it before running it.

This guide walks through one deliberately modest example, GitHub's daily repository status report. It reads recent activity and files a summary issue. The agent cannot merge code, touch secrets or push commits, and that limit is the point. If your first agentic workflow can only produce something a person reads, you learn how the system behaves while mistakes stay cheap.

What you need before you start

GitHub's quickstart estimates about ten minutes for setup and two to three minutes for a typical run. The prerequisites are short:

  • An account with one supported AI engine: GitHub Copilot, Anthropic Claude, OpenAI Codex or Google Gemini.
  • Write access to a GitHub repository, with GitHub Actions enabled.
  • The GitHub CLI (command-line interface), the gh tool, at version 2.0.0 or later, installed and signed in.
  • Linux, macOS, or Windows with WSL (Windows Subsystem for Linux).

None of this requires an enterprise plan. It does require someone to pay for the model. Use a test repository, or a real one you are comfortable discussing in a public-facing issue. The report lands as an issue, so in a public repository, anyone can read it.

Choosing an engine: what differs is authentication and billing

This guide does not rank the engines. For a first workflow, the practical differences lie in how each one authenticates and who sends the bill. GitHub's Actions tutorial lists the credentials:

Engineengine valueWhat you store as a repository secret
Copilot CLI (default)copilotNothing for organization-owned repositories. For personal repositories, COPILOT_GITHUB_TOKEN: a fine-grained PAT (personal access token) with the Copilot Requests permission set to Read
Claude CodeclaudeANTHROPIC_API_KEY
OpenAI CodexcodexOPENAI_API_KEY
Google Gemini CLIgeminiGEMINI_API_KEY (a Google AI Studio key)

An API (application programming interface) key is a credential that lets software call a provider's service on your account. With Copilot, usage runs through your Copilot license. With the other three engines, you bring your own provider account, and usage against that key is billed by the provider under its own terms. In either case, the GitHub Agentic Workflows documentation reports usage in AI Credits (AIC) and says one AIC equals $0.01. The material we reviewed does not explain how those AIC figures map onto a third-party provider's invoice. If you use your own engine, watch both the GitHub-side estimates and your provider's usage dashboard.

For organization repositories on Copilot, the tutorial notes that adding copilot-requests: write under the workflow's permissions lets the built-in Actions token stand in for a personal token, so no separate secret is required. Fewer long-lived tokens is a reasonable goal. Keep in mind what that permission is for: it lets the workflow authenticate to Copilot and bill requests to your organization. It does not grant the agent any ability to change your repository's code, issues or pull requests.

Installing the tooling and adding the workflow

Sign in to the GitHub CLI with the two scopes the documentation asks for, then install the gh aw extension:

gh --version
gh auth login --scopes repo,workflow
gh extension install github/gh-aw

From the root of your repository, run the interactive wizard with the status-report template:

gh aw add-wizard githubnext/agentics/daily-repo-status

The wizard asks which engine to use and may prompt you to set up the matching secret. Enter the secret only at the wizard's prompt or in your repository's secret settings. Never paste it into the Markdown file, a commit message or an issue. The wizard then opens a pull request that adds two files to .github/workflows/: daily-repo-status.md, which you edit, and daily-repo-status.lock.yml, the compiled workflow generated from it.

The CLI reference documents an --auto-merge option for this command. Do not use it. The pull request is your review step, and skipping it means a workflow you have not read goes straight onto your default branch.

Reading what you are about to merge

Open the Markdown file first. The frontmatter (the configuration block between the --- lines) defines how much the agent can do. The published template contains settings along these lines. This excerpt was checked against the template at the time of writing, and your copy may differ:

on:
  schedule: daily
  workflow_dispatch:

permissions:
  contents: read
  issues: read
  pull-requests: read

network: defaults

tools:
  bash: ["cat", "ls", "find", "grep", "head", "tail", "wc"]
  github:
    lockdown: false
    min-integrity: none

safe-outputs:
  mentions: false
  allowed-github-references: []
  create-issue:
    title-prefix: "[repo-status] "
    labels: [report, daily-status]
    close-older-issues: true

Most of this is reassuring. The repository permissions are read-only. Network access uses a default allowlist. The output is restricted to creating one kind of issue, with a fixed title prefix and labels, and with @-mentions turned off.

The shell allowlist is mostly reassuring too, but read it rather than trusting its intent. The commands are read-oriented, yet shell access is never intrinsically read-only: find, for instance, has forms such as -delete and -exec that remove files or run other programs. What actually caps the damage is the layer underneath. The agent's repository token is read-only, so it cannot push changes back to GitHub, and the agent runs inside a sandboxed container, so anything it alters locally disappears with the run. The allowlist narrows what the agent can attempt; the token permissions and isolation limit what any attempt can achieve. If you add commands later, check each one for forms that write, delete or execute.

The two lines under github: deserve a second look, because together they decide whose words reach the agent. lockdown: false is the template's explicit choice to let the agent read issues, pull requests and comments from third parties in a public repository. min-integrity controls GitHub's integrity filtering, which decides which GitHub content reaches the agent at all. The setting none admits everything, including issues and comments from first-time accounts with no connection to the project. If you leave the setting out, public repositories automatically get approved, which limits content to owners, members, collaborators, trusted bots and similar sources. The template explicitly opts out of that default so that its report can cover everyone's activity. For a public repository, consider changing the line to min-integrity: approved and accepting a narrower report. Private repositories get no automatic filter, so set the threshold yourself if outside contributors can file issues.

Frontmatter changes take effect only after you recompile:

gh aw compile

Then read the .lock.yml file. It is long and machine-generated, but it is what will actually run, so a plain text search for permissions is a good way in. You are checking two things.

First, find the job that runs the agent and confirm it holds no write scopes over repository content: no contents: write, issues: write, pull-requests: write or similar. On an organization-owned repository using Copilot, you may legitimately see copilot-requests: write in that job. That is the Copilot authentication and billing permission described above, not a way to modify the repository, so it is expected rather than alarming.

Second, find the separate job that creates the issue and confirm that issues: write appears there, and only there. If you see a repository write scope in the agent's job, or anywhere you cannot explain, stop and work out why before merging.

Where the write actually happens

The agent's repository permissions are read-only, yet the workflow creates an issue every day. It does so through a mechanism GitHub calls safe outputs. According to the safe outputs reference, "the agent requests issue creation; a separate job with issues: write creates it." The agent never holds the write permission. It produces a structured request, which is checked against the limits you declared, such as the title prefix and labels. Only then does a different job carry it out.

Before that job runs, the announcement says, "a dedicated threat detection job scans all proposed changes before they're applied." The project documentation adds that outputs are sanitized and that findings follow your configured block-or-review policy.

For your first run, you can go further and turn writes off entirely. Staged mode previews every safe output in the Actions step summary without creating anything:

safe-outputs:
  staged: true
  create-issue:
    title-prefix: "[repo-status] "
    labels: [report, daily-status]

Recompile, run the workflow, read the preview and remove staged: true only when you are satisfied with what the agent would have posted.

The trust boundary, in plain terms

It helps to separate two questions: what can push the agent off course, and how much damage a misled agent can do.

The first question has an uncomfortable answer: almost anything the agent reads. Repository files, issue bodies, pull request descriptions, review comments, tool responses and external web pages are all text, and a language model cannot reliably tell instructions from data. This is indirect prompt injection. The UK National Cyber Security Centre's paper on adversarial attacks notes that in agentic systems, such manipulation "could also originate from system inputs, tool responses or other agentic systems." The issue tracker of a public repository is exactly that kind of input. Anyone can post there. Some tools in this setup are connected through MCP (Model Context Protocol), a standard way to give AI agents access to external tools and data. Every response from those tools is another channel for injected instructions.

Untrusted repository material enters a contained agent workspace while a human retains locked credentials and merge control
Untrusted inputs can reach the agent, but credentials and the final merge control remain outside its enclosure.

The GenAI Security Project of the Open Worldwide Application Security Project (OWASP) is blunt about the limits: "No mitigation eliminates prompt injection entirely," because instructions and data share the same input stream. Integrity filtering reduces how often hostile text reaches the model. It does not guarantee that hostile text never gets through.

That shifts the weight to the second question. Impact depends on the controls around the agent, not on how well the prompt is written:

  • Permissions. Read-only by default, and the status report needs nothing more.
  • Secrets. The project documentation says agents hold zero secrets, and an API proxy keeps the tokens out of the agent's reach.
  • Network. The Agent Workflow Firewall limits outbound traffic to an allowlist, which makes it harder to send stolen data out.
  • Runner isolation. Docker containers are the default. Cloud Hypervisor and NVX micro-VMs (lightweight virtual machines) are also available, though the documentation describes them as preview runtimes with host requirements. Do not assume your runners support them.
  • Safe outputs and threat detection. Writes are declared, validated and carried out separately.
  • Human approval. Protected environments can require a reviewer before write jobs run.

OWASP calls privilege minimization "the most effective control" and recommends explicit human confirmation for high-consequence actions, noting that an agent that asks before acting "creates a checkpoint that injection alone cannot bypass." That is why the worked example stops at a report.

Be precise about what that buys you. Keeping the agent to a report sharply limits the consequential changes a manipulated run can make to your repository. It does not make prompt injection harmless. A poisoned run could still write a deceptive summary that a busy maintainer believes, burn through AI Credits, copy repository material the agent can read into its output, or misuse whatever network and tool access you have left configured. Those are real costs, and they are the reason to keep integrity filtering tight and the network allowlist short. But they are a different order of risk from an agent holding a broad write token with auto-merge switched on, where the same poisoned comment could end up as code on your main branch.

Running it, reading the logs and checking the cost

Once the pull request is merged, trigger a run manually rather than waiting for the schedule:

gh aw run daily-repo-status

Then look at what happened. The CLI reference documents commands for this:

gh aw logs daily-repo-status
gh aw audit <run-id>

gh aw logs lists tokens, AI Credits and turns for each run. gh aw audit, given a run ID or run URL from the Actions tab in place of the <run-id> placeholder, breaks down a single run. If you tightened integrity filtering, the logs record dropped items as DIFC_FILTERED events, which helps explain why a report left something out.

For spending, the forecast command projects AIC usage from recent run history:

gh aw forecast daily-repo-status
gh aw forecast daily-repo-status --days 7

The announcement says the forecast is no longer experimental and now includes threat-detection credits and monthly ranges. The CLI reference adds that every forecast is an estimate that "may be inaccurate." A forecast based on one run is little more than a guess. Run it again after the workflow has been on its schedule for a while.

Budgets give you a hard ceiling. The project documentation says max-ai-credits caps a single run and is on by default at 1,000 AIC. max-daily-ai-credits limits a workflow to 5,000 AIC by default over 24 hours, and the agent is skipped when it is over budget. At the documented rate of one cent per credit, those defaults are generous for a summary report, so lower them if your forecast suggests the job needs far less. Again, if you use your own engine, check the provider's own usage figures too.

Turning it off

You should know how to stop a workflow before you need to. Two commands cover it:

gh aw disable daily-repo-status
gh aw remove daily-repo-status

disable stops future runs and, according to the CLI reference, cancels any in-progress runs. Use it when a report looks wrong and you want time to investigate. remove deletes both the .md and .lock.yml files. Commit and push that change, and delete any provider API key secret you created for the experiment if nothing else uses it.

When an agent is the wrong tool

GitHub's tutorial describes agentic workflows as repository automations carried out by coding agents. Model judgment is the whole point, and the cost and risk come from the same place. A model's interpretation of the inputs cannot be unit-tested the way a function can, and it reads text that strangers can write.

So the decision rule is straightforward. Use an agentic workflow when the task needs contextual judgment over messy input and its output is something a person will review: summarizing a week of activity, drafting a triage note, or flagging pull requests that seem to lack tests. Use a deterministic GitHub Action when fixed logic can do the job and you can test it directly: applying a label when a path changes, failing a build when coverage drops below a threshold, or closing stale issues after a set period of inactivity. Those tasks need no model, and adding one brings cost, variability and a new attack surface without benefit.

There is also a middle ground worth keeping. An agentic workflow can propose, through an issue, a review comment or a draft pull request, while merging, deploying and changing secrets stay with people and deterministic checks. Agentic Workflows are not a safer kind of automation by default. They are a more flexible kind, and that flexibility only pays off when the agent's authority is tightly limited.

What to do before your first scheduled run

Merge the workflow only after you have read the compiled .lock.yml file and confirmed that the agent's job has no permission to change repository content and that issues: write appears only in the separate safe-output job.

Sources and evidence notes
  • GitHub Changelog: GitHub Agentic Workflows generally available (October 28, 2026). Release date; availability on Free, Team and Enterprise; Copilot license requirement for the default engine; Markdown-to-Actions-YAML compilation; safeguards (integrity filter, read-only default, sandboxed container, Agent Workflow Firewall, safe outputs, threat detection); forecast no longer experimental, now including threat-detection credits and monthly ranges; micro-VM isolation.
  • GitHub Docs: Your first agentic workflow (quickstart). Prerequisites, approximately ten-minute setup and two-to-three-minute run time, gh auth/extension/add-wizard/compile/run commands, the four supported engines and their secret names, generated .md and .lock.yml files, wizard pull request, and the report-as-issue behavior.
  • GitHub Docs: Develop agentic workflows in GitHub Actions. Engine credential table (engine values and repository secrets, including COPILOT_GITHUB_TOKEN for personal repositories and copilot-requests: write with the built-in GITHUB_TOKEN for organization repositories) and the description of agentic workflows as Markdown-defined automations run by coding agents.
  • GitHub Agentic Workflows documentation. Agents holding zero secrets behind an API proxy, allowlisted network and firewall, safe outputs and threat detection, Docker default and preview micro-VM runtimes, protected-environment reviewers, max-ai-credits and max-daily-ai-credits defaults, 1 AIC = $0.01, gh aw logs and gh aw audit, and the advice to review generated changes before merging.
  • GitHub Agentic Workflows: CLI reference. Verified syntax and behavior for gh aw add-wizard (including the --auto-merge option), run, logs, audit, forecast (--days 7 or 30; estimates may be inaccurate), disable (cancels in-progress runs) and remove (deletes .md and .lock.yml).
  • GitHub Agentic Workflows: GitHub Integrity Filtering reference. Meaning of min-integrity levels (merged, approved, unapproved, none) and defaults: approved is applied automatically on public repositories when unset; no automatic filter on private repositories.
  • GitHub Agentic Workflows: Safe Outputs reference. How a separate job with issues: write carries out the agent's issue request, and the staged: true preview mode syntax and behavior (writes skipped, preview in the Actions step summary).
  • githubnext/agentics: repo-status workflow template. Frontmatter of the daily repository status template (schedule and manual trigger, read-only permissions, default network, bash command allowlist, lockdown: false, min-integrity: none, create-issue safe output settings).
  • UK National Cyber Security Centre: Understanding adversarial attacks against Machine Learning and AI. Independent evidence that manipulation in agentic AI can originate from system inputs, tool responses or other agentic systems (indirect prompt injection).
  • OWASP GenAI Security Project: Prompt Injection. Statement that no mitigation eliminates prompt injection; privilege minimization as the most effective control; treating output as untrusted; human confirmation for high-consequence actions.