GitHub Agentic Workflows

DispatchOps

DispatchOps is the design pattern where workflows are designed primarily for manual execution via the GitHub Actions UI or CLI. This is used for on-demand tasks, testing, and other workflows that need human judgment about timing. The workflow_dispatch trigger lets you run workflows with custom inputs whenever needed, with safe outputs handling write operations securely.

Use manual dispatch for research tasks, operational commands, testing workflows during development, debugging production issues, or any task that doesn’t fit a schedule or event trigger.

flowchart LR
    user([Developer]) --> trigger[workflow_dispatch
with inputs]
    trigger --> agent[AI agent]
    agent --> outputs[Safe outputs]

This example shows a workflow with a string input and a choice input, using conditional logic to adjust behavior at runtime:

---
on:
workflow_dispatch:
inputs:
topic:
description: 'Research topic'
required: true
type: string
depth:
description: 'Analysis depth'
type: choice
options:
- brief
- detailed
default: brief
permissions:
contents: read
safe-outputs:
create-discussion:
---
# Research Assistant
Research the following topic: "${{ github.event.inputs.topic }}"
{{#if (eq github.event.inputs.depth "detailed")}}
Provide an in-depth analysis: background, key findings, trade-offs, and concrete recommendations with supporting evidence.
{{else}}
Provide a concise summary: top 3 findings and a single recommendation.
{{/if}}

Reference inputs with ${{ github.event.inputs.INPUT_NAME }}. Supported types: string, boolean, choice, environment. See Triggers Reference for full input syntax and Templating for conditionals.

From GitHub.com: Go to the Actions tab, select the workflow, click Run workflow, fill in inputs, and confirm.

Via CLI:

Terminal window
gh aw run research --raw-field topic="quantum computing" --raw-field depth=detailed
Terminal window
gh aw run research --wait # Wait for completion
gh aw run research --ref branch # Run from a specific branch

See CLI Commands for the full gh aw run reference.