Workflow Structure
Each workflow consists of:
- YAML Frontmatter: Configuration options wrapped in
---. See Frontmatter for details. - Markdown: Natural language instructions for the AI. See Markdown.
For example:
---on: issues: types: [opened]
permissions: issues: write
tools: github: toolsets: [issues]---
# Workflow Description
Read the issue #${{ github.event.issue.number }}. Add a comment to the issue listing useful resources and links.File Organization
Section titled “File Organization”Agentic workflows are stored in the .github/workflows folder as Markdown files (*.md)
and they are compiled to GitHub Actions Workflows files (*.lock.yml)
.github/└── workflows/ ├── ci-doctor.md # Agentic Workflow └── ci-doctor.lock.yml # Compiled GitHub Actions WorkflowWhen you run the compile command you generate the lock file.
gh aw compileEditing Workflows
Section titled “Editing Workflows”See Editing Workflows for complete guidance on when recompilation is needed.
Best Practices
Section titled “Best Practices”- Use descriptive names:
issue-responder.md,pr-reviewer.md - Follow kebab-case convention:
weekly-summary.md - Avoid spaces and special characters
- Commit source files: Always commit
.mdfiles - Commit generated files: Also commit
.lock.ymlfiles for transparency
Related Documentation
Section titled “Related Documentation”- Editing Workflows - When to recompile vs edit directly
- Frontmatter - Configuration options for workflows
- Markdown - The main markdown content of workflows
- Imports - Modularizing workflows with includes
- CLI Commands - CLI commands for workflow management
- MCPs - Model Context Protocol configuration