Create a GitHub Agentic Workflow

A GitHub Agentic Workflows source is a Markdown file in .github/workflows/ that describes AI-powered repository automation. YAML frontmatter configures triggers, permissions, tools, safe outputs, and the AI engine; the Markdown body contains natural-language instructions. The gh aw compile command turns this source into the .lock.yml GitHub Actions workflow that runs GitHub Copilot, Claude Code, OpenAI Codex, Google Gemini, or Pi.

Estimated time: 5-15 minutes depending on complexity

You can author new agentic workflows using a coding agent or other AI chat system, under your guidance. For interactive coding agents, this can be a conversation about what you want the workflow to do, with the agent asking clarifying questions and generating the workflow for you.

This guide shows how to create an agentic workflow in the GitHub web interface, with a coding agent, in VS Code Agent Mode, or by editing the source manually.

Create a New Workflow with the GitHub Web Interface

Section titled “Create a New Workflow with the GitHub Web Interface”

If you have access to GitHub Copilot, you can create and edit agentic workflows directly from the GitHub web interface. This can turn a prompt into a proposed workflow.

  1. Use one of these prompts in the “Agents” tab in your repository.

    Issue Triage

    Create a workflow for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/create.md
    The purpose of the workflow is to triage new issues: label them by type and priority, identify duplicates, ask clarifying questions when the description is unclear, and assign them to the right team members.

    Activity Report

    Create a workflow for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/create.md
    The purpose of the workflow is a daily report on recent activity in the repository, delivered as an issue. The report should summarize new issues, pull requests merged, and any open blockers.

    Documentation Updater

    Create a workflow for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/create.md
    The purpose of the workflow is to run daily and keep the repository documentation up to date: identify doc files that are out of sync with recent code changes and open a pull request with the necessary updates.

    AGENTS.md Maintainer

    Create a workflow for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/create.md
    The purpose of the workflow is to run weekly and maintain the AGENTS.md file: review merged pull requests and updated source files since the last run, then open a pull request that keeps AGENTS.md accurate and current.

    Repository Maintainer

    Create a workflow for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/create.md
    The purpose of the workflow is to act as a repository maintainer: regularly inspect the repository for useful maintenance work, select one bounded task, and open a small draft pull request with the improvement and validation results.