Custom agents for GitHub Copilot
Custom agents for GitHub Copilot make it easy for users and organizations to specialize their Copilot coding agent (CCA) through simple, file-based configurations.
By adding a configuration file under .github/agents in a repository or in the {org}/.github repository, you can define agent personas that capture your team’s workflows, conventions, and unique needs. These agents can be further tailored with prompts, tool selections, and Model Context Protocol (MCP) servers to optimize for specific use cases.
Anyone using GitHub Copilot can define and use custom agents, whether you’re an individual developer, part of a team, or managing an organization. Custom agents work across Copilot coding agent in github.com, the Copilot CLI, and will be coming to a future release of Visual Studio Code.
Key benefits
- Define agent specializations that act like focused teammates, using prompts and tool selections unique to your workflow.
- Add organization-specific or team-specific agents by placing configuration files in a known location in your repository or organization settings.
- Refine agent behaviors beyond standard Copilot instructions, making it easier to enforce coding conventions, compliance, or custom automations.
- Enable agents to use custom tools and MCP servers, giving you fine-grained control over how tasks are completed.
- Get started quickly by adding a simple markdown file. There’s no need for a separate installation or complex setup.
Examples
Imagine a frontend engineer subagent that enforces team conventions for React or Vue, or an agent that uses a custom MCP to automate additional tasks with the GitHub CLI. With custom agents, you can define these behaviors in a central file, making them easily accessible and maintainable.
Not sure where to begin? Some of our awesome partners have created custom agents to help you improve your workflow.
You can find those and more sample agents at @github/awesome-copilot.
Learn more by reading our docs on custom agents and join the discussion within GitHub Community.