GitHub Agentic Workflows

June 4, 2026 ยท View on GitHub

File Format

Agentic workflows are markdown files with YAML frontmatter.

---
emoji: ๐Ÿง 
name: My Workflow
description: Short description
on:
  issues:
    types: [opened]
permissions:
  contents: read
  actions: read
strict: true
network:
  allowed: [defaults, github]
tools:
  github:
    mode: gh-proxy
    toolsets: [default]
safe-outputs:
  add-comment:
---

# Workflow Title

Natural language instructions for the AI agent.

Recompilation Rule

  • Edit the frontmatter โ†’ run gh aw compile <workflow-id>.
  • Edit the markdown body only โ†’ no recompilation required.

See also: workflow-editing.md

Core Rules

  • Keep the main agent job read-only.
  • Use safe-outputs: for GitHub writes.
  • Prefer tools.github.mode: gh-proxy and use gh for GitHub reads.
  • For non-GitHub MCP servers, prefer tools.cli-proxy: true and use mounted mcp-clis commands.
  • Use ${{ steps.sanitized.outputs.text }} for untrusted user content.
  • Set strict: true for production workflows.
  • Limit network and bash access to what the workflow actually needs.

See also: workflow-constraints.md

Reference Files

TopicFile
Editing and recompilation rulesworkflow-editing.md
Architectural and security constraintsworkflow-constraints.md
Common design patternsworkflow-patterns.md
Frontmatter schema indexsyntax.md
Safe outputs indexsafe-outputs.md
Trigger patternstriggers.md
Context expressions and {{#if}} templatescontext.md
CLI commands and MCP equivalentscli-commands.md
Network configurationnetwork.md
Memory and persistencememory.md
Imports and shared componentsreuse.md
Sub-agentssubagents.md
Skillsskills.md
Token cost optimizationtoken-optimization.md
GitHub MCP server configurationgithub-mcp-server.md
Campaign and KPI patternscampaign.md
Experiments and A/B testingexperiments.md
Charts and Python data visualizationcharts.md
LLM API endpoint discoveryllms.md

Compile Commands

gh aw compile
gh aw compile <workflow-id>
gh aw compile --purge
gh aw compile --strict