How a Markdown agentic workflow compiles to a lock file, runs read-only and writes back only through declared safe outputs.
From Ultra Transcenders AZ-401 by Tony Rough
GitHub Agentic Workflows are repository automations written in natural-language Markdown and executed by a coding agent inside GitHub Actions. GitHub’s documentation describes them as in public preview and subject to change, so treat everything below as preview behaviour.
A normal workflow scripts every decision as YAML steps. An agentic workflow keeps YAML frontmatter for the parts that must be deterministic (triggers, permissions, tools and allowed outputs) and describes the goal in a Markdown body, letting the agent decide how to reach it. GitHub’s examples include issue triage, investigating CI failures, weekly status reports, documentation upkeep and improving test coverage, and its tutorial builds a pull request reviewer that checks whether changes are adequately tested.
| Element | Agentic workflow | Standard workflow |
|---|---|---|
| Definition | Markdown file in .github/workflows/ with YAML frontmatter and natural-language instructions |
YAML file in .github/workflows/ |
| What runs | A compiled .lock.yml Actions workflow generated by gh aw compile; both files are committed |
The YAML as written |
| Decision logic | Agent reasoning within frontmatter guardrails | Predefined steps and expressions |
| Default permissions | Read-only (read-all) unless more are granted |
Whatever permissions and repository defaults allow |
| Writing to GitHub | Only through declared safe-outputs such as create-issue, add-comment, create-pull-request, validated and scanned before they’re applied |
Any API call the token allows |
| Cost | Actions minutes plus AI inference | Actions minutes |
engine frontmatter key selects the agent. GitHub Copilot is the default (it needs a Copilot plan); Anthropic Claude, OpenAI Codex and Google Gemini are also supported, each with its own repository secret.safe-outputs are performed, after validation. Figure 10.1 traces a workflow from file to write.max-ai-credits caps a run, with a default of 1,000 AIC; gh aw logs and gh aw audit show usage and estimated cost, which GitHub notes are best-effort estimates.
---
on:
schedule:
- cron: '0 8 * * 1'
permissions:
issues: read
copilot-requests: write
safe-outputs:
create-issue:
---
Summarise the last seven days of issue activity: counts, recurring
themes, notable open issues and recommended next steps.gh extension install github/gh-aw (GitHub CLI 2.0.0 or later, authenticated with repo and workflow scopes; from gh 2.90.0 any gh aw command offers to install it).gh aw init, which adds skills, instructions and a custom agent for authoring.agentic-workflows skill and describe the workflow; the agent writes the Markdown file and compiles the lock file.gh aw compile again.on: events (same syntax as GitHub Actions), or with gh aw run <workflow-name>.Authentication depends on ownership. In organisation-owned repositories billed to the organisation, an administrator enables the Copilot CLI policies, the frontmatter adds copilot-requests: write, and the built-in GITHUB_TOKEN is used; if that token lacks Copilot access the run fails and a COPILOT_GITHUB_TOKEN (a fine-grained PAT) is needed. Personal repositories and third-party engines always use a stored secret, set in the Actions secrets UI or with gh aw secrets set. Workflows can be imported from other repositories with gh aw add or gh aw add-wizard and refreshed with gh aw update; import only from trusted sources, and note that workflows marked private: true can’t be imported.
Use an agentic workflow where judgement over messy input adds value and the output is reviewable: triage, summaries, investigation and draft fixes. Keep builds, releases and production deployments deterministic: GitHub notes that an agentic workflow can call approved, deterministic reusable workflows rather than duplicating their logic, which keeps the agent’s role advisory while the release path stays scripted and gated by environments.
Common trap: Granting an agentic workflow broad write permissions so the agent can comment or open pull requests - write actions are meant to go through declared
safe-outputs, which are validated before they run, while the workflow itself stays read-only by default.
This note is one section of Ultra Transcenders AZ-401: Designing and Implementing Microsoft Agentic DevOps Solutions, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to Microsoft Learn.
Free to read with Kindle Unlimited. Opens Amazon in a new tab.
About the book · AZ-401 terms in the glossary · All AZ-401 study notes
How the Azure DevOps MCP server runs locally or remotely, signs in and limits which tools an agent can call.
What stops the Copilot cloud agent doing harm: its branch, firewall, workflow approval, reviewer rules and who can assign it work.
How the branching models differ, and which fits a team's release cadence and its use of coding agents.
How to create Azure SRE Agent, scope its managed identity and choose run modes and response plans.
How workload identity federation lets a workflow sign in to Azure with no stored secret, and which subject claims to trust.
How blue-green, canary, ring and progressive exposure differ in how fast they widen exposure and how each rolls back.
How the two package platforms compare on feeds, upstream sources, permissions and billing.