GitHub Copilot
GitHub Copilot custom agents: .github/agents/*.agent.md profiles, tools and frontmatter
How do I create a custom agent for GitHub Copilot in .github/agents?
Add a Markdown file ending in .agent.md to .github/agents with YAML frontmatter that includes a required description, then merge it to the default branch. The body is the agent's prompt, up to 30,000 characters. Select it from the agents dropdown on GitHub, when assigning an issue, or with /agent in Copilot CLI.
Where the file goes
- Repository: .github/agents/NAME.agent.md
- Organization level: an agents folder at the root of the org's .github or .github-private repository.
- File names may only use . - _ a-z A-Z 0-9.
- The agent appears after you merge the file into the default branch.
Example profile
.github/agents/implementation-planner.agent.md
--- name: implementation-planner description: Creates detailed implementation plans and technical specifications in markdown format tools: ["read", "search", "edit"] --- You are a technical planning specialist focused on creating comprehensive implementation plans. Your responsibilities: - Analyze requirements and break them down into actionable tasks - Create detailed technical specifications and architecture documentation - Generate implementation plans with clear steps, dependencies, and timelines
Frontmatter properties
- description: required.
- name: optional. Defaults to the file name without .agent.md.
- target: vscode or github-copilot. Unset means both.
- tools: list or comma separated string. Unset means all tools.
- model: model to use. Unset inherits the default.
- disable-model-invocation: true means the agent must be picked manually. Default false.
- user-invocable: false hides it from manual selection. Default true.
- mcp-servers and metadata: not used by VS Code and other IDE agents.
- infer is retired.
Tools and aliases
- Omit tools or use ["*"] for all tools. Use [] for no tools.
- MCP tools: some-mcp-server/some-tool, or some-mcp-server/* for all tools from one server.
- Aliases (case insensitive): execute, read, edit, search, agent, web, todo.
- web is not currently applicable for the cloud agent. todo is not supported in the cloud agent.
- Unrecognized tool names are ignored.
Use the agent
- On GitHub: pick it from the dropdown in the agents panel or agents tab.
- On an issue: choose it when assigning Copilot.
- In Copilot CLI: use the /agent slash command, mention it in a prompt, or pass it as a command line argument.
Custom agents are in public preview for JetBrains IDEs, Eclipse and Xcode.
Sources
More on GitHub Copilot
Other guides
Get the weekly agent stack update
New official MCP servers, spec changes and harness releases, checked against the source. One email a week, no fluff.
Reviewed Oct 13, 2026. Settings change often; the linked vendor docs are the source of truth.