This short, hands-on tutorial will get you from zero to a running agentic workflow. You'll install the extension, add a sample workflow, set up the required secrets, compile the workflow to a lock file, and run it. Ready? Let's go! π
- Install the
gh-awextension - Add the sample
weekly-researchworkflow to your repository - Add the required AI API key secret
- Compile and run the workflow
- Inspect logs and iterate
- GitHub CLI (
gh) installed and authenticated. Check with:
gh auth status
gh --version- A repository you can push to (or a fork) and permission to add Actions secrets.
gh extension install githubnext/gh-awVerify that gh aw is available:
gh aw --help
gh aw versionThe easiest way to get started is to add a sample from the Agentics collection. From your repository root run:
gh aw add weekly-research -r githubnext/agentics --prThis creates a pull request that adds .github/workflows/weekly-research.md and the compiled .lock.yml. Review and merge the PR into your repo.
Agentic workflows use an AI engine. For Claude add this repository secret:
gh secret set ANTHROPIC_API_KEY -a actions --body "<your-anthropic-api-key>"For Codex (experimental), add:
gh secret set OPENAI_API_KEY -a actions --body "<your-openai-api-key>"These secrets are used by Actions at runtime.
Generate the compiled workflow file (.lock.yml) from your markdown source:
gh aw compileTo watch for edits while authoring (useful during development):
gh aw compile --watchTrigger the workflow immediately (local execution or dispatch, depending on your setup):
gh aw run weekly-researchDownload and inspect execution logs:
gh aw logs weekly-researchgh aw statusβ Check workflow installation statusgh aw logsβ Download recent run logs and cost/usage analysisgh aw mcp-inspectβ Inspect MCP servers and tools- If compilation fails, run
gh aw compile --verbosefor more details and follow the error output.
- Tweak the frontmatter and content to fit your use case π©βπ»
- Explore other samples in The Agentics
- Read more: Workflow Structure, Frontmatter Options, MCPs, and Authoring in VS Code
You did it β you're ready to start automating with agentic workflows! β¨