🚀

Get Started

From zero to your first agentic workflow in minutes

Prerequisites

✅ Required

  • Inference access for the selected engine; Copilot access/billing for this guide’s Copilot example
  • GitHub CLI v2.45.0 or later
  • The gh-aw CLI extension
  • Admin access to the target repository

🔑 Tokens & Secrets

  • Copilot: copilot-requests: write for supported owner-seat or organization billing, or the COPILOT_GITHUB_TOKEN PAT alternative
  • GH_AW_AGENT_TOKEN — optional, needed for assign-to-agent
  • Custom PAT or GitHub App — optional, for cross-repo or elevated access

Install & Initialize

Three commands to go from zero to a fully initialized repository. The CLI handles scaffolding, engine selection, and configuration.

1

Install the gh-aw CLI extension

Adds the gh aw command to your GitHub CLI. Requires GitHub CLI v2.45.0 or later.

2

Initialize your repository

Run gh aw init —engine copilot in a disposable repository. Current initialization is noninteractive; the engine flag selects Copilot and sets up its integration files.

3

Select the inference authentication path

Use copilot-requests: write with supported billing and inference access; organization repositories also require the applicable policy. Otherwise configure the documented Copilot PAT alternative; do not assume every engine needs that token.

Terminal
# 1. Install the gh-aw CLI extension
gh extension install github/gh-aw

# 2. Initialize your repository
gh aw init --engine copilot

# 3. Only for the Copilot PAT alternative:
gh secret set COPILOT_GITHUB_TOKEN -R owner/repo

💡 What does gh aw init do? It configures repository files, the dispatcher skill, and optional engine/MCP integrations. It does not prompt for engine selection or configure inference secrets. Check gh aw init —help for your installed release.

Choose authentication — not every workflow needs a PAT

Current Copilot workflows can use permissions: copilot-requests: write without a PAT. GitHub documents owner-seat billing for personal repositories and organization billing for organization repositories. The steps below apply only to the alternative user-token path; that PAT is ignored when the Actions-token permission is selected. Verify inference access on the actual workflow run.

1

Generate a fine-grained token

Go to github.com/settings/personal-access-tokens/new and select Fine-grained personal access token.

2

Grant Copilot permission

Under Account permissions, set Copilot Requests to Read-only. No other permissions are required for the base token.

3

Store as a repository secret

Run gh secret set COPILOT_GITHUB_TOKEN -R owner/repo and paste the token when prompted — or add it via the repository Settings → Secrets → Actions page.

Secrets Reference

SecretWhen NeededPermission
COPILOT_GITHUB_TOKENCopilot PAT alternative only; not with copilot-requests: writeCopilot Requests: Read-only
GH_AW_AGENT_TOKENUsing assign-to-agentIssues: Read & Write
ANTHROPIC_API_KEYUsing engine: claude—
OPENAI_API_KEYUsing engine: codex—
GEMINI_API_KEYUsing engine: gemini—

Your First Workflow

Start with the staged, manual-dispatch backlog briefing shown on Home. Compile and review it in a disposable repository. Compilation checks syntax and generated configuration, not the truth of future agent findings.

1

Copy the bounded example

Copy examples/backlog-briefing.md from this overview into a disposable repository’s .github/workflows/. Keep staged: true and the manual trigger for the first demonstration.

2

Compile to a hardened Actions workflow

The compile command transforms your Markdown source into a .lock.yml file with pinned actions, sandboxed permissions, and safe outputs.

3

Push to your repository

Commit both the .md source and the .lock.yml compiled file. GitHub Actions picks up the lock file automatically on the next trigger.

Terminal
# 1. Copy examples/backlog-briefing.md into .github/workflows/
#    in a disposable repository, then inspect its permissions.

# 2. Compile to a hardened Actions workflow
gh aw compile .github/workflows/backlog-briefing.md

# 3. Review the .md and generated .lock.yml together.
#    Commit through your normal reviewed development process.
#    Cloud dispatch is a separate, deliberate action.

Review before running. The example is compiler-checked with v1.2.2, not cloud-executed. Manual dispatch still consumes inference/Actions resources. Staged outputs preview a proposed write, not a durable approval queue. To demonstrate, review the run output and explain the human decision; do not enable publishing merely to finish the demo.