Quick Start
Prerequisites
Section titled “Prerequisites”Before installing, ensure you have:
- ✅ GitHub CLI v2.0.0+ installed and authenticated (
gh auth login) - ✅ GitHub account with admin or write access to a repository
- ✅ GitHub Actions enabled in your repository
- ✅ Git installed on your machine
- ✅ Operating System: Linux, macOS, or Windows with WSL
Verify your setup:
gh --version # Should show version 2.0.0 or highergh auth status # Should show "Logged in to github.com"git --version # Should show git version 2.x or higherAgentic Setup
Section titled “Agentic Setup”If you want to use Copilot to configure GitHub Agentic Workflows, run:
npx --yes @github/copilot -i "activate https://raw.githubusercontent.com/githubnext/gh-aw/refs/heads/main/install.md"How Agentic Workflows Work
Section titled “How Agentic Workflows Work”Before installing anything, it helps to understand the workflow lifecycle:
1. You write 2. Compile 3. GitHub Actions runs .md file → gh aw compile → .lock.yml file (natural (translates to (GitHub Actions language) GitHub Actions) executes)Why two files?
.mdfile: Human-friendly markdown with natural language instructions and simple YAML configuration. This is what you write and edit..lock.ymlfile: Machine-ready GitHub Actions YAML with security hardening applied. This is what GitHub Actions runs.- Compilation: The
gh aw compilecommand translates your markdown into validated, secure GitHub Actions YAML.
Think of it like writing code in a high-level language (Python, JavaScript) that gets compiled to machine code. You write natural language, GitHub runs the compiled workflow.
Step 1 — Install the extension
Section titled “Step 1 — Install the extension”Install the GitHub CLI, then install the GitHub Agentic Workflows extension:
gh extension install githubnext/gh-awStep 2 — Add a sample workflow
Section titled “Step 2 — Add a sample workflow”Add a sample from the agentics collection. From your repository root run:
gh aw add githubnext/agentics/daily-team-status --create-pull-requestThis creates a pull request that adds .github/workflows/daily-team-status.md and the compiled .lock.yml (the generated GitHub Actions workflow file). Review and merge the PR into your repo.
Step 3 — Add an AI secret
Section titled “Step 3 — Add an AI secret”Agentic workflows need to authenticate with an AI service to execute your natural language instructions. By default, they use GitHub Copilot as the coding agent (the AI that executes your workflow instructions).
To allow your workflows to use Copilot, you’ll create a token and add it as a repository secret.
Create a Personal Access Token (PAT)
Section titled “Create a Personal Access Token (PAT)”Create a Personal Access Token to authenticate your workflows with GitHub Copilot:
- Visit https://github.com/settings/personal-access-tokens/new
- Configure the token:
- Token name: “Agentic Workflows Copilot”
- Expiration: 90 days (recommended for testing)
- Resource owner: Your personal account (required for Copilot Requests permission)
- Repository access: “Public repositories” (required for Copilot Requests permission to appear)
- Add permissions:
- In “Account permissions” (not Repository permissions), find “Copilot Requests”
- Set to “Access: Read”
- Click “Generate token” and copy it immediately (you won’t see it again)
Add the token to your repository
Section titled “Add the token to your repository”Store the token as a repository secret:
- Go to your repository → Settings → Secrets and variables → Actions
- Click New repository secret
- Set Name to
COPILOT_GITHUB_TOKENand paste the token in Secret - Click Add secret
Repository secrets are encrypted and only accessible to workflows in your repository. See GitHub Copilot CLI documentation for more details.
Verify your setup
Section titled “Verify your setup”Before running workflows, verify everything is configured correctly:
gh aw statusExpected output:
Workflow Engine State Enabled Schedule──────────────────────────────────────────────────────────────daily-team-status copilot ✓ Yes 0 9 * * 1-5This confirms the workflow is compiled, enabled, and scheduled correctly.
Step 4 — Trigger a workflow run
Section titled “Step 4 — Trigger a workflow run”Trigger the workflow immediately in GitHub Actions:
gh aw run daily-team-statusAfter a few moments, check the status:
gh aw statusOnce complete, a new issue will be created in your repository with daily news! The report will be automatically generated by the AI based on recent activity in your repository.
Understanding Your First Workflow
Section titled “Understanding Your First Workflow”The daily team status workflow creates a status report every weekday and posts it as an issue:
---on: schedule: - cron: "0 9 * * 1-5" workflow_dispatch:permissions: contents: read issues: read pull-requests: readnetwork: defaultstools: github:safe-outputs: create-issue:---
# Daily Team Status
Create an upbeat daily status report for the team as a GitHub issue.- Recent repository activity (issues, PRs, releases, code changes)- Team productivity suggestions and improvement ideas- Community engagement highlights- Project investment and feature recommendations
...
1. Gather recent activity from the repository2. Create a new GitHub issue with your findings and insightsCustomize Your Workflow
Section titled “Customize Your Workflow”Edit the .md file and recompile with gh aw compile. For AI-assisted customization using GitHub Copilot CLI:
npm install -g @github/copilot-cligh aw initcopilot> /agent> select create-agentic-workflow> edit @.github/workflows/daily-team-status.mdWhat’s next?
Section titled “What’s next?”Use Authoring Agentic Workflows to create workflows with AI assistance, explore more samples in the agentics repository, and learn about workflow management in Packaging & Distribution. To understand how agentic workflows work, read How It Works.