GitHub Agentic Workflows
AI agents in your CI/CD pipeline - write Markdown, get intelligent automation.
What It Is
GitHub Agentic Workflows (technical preview, Feb 2026) lets you define automation in Markdown instead of YAML. An AI agent interprets your intent and executes it using GitHub Actions.
.github/workflows/triage.md (you write this in plain English)
|
v
gh aw CLI extension (converts to GitHub Actions workflow)
|
v
GitHub Actions runner (executes with an AI coding agent)
|
v
GitHub MCP Server (reads/writes repos, issues, PRs)
How It Works
1. Write a workflow in Markdown
<!-- .github/workflows/triage-issues.md -->
# Triage New Issues
When a new issue is created:
1. Read the issue title and body
2. Check if it's a bug report, feature request, or question
3. Apply the appropriate label (bug, enhancement, question)
4. If it's a bug, check if there's a similar open issue and link it
5. If it's a question, add a comment pointing to relevant docs
2. The agent interprets and executes
The gh aw CLI converts this to a GitHub Actions workflow that:
- Triggers on
issues.opened - Spins up an AI agent (Copilot CLI, Claude Code, or Codex)
- The agent reads the issue via the GitHub MCP Server
- Executes the steps described in your Markdown
- Writes back to GitHub through safe-outputs
3. Safe-outputs (the security model)
The agent gets broad read access but can only write through explicitly defined safe-outputs:
# Triage New Issues
## Safe Outputs
- Add labels to issues
- Add comments to issues
- Assign issues to users
## Steps
When a new issue is created:
1. Read the issue
2. Apply appropriate label
The agent cannot push code, merge PRs, or modify settings unless you explicitly allow it.
Architecture
GitHub Actions Runner
|
+-- AI Agent (configurable engine)
| |-- Copilot CLI (default)
| |-- Claude Code
| |-- OpenAI Codex
|
+-- GitHub MCP Server
| |-- Repo access (files, branches, commits)
| |-- Issues & PRs (read, create, comment, label)
| |-- Actions (trigger, read logs)
| |-- Security (advisories, alerts)
|
+-- Additional MCP Servers (optional)
| |-- Browser automation
| |-- Web search
| |-- Custom MCPs
|
+-- Safe-outputs (write permissions)
|-- Defined per workflow
|-- Enforced by the runner
Example Workflows
Auto-review PRs
# Review Pull Requests
When a PR is opened or updated:
1. Read the diff
2. Check for common issues:
- Security vulnerabilities (SQL injection, XSS, exposed secrets)
- Breaking API changes without version bump
- Missing tests for new functionality
- TODO/FIXME comments without linked issues
3. Post a review comment summarizing findings
4. If critical security issues found, request changes
## Safe Outputs
- Post review comments on PRs
- Request changes on PRs
Fix CI failures
# Analyze CI Failures
When a workflow run fails:
1. Read the failed job's logs
2. Identify the root cause
3. If it's a flaky test, add the "flaky-test" label to the PR
4. If it's a real failure, post a comment explaining:
- What failed
- Likely cause
- Suggested fix
5. If it's a simple fix (import error, typo), create a commit with the fix
## Safe Outputs
- Comment on PRs
- Add labels
- Push commits to PR branches
Release notes
# Generate Release Notes
When a new tag is pushed matching v*:
1. Find all commits since the previous tag
2. Group by type (features, fixes, docs, deps)
3. For each commit, write a user-friendly description
4. Create a GitHub Release with the generated notes
## Safe Outputs
- Create GitHub Releases
Configuring the Agent Engine
# .github/agentic-workflows.yml
engine: copilot-cli # or claude-code, openai-codex
model: gpt-4.1 # model selection (engine-dependent)
mcp_servers:
- github # built-in
- name: custom-db
command: npx @my-org/db-mcp-server
Key Concepts
Trigger events
Same as GitHub Actions: issues.opened, pull_request.opened, push, workflow_dispatch, etc.
MCP Server access
The GitHub MCP Server provides native access to:
- Repository files and branches
- Issues and pull requests
- Actions workflows and logs
- Security advisories and alerts
- Discussions and comments
Cost model
Each agent invocation consumes premium requests (same as Copilot coding agent). One premium request per model call the agent makes.
Comparison with Traditional GitHub Actions
| Aspect | Traditional Actions | Agentic Workflows |
|---|---|---|
| Syntax | YAML | Markdown |
| Logic | Declarative steps | Natural language intent |
| Flexibility | Rigid step sequence | Agent decides approach |
| Error handling | Manual (if/else) | Agent self-corrects |
| Maintenance | Update YAML on changes | Often works without changes |
| Determinism | Fully deterministic | Non-deterministic (AI) |
| Cost | Compute minutes | Compute + premium requests |
When to Use (and When Not To)
Good fit:
- Issue triage and labeling
- PR review assistance
- CI failure analysis
- Documentation generation
- Dependency update reviews
- Release note generation
Bad fit:
- Security-critical deployments (non-deterministic)
- High-frequency triggers (cost)
- Tasks requiring exact, repeatable output
- Anything a simple shell script can handle