You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/copilot/concepts/agents/coding-agent/about-custom-agents.md
+2-47Lines changed: 2 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,54 +9,9 @@ category:
9
9
contentType: concepts
10
10
---
11
11
12
-
## About {% data variables.copilot.custom_agents_short %}
12
+
{% data reusables.copilot.copilot-cli.custom-agents-about-intro %}
13
13
14
-
{% data variables.copilot.custom_agents_caps_short %} are specialized versions of the {% data variables.product.prodname_copilot_short %} agent that you can tailor to your unique workflows, coding conventions, and use cases. They act like tailored teammates that follow your standards, use the right tools, and implement team-specific practices. You define these agents once instead of repeatedly providing the same instructions and context.
15
-
16
-
You define {% data variables.copilot.custom_agents_short %} using Markdown files called {% data variables.copilot.agent_profiles %}. These files specify prompts, tools, and MCP servers. This allows you to encode your conventions, frameworks, and desired outcomes directly into {% data variables.product.prodname_copilot_short %}.
17
-
18
-
The {% data variables.copilot.agent_profile %} defines the {% data variables.copilot.copilot_custom_agent_short %}'s behavior. When you assign the agent to a task or issue, it instantiates the {% data variables.copilot.copilot_custom_agent_short %}.
19
-
20
-
## {% data variables.copilot.agent_profile_caps %} format
21
-
22
-
{% data variables.copilot.agent_profiles_caps %} are Markdown files with YAML frontmatter. In their simplest form, they include:
23
-
24
-
***Name**: A unique identifier for the {% data variables.copilot.copilot_custom_agent_short %}.
25
-
***Description**: Explains the agent's purpose and capabilities.
26
-
***Prompt**: Custom instructions that define the agent's behavior and expertise.
27
-
***Tools** (optional): Specific tools the agent can access. By default, agents can access all available tools, including built-in tools and MCP server tools.
28
-
29
-
{% data variables.copilot.agent_profiles_caps %} can also include MCP server configurations using the `mcp-server` property.
30
-
31
-
### Example {% data variables.copilot.agent_profile %}
32
-
33
-
This example is a basic {% data variables.copilot.agent_profile %} with name, description, and prompt configured.
34
-
35
-
```text
36
-
---
37
-
name: readme-creator
38
-
description: Agent specializing in creating and improving README files
39
-
---
40
-
41
-
You are a documentation specialist focused on README files. Your scope is limited to README files or other related documentation files only - do not modify or analyze code files.
42
-
43
-
Focus on the following instructions:
44
-
- Create and update README.md files with clear project descriptions
- Write scannable content with proper headings and formatting
47
-
- Add appropriate badges, links, and navigation elements
48
-
- Use relative links (e.g., `docs/CONTRIBUTING.md`) instead of absolute URLs for files within the repository
49
-
- Make links descriptive and add alt text to images
50
-
```
51
-
52
-
## Where you can configure {% data variables.copilot.custom_agents_short %}
53
-
54
-
You can define {% data variables.copilot.agent_profiles %} at different levels:
55
-
56
-
***Repository level**: Create `.github/agents/CUSTOM-AGENT-NAME.md` in your repository for project-specific agents.
57
-
***Organization or enterprise level**: Create `/agents/CUSTOM-AGENT-NAME.md` in a `.github-private` repository for broader availability.
58
-
59
-
For more information, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-organization/prepare-for-custom-agents) and [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/prepare-for-custom-agents).
14
+
{% data reusables.copilot.copilot-cli.custom-agents-about-details %}
60
15
61
16
## Where you can use {% data variables.copilot.custom_agents_short %}
intro: '{% data variables.copilot.custom_agents_caps_short %} enhance {% data variables.product.prodname_copilot_short %} with assistance tailored to your needs.'
5
+
versions:
6
+
feature: copilot
7
+
category:
8
+
- Learn about Copilot
9
+
contentType: concepts
10
+
---
11
+
12
+
{% data reusables.copilot.copilot-cli.custom-agents-about-intro %}
13
+
14
+
In addition to any {% data variables.copilot.custom_agents_short %} you define yourself, {% data variables.product.prodname_copilot_short %} includes a set of pre-built {% data variables.copilot.custom_agents_short %}. See [Built-in agents](#built-in-agents).
15
+
16
+
{% data reusables.copilot.copilot-cli.custom-agents-about-details %}
17
+
18
+
## Built-in agents
19
+
20
+
In addition to the main {% data variables.product.prodname_copilot_short %} agent, which processes your request when you submit a prompt, {% data variables.copilot.copilot_cli_short %} includes the following built-in agents which the main agent can run as subagents to assist with common development tasks. These agents are optimized for efficiency and accuracy, leveraging the capabilities of the underlying language models and tools to provide high-quality assistance in their respective domains.
21
+
22
+
{% data variables.product.prodname_copilot_short %} will automatically use an appropriate built-in agent based on your prompt and the current context. For example, the prompt `How does authentication work in this codebase?` will typically trigger the Explore agent, and using the `/research` slash command will trigger the Research agent.
23
+
24
+
***explore** — A fast, lightweight codebase exploration agent. It uses code intelligence, grep, glob, view, and shell tools to search files and understand code structure. It will not change any files, so can be called in parallel to other subagents being run by the main {% data variables.product.prodname_copilot_short %} agent. It has read-only access to GitHub MCP server tools.
25
+
26
+
***task** — A command execution agent that runs development commands (tests, builds, linters, formatters, dependency installs) and reports results efficiently. It returns a brief summary on success, and full output on failure, keeping the main context clean. It has access to all of the tools the parent agent can use (excluding some that are not appropriate in a subagent context), with the same permissions granted or denied.
27
+
28
+
***general-purpose** — This agent essentially has all of the same capabilities as the main {% data variables.product.prodname_copilot_short %} agent. The main agent can run the general-purpose agent as a subagent to assist with any task that requires a separate context window, or to run in parallel when appropriate.
29
+
30
+
***code-review** — Reviews code changes with an extremely high signal-to-noise ratio. This agent analyzes staged/unstaged changes and branch diffs, surfacing only issues that genuinely matter: bugs, security vulnerabilities, race conditions, memory leaks, and logic errors. It never comments on style or formatting. It will not make any changes to files.
31
+
32
+
***research** — This agent operates as a staff-level software engineer and research specialist. It provides exhaustive, meticulously researched answers about codebases, APIs, libraries, and software architecture. It uses {% data variables.product.github %} search/exploration tools, web fetch/search, and local tools. Unlike the other agents, the research agent can only be invoked by using the `/research` slash command. It cannot be automatically triggered by the main agent.
33
+
34
+
## Running agents as subagents
35
+
36
+
One of the benefits of using custom agents you have defined yourself—or the built-in agents—is that the main {% data variables.product.prodname_copilot_short %} agent can run them as subagents with a separate context window. This means that your custom agent, or built-in agent, can focus on a specific subtask without cluttering the context window of the main agent.
37
+
38
+
Where appropriate, tasks performed by subagents can be run in parallel, allowing the overall task to be completed more quickly.
39
+
40
+
For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-cli/comparing-cli-features).
41
+
42
+
## Next steps
43
+
44
+
To create your own {% data variables.copilot.custom_agents_short %}, see:
Copy file name to clipboardExpand all lines: content/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ When you prompt {% data variables.product.prodname_copilot_short %} to carry out
20
20
21
21
Work performed by a {% data variables.copilot.copilot_custom_agent_short %} is carried out using a subagent, which is a temporary agent spun up to complete the task. The subagent has its own context window, which can be populated by information that is not relevant to the main agent. In this way, especially for larger tasks, parts of the work can be offloaded to {% data variables.copilot.custom_agents_short %}, without cluttering the main agent's context window. The main agent can then focus on higher-level planning and coordination.
22
22
23
-
For more information, see [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-custom-agents).
23
+
For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-cli/about-custom-agents).
24
24
25
25
## Creating a {% data variables.copilot.copilot_custom_agent_short %}
## {% data variables.copilot.agent_profile_caps %} format
2
+
3
+
{% data variables.copilot.agent_profiles_caps %} are Markdown files with YAML frontmatter. In their simplest form, they include:
4
+
5
+
***Name** (optional): A display name for the {% data variables.copilot.copilot_custom_agent_short %}. If omitted, the agent's filename is used as its identifier and default display name.
6
+
***Description**: Explains the agent's purpose and capabilities.
7
+
***Prompt**: Custom instructions that define the agent's behavior and expertise.
8
+
***Tools** (optional): Specific tools the agent can access. By default, agents can access all available tools, including built-in tools, and MCP server tools.
9
+
10
+
{% data variables.copilot.agent_profiles_caps %} can also include MCP server configurations using the `mcp-servers` property.
11
+
12
+
### Example {% data variables.copilot.agent_profile %}
13
+
14
+
This example is a basic {% data variables.copilot.agent_profile %} with name, description, and prompt configured.
15
+
16
+
```text
17
+
---
18
+
name: readme-creator
19
+
description: Agent specializing in creating and improving README files
20
+
---
21
+
22
+
You are a documentation specialist focused on README files. Your scope is limited to README files or other related documentation files only - do not modify or analyze code files.
23
+
24
+
Focus on the following instructions:
25
+
- Create and update README.md files with clear project descriptions
- Write scannable content with proper headings and formatting
28
+
- Add appropriate badges, links, and navigation elements
29
+
- Use relative links (e.g., `docs/CONTRIBUTING.md`) instead of absolute URLs for files within the repository
30
+
- Make links descriptive and add alt text to images
31
+
```
32
+
33
+
## Where you can configure {% data variables.copilot.custom_agents_short %}
34
+
35
+
You can define {% data variables.copilot.agent_profiles %} at different levels:
36
+
37
+
***Repository level**: Create `.github/agents/CUSTOM-AGENT-NAME.md` in your repository for project-specific agents.
38
+
***Organization or enterprise level**: Create `/agents/CUSTOM-AGENT-NAME.md` in a `.github-private` repository for broader availability.
39
+
40
+
For more information, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-organization/prepare-for-custom-agents) and [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/prepare-for-custom-agents).
## About {% data variables.copilot.custom_agents_short %}
2
+
3
+
{% data variables.copilot.custom_agents_caps_short %} are specialized versions of the {% data variables.product.prodname_copilot_short %} agent that you can tailor to your unique workflows, coding conventions, and use cases. They act like tailored teammates that follow your standards, use the right tools, and implement team-specific practices. You define these agents once instead of repeatedly providing the same instructions and context.
4
+
5
+
You define {% data variables.copilot.custom_agents_short %} using Markdown files called {% data variables.copilot.agent_profiles %}. These files specify prompts, tools, and MCP servers. This allows you to encode your conventions, frameworks, and desired outcomes directly into {% data variables.product.prodname_copilot_short %}.
6
+
7
+
The {% data variables.copilot.agent_profile %} defines the {% data variables.copilot.copilot_custom_agent_short %}'s behavior. When you assign the agent to a task or issue, it instantiates the {% data variables.copilot.copilot_custom_agent_short %}.
0 commit comments