Skip to content

Commit 2df1601

Browse files
Copilotaaronpowell
andauthored
Remove redundant content/learning-hub symlinks; consolidate into docs/learning-hub (#1075)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
1 parent a31b09b commit 2df1601

26 files changed

Lines changed: 3986 additions & 3999 deletions

website/src/content/docs/learning-hub/agentic-workflows.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
---
2+
title: 'Agentic Workflows'
3+
description: 'Learn what GitHub Agentic Workflows are, how to use community workflows from Awesome Copilot, and how to contribute your own.'
4+
authors:
5+
- GitHub Copilot Learning Hub Team
6+
lastUpdated: 2026-02-27
7+
estimatedReadingTime: '7 minutes'
8+
tags:
9+
- workflows
10+
- automation
11+
- github-actions
12+
- fundamentals
13+
relatedArticles:
14+
- ./automating-with-hooks.md
15+
- ./using-copilot-coding-agent.md
16+
prerequisites:
17+
- Basic understanding of GitHub Actions
18+
- Basic understanding of GitHub Copilot
19+
---
20+
21+
Agentic Workflows are AI-powered repository automations that run coding agents in GitHub Actions. Written in markdown with natural language instructions, they let you automate tasks like issue triage, daily reports, and compliance checks — triggered by schedules, events, or slash commands.
22+
23+
This article covers what agentic workflows are, how to install and use workflows from the Awesome Copilot community, and how to contribute your own.
24+
25+
## What Are Agentic Workflows?
26+
27+
An agentic workflow is a markdown file that combines YAML frontmatter (triggers, permissions, safe outputs) with natural language instructions that a coding agent follows at runtime. The markdown file is the source: you use the `gh aw` CLI to compile it into a `.lock.yml` workflow file, and GitHub Actions runs that compiled workflow to execute a Copilot coding agent that follows the instructions autonomously.
28+
29+
**Key characteristics**:
30+
- Defined in a single `.md` file — no YAML actions syntax required
31+
- Triggered by schedules, repository events, or slash commands
32+
- Run inside GitHub Actions with the Copilot coding agent
33+
- Use least-privilege permissions and safe outputs for security
34+
- Compiled to `.lock.yml` files via the `gh aw` CLI
35+
36+
### Anatomy of a Workflow File
37+
38+
```markdown
39+
---
40+
name: "Daily Issues Report"
41+
description: "Generates a daily summary of open issues"
42+
on:
43+
schedule: daily on weekdays
44+
permissions:
45+
contents: read
46+
issues: read
47+
safe-outputs:
48+
create-issue:
49+
title-prefix: "[daily-report] "
50+
labels: [report]
51+
---
52+
53+
## Daily Issues Report
54+
55+
Create a daily summary of open issues for the team.
56+
57+
## What to Include
58+
59+
- New issues opened in the last 24 hours
60+
- Issues closed or resolved
61+
- Stale issues that need attention
62+
```
63+
64+
The **frontmatter** declares the workflow's triggers, permissions, and safe outputs. The **body** contains the natural language instructions the agent follows.
65+
66+
### When to Use Agentic Workflows
67+
68+
| Use Case | Example |
69+
|----------|---------|
70+
| Scheduled reports | Daily issue summaries, weekly org health checks |
71+
| Event-driven automation | Triage new issues, check PR relevance |
72+
| Slash commands | `/relevance-check` on an issue or PR |
73+
| Compliance checks | License audits, release readiness reviews |
74+
| Repository maintenance | Identify stale repos, track contributor activity |
75+
76+
Agentic Workflows are ideal when you need **autonomous, event-driven automation** that goes beyond what static GitHub Actions can do — tasks that require reasoning, summarization, or context-aware decisions.
77+
78+
## Using Workflows from Awesome Copilot
79+
80+
The [Awesome Copilot workflows page](../../workflows/) hosts a growing collection of community-contributed workflows. Here's how to install and use them.
81+
82+
### Prerequisites
83+
84+
Install the `gh aw` CLI extension:
85+
86+
```bash
87+
gh extension install github/gh-aw
88+
```
89+
90+
### Installing a Workflow
91+
92+
1. **Browse** the [workflows collection](../../workflows/) and find one that fits your needs
93+
2. **Copy** the workflow `.md` file into your repository's `.github/workflows/` directory
94+
3. **Compile** the workflow to generate the Actions lock file:
95+
96+
```bash
97+
gh aw compile
98+
```
99+
100+
4. **Commit** both the `.md` source and the generated `.lock.yml` file:
101+
102+
```bash
103+
git add .github/workflows/daily-issues-report.md
104+
git add .github/workflows/daily-issues-report.lock.yml
105+
git commit -m "Add daily issues report workflow"
106+
```
107+
108+
### Running a Workflow
109+
110+
Workflows run automatically based on their configured triggers. You can also:
111+
112+
- **Trigger manually**: `gh aw run <workflow>`
113+
- **Monitor runs**: `gh aw status` and `gh aw logs`
114+
- **Validate locally**: `gh aw compile --validate --no-emit <workflow>.md`
115+
116+
### Customizing a Workflow
117+
118+
Since workflows are plain markdown, customizing them is straightforward:
119+
120+
- **Edit the instructions** in the body to adjust what the agent does
121+
- **Change triggers** in the `on:` frontmatter to control when it runs
122+
- **Adjust permissions** to match your repository's needs
123+
- **Modify safe outputs** to control what the agent can create or update
124+
125+
After editing, recompile with `gh aw compile` to regenerate the lock file.
126+
127+
## Contributing Workflows
128+
129+
Sharing your workflows with the community helps others automate their repositories. Here's how to contribute.
130+
131+
### Step 1: Create the Workflow File
132+
133+
Create a new `.md` file in the `workflows/` directory of the [Awesome Copilot repository](https://github.com/github/awesome-copilot). Use a descriptive, lowercase, hyphenated filename:
134+
135+
```
136+
workflows/my-new-workflow.md
137+
```
138+
139+
### Step 2: Add Frontmatter
140+
141+
Include the required frontmatter fields:
142+
143+
```yaml
144+
---
145+
name: "My New Workflow"
146+
description: "A clear description of what this workflow does"
147+
on:
148+
schedule: daily
149+
permissions:
150+
contents: read
151+
safe-outputs:
152+
create-issue:
153+
title-prefix: "[my-workflow] "
154+
labels: [automated]
155+
---
156+
```
157+
158+
**Required fields**:
159+
- `name` — human-readable workflow name
160+
- `description` — concise summary of the workflow's purpose
161+
162+
**Workflow fields**:
163+
- `on` — trigger configuration (schedules, events, slash commands)
164+
- `permissions` — GitHub API scopes (use least-privilege)
165+
- `safe-outputs` — guardrails for what the agent can create or modify
166+
167+
### Step 3: Write Clear Instructions
168+
169+
The body of the file contains the natural language instructions the agent follows. Be specific and structured:
170+
171+
```markdown
172+
## Task Overview
173+
174+
Describe the main goal clearly.
175+
176+
## Steps
177+
178+
1. First, gather the relevant data
179+
2. Then, analyze and summarize
180+
3. Finally, create the output (issue, comment, etc.)
181+
182+
## Output Format
183+
184+
Describe the expected format of the result.
185+
```
186+
187+
### Step 4: Validate and Test
188+
189+
```bash
190+
# Validate the workflow compiles correctly
191+
gh aw compile --validate --no-emit workflows/my-new-workflow.md
192+
```
193+
194+
### Step 5: Submit Your Contribution
195+
196+
1. Fork the repository and create a new branch
197+
2. Add your workflow `.md` file to the `workflows/` directory
198+
3. Run `npm run build` to update the README
199+
4. Submit a pull request targeting the `staged` branch
200+
201+
> **Important:** Only submit the `.md` source file. Do not include compiled `.lock.yml` or `.yml` files — CI will block them.
202+
203+
### Workflow Contribution Guidelines
204+
205+
- **Security first** — use least-privilege permissions and safe outputs instead of direct write access
206+
- **Clear instructions** — write specific, unambiguous natural language in the workflow body
207+
- **Descriptive names** — use lowercase filenames with hyphens (e.g., `daily-issues-report.md`)
208+
- **Test locally** — validate with `gh aw compile --validate` before submitting
209+
- **Document the purpose** — the `description` field should make it clear what the workflow does and when to use it
210+
211+
## Learn More
212+
213+
- **Official documentation**: [GitHub Agentic Workflows](https://gh.io/gh-aw) — full specification and reference
214+
- **Browse workflows**: [Awesome Copilot Workflows](../../workflows/) — community-contributed collection
215+
- **Contributing guide**: [CONTRIBUTING.md](https://github.com/github/awesome-copilot/blob/main/CONTRIBUTING.md#adding-agentic-workflows) — detailed contribution guidelines
216+
- **Related**: [Automating with Hooks](../automating-with-hooks/) — deterministic automation for Copilot agent sessions
217+
- **Related**: [Using the Copilot Coding Agent](../using-copilot-coding-agent/) — the agent that powers agentic workflows
218+
219+
---

website/src/content/docs/learning-hub/automating-with-hooks.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)