LV.1
EXP 0/1000
โ—€ Playbook index
NO.07

๐Ÿฅท Custom Agent

In a nutshell

A Custom Agent is a specialist profile that hands Copilot a role, tools, and behavior all at once.

Even with the "same AI", you can switch between personas like Planner, Reviewer, and Tester โ€” each with its own permissions.

What does it lock in?

A Custom Agent locks in not just a prompt, but the entire โ€œworking styleโ€ of an agent.

ElementWhat does it define?Example
IdentityWhat persona to adoptPlanner, Security Reviewer, Test Specialist
DescriptionWhen to invoke itโ€When creating a plan before implementationโ€
ToolsWhich tools to useread, search, edit, github/*
ModelWhich model to run onStrong model for design, fast model for exploration
TargetWhich runtime to targetgithub-copilot, vscode
MCPDedicated external toolsJira, Figma, Playwright, internal API
PromptDecision criteria & output formatSuccess criteria, restrictions, review focus

Two scopes

๐Ÿ‘ฅ Team shared๐Ÿ‘ค Personal
๐Ÿ“ Location.github/agents/*.agent.md~/.copilot/agents/
๐ŸŽฏ ScopeThat repository / workspaceAll your workspaces
๐Ÿค SharingManaged in Git, shared with teamLocal only
๐Ÿ’ก Use caseTeam-standard Planner / Reviewer / TesterPersonal work style & preferences

Inside .agent.md

A Custom Agent is a Markdown file. The YAML frontmatter at the top is configuration; the body below is the instruction to the agent. For all configurable fields, see the Custom agents configuration reference.

---
name: design-reviewer
description: Review UI differences between Figma and implementation
target: github-copilot
model: Claude Sonnet 4.5
tools:
  - read
  - search
  - github/pull-request-read
  - figma/*
mcp-servers:
  figma:
    type: local
    command: npx
    args: ["-y", "figma-mcp-server"]
---

# Role

You are a design reviewer for UI implementations.
Compare Figma specifications against Pull Request diffs and review only visual differences: appearance, spacing, colors, and state variations.

# Rules

- Do not edit code
- Separate blocking vs. non-blocking findings
- Always include reproduction steps and screen widths to check
- Only flag issues grounded in Figma or the diff โ€” no guesses

A good Custom Agent is defined not by โ€œwhoโ€ it is, but by which decisions to delegate to it.

Built-in agent examples

Copilot Chat and CLI come with purpose-built agents out of the box.
Custom Agents are the mechanism for extending this to your own team.

SurfaceAgentWhat does it do?
Copilot Chat / VS CodeAgentAutonomously plans, edits, executes commands, and calls tools for complex coding tasks
Copilot Chat / VS CodePlanCreates a structured step-by-step implementation plan before writing code
Copilot Chat / VS CodeAskAnswers questions about the codebase, coding concepts, and VS Code without modifying files
Copilot CLIExploreQuick codebase analysis. Ask questions about the code without adding to the main context
Copilot CLITaskRuns commands such as tests and builds, returning a brief summary on success and full output on failure
Copilot CLIGeneral-purposeHandles complex multi-step tasks requiring the full toolset and high-quality reasoning in a separate context
Copilot CLICode-reviewReviews changes and surfaces only genuinely important issues with low noise

Display names may appear shortened depending on the UI preview, but the official CLI names are General-purpose and Code-review. For how to create custom agents in the CLI, see About Copilot CLI custom agents and Create custom agents for CLI.