Skip to content

Authoring Agentic Workflows

GitHub Agentic Workflows provide a prompt file that turns your favorite agent into a powerful workflow authoring tool. This guide explains how to use this mode to author agentic workflows in natural language.

Initialize your repository to set up GitHub Copilot instructions and prompt files for authoring agentic workflows:

Terminal window
gh aw init

This creates:

  • .github/instructions/github-agentic-workflows.instructions.md - Custom Copilot instructions for better workflow authoring
  • .github/prompts/create-agentic-workflow.prompt.md - The /create-agentic-workflow command for Copilot Chat
  • .github/prompts/create-shared-agentic-workflow.prompt.md - The /create-shared-agentic-workflow command for creating reusable workflow components

What is the /create-agentic-workflow prompt?

Section titled “What is the /create-agentic-workflow prompt?”

.github/prompts/create-agentic-workflow.prompt.md is a prompt file that contains the structure and instructions the Copilot-style assistant will use to generate a workflow markdown file that the gh aw CLI understands.

Use the prompt file when you want to:

  • Draft a new agentic workflow using natural language
  • Iterate on workflow steps with AI assistance inside your editor

The prompt contains instructions and toolset to enable efficient workflow authoring.

To get this file in your repository, run the init command:

Terminal window
gh aw init

How to use the /create-agentic-workflow prompt

Section titled “How to use the /create-agentic-workflow prompt”

In Visual Studio Code and the GitHub Copilot Chat, you can load it using the /create-agentic-workflow command.

Terminal window
/create-agentic-workflow

This will start the agentic workflow authoring process.

Assuming you have the GitHub Copilot CLI installed, you can load the file in a session using the @ syntax:

Terminal window
load @.github/prompts/create-agentic-workflow.prompt.md

Load the prompt file into your preferred AI chat or agent interface that supports loading from files. The prompt is designed to be compatible with various AI tools, although the tools might not be completely configured and you’ll need to allow running the compiler.

When creating agentic workflows using speech-to-text (dictation), you may encounter terminology mismatches and formatting issues common to voice recognition systems. To help correct these issues, use the dictation instructions prompt or .

This prompt helps rephrase text captured through speech-to-text recognition by:

  • Correcting project-specific terminology (e.g., “ghaw” → “gh-aw”, “work flow” → “workflow”)
  • Transforming casual dictated sentences into clear, imperative task descriptions
  • Removing filler words and improving technical tone
  • Adding necessary context that might be implicit in spoken requests

Load the dictation prompt into your AI assistant before or after dictating your workflow instructions to improve accuracy and clarity.

Commit the generated files (.lock.yml) if they are part of the project’s tracked artifacts. The project uses compiled workflows in version control.