Content
<p align="center">
<img src="assets/banner.png" alt="Agentic AI with GitHub Copilot — Workshop" width="400" />
</p>
# Agentic AI with GitHub Copilot — Workshop
[](LICENSE)
A full-day, self-paced lab that teaches you to build, configure, and orchestrate
agentic AI workflows using GitHub Copilot in VS Code.
A single **Task Management ASP.NET Core Web API** evolves across 10 modules
as you progressively layer every Copilot agentic primitive on top of it.
---
## Prerequisites
| Tool | Version | Check |
|---|---|---|
| VS Code | Latest stable | `code --version` |
| GitHub Copilot Business | Active subscription | Check at github.com/settings/copilot |
| .NET SDK | 9.x | `dotnet --version` |
| Node.js | 20+ | `node --version` |
| Git | Any | `git --version` |
---
## Quick Start
```bash
# 1. Open in VS Code
code <source code folder goes here>\copilot-agentic-workshop
# 2. Start the TaskManager API
dotnet run --project src/TaskManager/TaskManager.Api
# 3. Open the Agent Customizations editor
# Ctrl+Alt+I → gear icon (⚙️) → "Open Customizations"
# 4. Start Lab 00
# Open labs/00-foundation/README.md
```
---
## Workshop Structure
```
11 modules × ~40 min average = ~7 hours total
Phase 1 — Foundation (30 min)
Lab 00 — Setup & Ecosystem Overview
Phase 2 — Behavior Layer (2.5 h)
Lab 01 — Instructions: Always-On Context
Lab 02 — Prompt Files: On-Demand Templates
Lab 03 — Custom Agents: Specialised Personas
Lab 04 — Skills: Multi-Step + Bundled Assets
Phase 3 — Integration Layer (2.5 h)
Lab 05 — MCP: Consuming Existing Servers
Lab 06 — MCP: Building Your Own C# Server
Lab 07 — Tools: Built-in + Restrictions
Phase 4 — Automation Layer (1.5 h)
Lab 08 — Hooks: Lifecycle Automation
Lab 09 — Sub-Agents & Orchestration
Phase 5 — Capstone (1 h)
Lab 10 — Full Developer Workflow: Task Tagging Feature
```
---
## Module Index
| # | Lab | Key Files | Duration |
|---|---|---|---|
| 00 | [Foundation](labs/00-foundation/README.md) | `src/TaskManager/`, Agent Customizations editor | 30 min |
| 01 | [Instructions](labs/01-instructions/README.md) | `.github/copilot-instructions.md`, `.github/instructions/*.instructions.md` | 45 min |
| 02 | [Prompts](labs/02-prompts/README.md) | `.github/prompts/*.prompt.md` | 30 min |
| 03 | [Custom Agents](labs/03-custom-agents/README.md) | `.github/agents/*.agent.md` | 45 min |
| 04 | [Skills](labs/04-skills/README.md) | `.github/skills/scaffold-feature/` | 30 min |
| 05 | [MCP: Consume](labs/05-mcp-consume/README.md) | `.vscode/mcp.json`, Playwright + GitHub MCP | 45 min |
| 06 | [MCP: Build](labs/06-mcp-build/README.md) | `mcp/TaskManager.Mcp/` | 60 min |
| 07 | [Tools](labs/07-tools/README.md) | Agent `tools:` frontmatter | 30 min |
| 08 | [Hooks](labs/08-hooks/README.md) | `.github/hooks/workshop-hooks.json` | 45 min |
| 09 | [Sub-Agents](labs/09-sub-agents/README.md) | `feature-implementer.agent.md` orchestration | 45 min |
| 10 | [Capstone](labs/10-capstone/README.md) | All of the above — Task Tagging feature | 60 min |
---
## Repository Layout
```
copilot-agentic-workshop/
│
├── .github/ ← All Copilot customizations
│ ├── copilot-instructions.md ← Global always-on rules (C#, clean arch, testing)
│ ├── instructions/
│ │ ├── api.instructions.md ← Applies to *Endpoints.cs, *Controller.cs
│ │ └── tests.instructions.md ← Applies to *.Tests/**
│ ├── prompts/
│ │ ├── new-endpoint.prompt.md ← /new-endpoint — scaffold a new API endpoint
│ │ └── pr-review.prompt.md ← /pr-review — systematic PR review checklist
│ ├── agents/
│ │ ├── code-reviewer.agent.md ← Read-only security + architecture reviewer
│ │ ├── test-writer.agent.md ← Writes xUnit + FluentAssertions + NSubstitute tests
│ │ └── feature-implementer.agent.md ← Orchestrator: code → review → tests
│ ├── skills/
│ │ └── scaffold-feature/
│ │ ├── SKILL.md ← /scaffold-feature — generate all layers from templates
│ │ └── templates/ ← 7 .cs.template files for the scaffold skill
│ └── hooks/
│ └── workshop-hooks.json ← Audit log + guard + auto-format hooks
│
├── .vscode/
│ └── mcp.json ← Playwright + GitHub + custom TaskManager MCP servers
│
├── src/TaskManager/ ← ASP.NET Core Web API (the evolving project)
│ ├── TaskManager.Domain/ ← Entities, interfaces (no external deps)
│ ├── TaskManager.Application/ ← DTOs, services (depends on Domain)
│ ├── TaskManager.Api/ ← Endpoints, DI, in-memory repo (depends on Application)
│ └── TaskManager.Tests/ ← xUnit tests (depends on Application + Domain)
│
├── mcp/TaskManager.Mcp/ ← Custom C# MCP server (Module 06)
│ ├── Tools/TaskTools.cs ← list_tasks, get_task, create_task MCP tools
│ ├── Services/TaskApiClient.cs ← Typed HTTP client → TaskManager REST API
│ └── Models/TaskDto.cs ← DTO mirroring the API response
│
├── labs/ ← Step-by-step lab instructions
│ ├── 00-foundation/README.md
│ ├── 01-instructions/README.md
│ ├── ...
│ └── 10-capstone/README.md
│
├── docs/
│ ├── 00-ecosystem-map.md ← Visual concept map + relationship diagram
│ └── cheatsheet.md ← All YAML schemas on one page
│
├── streams/
│ └── engineering-manager/ ← Future: EM stream (proposals, estimation, reviews)
│
└── NuGet.Config ← Includes nuget.org as fallback package source
```
---
## Copilot Primitives — Quick Reference
| Primitive | File Pattern | Location | Invoked by |
|---|---|---|---|
| Global instructions | `copilot-instructions.md` | `.github/` | Automatically on every request |
| File instructions | `*.instructions.md` | `.github/instructions/` | Automatically via `applyTo` glob |
| Prompt files | `*.prompt.md` | `.github/prompts/` | `/name` in chat |
| Custom agents | `*.agent.md` | `.github/agents/` | Agent picker in chat panel |
| Skills | `SKILL.md` | `.github/skills/<name>/` | `/name` in chat |
| Hooks | `*.json` | `.github/hooks/` | Automatically at lifecycle events |
| MCP config | `mcp.json` | `.vscode/` | Automatically when tools are needed |
---
## Running Tests
```bash
dotnet test src/TaskManager/TaskManager.slnx
```
---
## Concepts Covered
- **Agent Mode** — autonomous multi-step task execution vs. chat mode
- **Instructions** — always-on context (global + file-scoped with `applyTo`)
- **Prompt Files** — parameterised on-demand workflows (`/slash-commands`)
- **Custom Agents** — specialised personas with tool restrictions and model overrides
- **Skills** — multi-step workflows with bundled template assets
- **MCP (Model Context Protocol)** — consuming (Playwright, GitHub) and building (C#) servers
- **Tools** — built-in tools, MCP tools, tool aliases, principle of least privilege
- **Hooks** — `preToolUse` / `postToolUse` / `sessionStart` / `agentStop` / `subagentStart/Stop`
- **Sub-Agents** — parent → task tool → child agent → result (context isolation + delegation)
---
## Troubleshooting
**NuGet restore fails**
The `NuGet.Config` at the root adds nuget.org as a fallback.
If the internal Artifactory feed times out, packages will be pulled from nuget.org.
**MCP server not starting**
1. Check Node.js is installed: `node --version`
2. Open VS Code's Output panel → select "MCP" from the dropdown
3. Re-run `MCP: List Servers` from the Command Palette
**Agent mode not available**
Ensure GitHub Copilot agent mode is enabled in VS Code settings:
`"github.copilot.chat.agent.enabled": true`
**Hooks not firing**
Enable in VS Code: `"github.copilot.chat.agent.hooksEnabled": true`
View Agent Debug Logs: Chat panel → `...` → "Show Agent Debug Logs"