GitHub Custom Agent File Format
This document describes the GitHub custom agent file format used by GitHub Copilot to provide repository-specific or task-specific instructions to AI coding agents.
GitHub Copilot supports custom agent instructions through Markdown files with YAML frontmatter. These files allow you to define specialized agent behaviors, tool access, and custom workflows that tailor Copilot's behavior to your repository's needs.
Custom agent files can be placed in several locations, each serving a different scope:
.github/copilot-instructions.md.github/instructions/*.instructions.md (e.g., frontend.instructions.md, backend.instructions.md)applyTo in frontmatter.github/agents/ or .github/copilot/instructions/AGENTS.md, *.md (e.g., readme-creator.md, test-writer.md)imports field in workflow frontmatter.github/agents/ directory# YAML frontmatter (configuration)