Skip to content

Commit 593c0f5

Browse files
digitaraldhkirschner_microsoftCopilotsaritai
authored
Copilot: Document Agent Plugins 1.0 support (#62640)
Co-authored-by: hkirschner_microsoft <hkirschner_microsoft@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com> Copilot-Session: 7b920053-3358-460c-a9d2-824b058c7b55 Copilot-Session: bbcaf7d1-4485-4a30-809b-84d54cd03835
1 parent b4c8713 commit 593c0f5

4 files changed

Lines changed: 183 additions & 53 deletions

File tree

content/copilot/concepts/agents/about-plugins.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,57 @@ Plugins provide a way to distribute custom {% data variables.product.prodname_co
2525

2626
## What plugins contain
2727

28-
A plugin can contain some or all of the following components:
28+
A plugin can contain some or all of the following components. The locations of these components depend on the plugin format:
2929

3030
* **Custom agents** — Specialized AI assistants (`*.agent.md` files in `agents/`)
3131
* **Skills** — Discrete callable capabilities (skills subdirectories in `skills/`, containing a `SKILL.md` file)
3232
* **Hooks** — Event handlers that intercept agent behavior (a `hooks.json` file in the plugin root, or in `hooks/`)
33-
* **MCP server configurations** — Model Context Protocol integrations (a `.mcp.json` file in the plugin root, or an `mcp.json` file in `.github/`)
33+
* **MCP server configurations** — Model Context Protocol integrations
3434
* **LSP server configurations** — Language Server Protocol integrations (an `lsp.json` file in the plugin root, or in `.github/`)
3535

36+
## Plugin formats
37+
38+
{% data variables.product.prodname_copilot_short %} supports two plugin formats:
39+
40+
* **Agent Plugins 1.0** is a portable format for sharing skills and MCP server configurations across compatible clients. To use this format, set `$schema` in `plugin.json` to `https://agent-plugins.org/schemas/1.0.0/plugin.schema.json`. Skills are discovered from `skills/`, and MCP server configuration is discovered from `mcp.json` at the plugin root. These locations cannot be configured in the manifest. Choose Agent Plugins 1.0 when you want to make skills and MCP servers portable.
41+
* **Legacy {% data variables.product.prodname_copilot_short %} plugins** do not declare the Agent Plugins `$schema`. They use the existing manifest fields and component discovery behavior, including configurable component paths and MCP configuration in `.mcp.json`, `.github/mcp.json`, or the `mcpServers` manifest field. Choose the legacy format when you need configurable component paths or are maintaining an existing {% data variables.product.prodname_copilot_short %}-specific plugin.
42+
43+
For a new plugin, use Agent Plugins 1.0 unless you require configurable component paths. Use the legacy format primarily for existing legacy plugins.
44+
45+
Both formats are supported. Adding `$schema` changes how {% data variables.product.prodname_copilot_short %} interprets the manifest and discovers components. Plugins without `$schema` continue to load as legacy plugins.
46+
3647
## How plugins are structured
3748

38-
A plugin is a directory with a specific structure. At minimum, it contains a `plugin.json` manifest file at the root of the directory. The manifest gives the plugin a name and points to the components the plugin provides. Alongside the manifest, the directory can contain any combination of agents, skills, hooks, MCP server configurations, and LSP server configurations.
49+
A plugin is a directory with a specific structure and a `plugin.json` manifest file. Agent Plugins 1.0 requires the manifest at the plugin root. Legacy plugins support additional manifest locations. The manifest gives the plugin a name and metadata. Depending on the format, it can also point to components. Alongside the manifest, the directory can contain agents, skills, hooks, MCP server configurations, and LSP server configurations.
50+
51+
### Agent Plugins 1.0 structure
52+
53+
Agent Plugins 1.0 stores skills and MCP servers in standard locations so compatible clients can discover them. Other components, including agents, hooks, commands, and LSP servers, are client-specific. {% data variables.product.prodname_copilot_short %} reads these components from the `com.github.copilot` directory. Other clients ignore this directory, so the same plugin can combine shared skills and MCP servers with {% data variables.product.prodname_copilot_short %}-specific components.
54+
55+
An Agent Plugins 1.0 directory can look like this:
56+
57+
```text
58+
my-plugin/
59+
├── plugin.json # Required manifest
60+
├── skills/ # Skills (optional)
61+
│ └── deploy/
62+
│ └── SKILL.md
63+
├── mcp.json # MCP server config (optional)
64+
└── com.github.copilot/ # Copilot components (optional)
65+
├── agents/
66+
│ └── helper.agent.md
67+
├── commands/
68+
├── rules/
69+
├── hooks/
70+
│ └── hooks.json
71+
└── lsp.json
72+
```
73+
74+
The manifest must include the Agent Plugins 1.0 `$schema`. For supported top-level manifest fields, name requirements, and component locations, see [Agent Plugins 1.0 manifest fields](/copilot/reference/copilot-cli-reference/cli-plugin-reference#agent-plugins-10-manifest-fields).
75+
76+
### Legacy plugin structure
3977

40-
A typical plugin directory looks like this:
78+
A legacy {% data variables.product.prodname_copilot_short %} plugin directory can look like this:
4179

4280
```text
4381
my-plugin/

content/copilot/how-tos/copilot-cli/customize-copilot/plugins-creating.md

Lines changed: 61 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,54 @@ Plugins are packages that extend the functionality of {% data variables.copilot.
2222

2323
## Plugin structure
2424

25-
A plugin consists of a directory with a specific structure. At minimum, it must contain a `plugin.json` manifest file at the root of the directory. It can also contain any combination of agents, skills, hooks, and MCP server configurations.
26-
27-
### Example plugin structure
28-
29-
```text
30-
my-plugin/
31-
├── plugin.json # Required manifest
32-
├── agents/ # Custom agents (optional)
33-
│ └── helper.agent.md
34-
├── skills/ # Skills (optional)
35-
│ └── deploy/
36-
│ └── SKILL.md
37-
├── hooks.json # Hook configuration (optional)
38-
└── .mcp.json # MCP server config (optional)
39-
```
25+
A plugin consists of a directory with a specific structure and a `plugin.json` manifest file. Agent Plugins 1.0 requires the manifest at the plugin root. Legacy plugins support additional manifest locations. A plugin can also contain any combination of agents, skills, hooks, and MCP server configurations.
26+
27+
{% data variables.copilot.copilot_cli_short %} supports two plugin formats:
28+
29+
* Agent Plugins 1.0, a portable format for skills and MCP servers. Declaring the canonical `$schema` in `plugin.json` opts the plugin into this format.
30+
* The legacy {% data variables.product.prodname_copilot_short %} format, which supports {% data variables.product.prodname_copilot_short %}-specific components and configurable component paths. A manifest without the Agent Plugins `$schema` continues to use this format.
31+
32+
Both formats are supported. Choose Agent Plugins 1.0 when you want to make skills and MCP servers portable across compatible clients. Choose the legacy format when you need custom component paths or are maintaining an existing {% data variables.product.prodname_copilot_short %}-specific plugin. In Agent Plugins 1.0, skills and MCP servers are portable, and {% data variables.product.prodname_copilot_short %}-specific components such as agents, commands, rules, hooks, and LSP servers come from the `com.github.copilot` directory in the plugin.
4033

4134
## Creating a plugin
4235

4336
1. Create a directory for your plugin.
44-
1. Add a `plugin.json` manifest file to the root of the directory.
37+
1. Choose a plugin format, then add a `plugin.json` manifest file to the root of the directory.
38+
39+
To create an Agent Plugins 1.0 plugin, include the canonical `$schema`:
4540

46-
**Example `plugin.json` file**
41+
**Example Agent Plugins 1.0 `plugin.json` file**
4742

4843
{% data reusables.copilot.copilot-cli.cli-example-plugin-file %}
4944

45+
The schema allows only `$schema`, `name`, `version`, `description`, `author`, `homepage`, `repository`, `license`, `keywords`, and `extensions` as top-level fields. Unknown top-level fields are reported and ignored. The `extensions` field is a map of client-specific data keyed by reverse-domain namespace.
46+
47+
To create a legacy plugin, omit the Agent Plugins `$schema`. You can use component path fields in the manifest:
48+
49+
**Example legacy `plugin.json` file**
50+
51+
```json copy
52+
{
53+
"name": "my-dev-tools",
54+
"description": "React development utilities",
55+
"agents": "agents/",
56+
"skills": ["skills/", "extra-skills/"],
57+
"hooks": "hooks.json",
58+
"mcpServers": ".mcp.json"
59+
}
60+
```
61+
5062
For details of the full set of fields you can include in this file, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-plugin-reference#pluginjson).
5163

52-
1. Add some components to your plugin by creating the appropriate files and directories for agents, skills, hooks, and MCP server configurations.
64+
1. Add components to your plugin.
65+
66+
In an Agent Plugins 1.0 plugin, skills must be immediate subdirectories of `skills/`, and each skill must contain a `SKILL.md` file. MCP configuration must be in `mcp.json` at the plugin root. You cannot override these locations in `plugin.json`. {% data variables.product.prodname_copilot_short %}-specific components go in the `com.github.copilot` directory, such as `com.github.copilot/agents/` for custom agents and `com.github.copilot/hooks/hooks.json` for hooks.
67+
68+
In a legacy plugin, use the default component locations or the component paths configured in `plugin.json`.
5369

5470
For example:
5571

56-
1. Add an agent by creating a `NAME.agent.md` file in an `agents` subdirectory.
72+
1. Add an agent by creating a `NAME.agent.md` file in an `agents` subdirectory. In an Agent Plugins 1.0 plugin, create the file in `com.github.copilot/agents/`. In a legacy plugin, create it in `agents/`.
5773

5874
```markdown copy
5975
---
@@ -78,6 +94,31 @@ my-plugin/
7894
Instructions for the skill...
7995
```
8096

97+
1. For an Agent Plugins 1.0 plugin, add MCP servers in a root `mcp.json` file. The MCP configuration uses its own Agent Plugins schema:
98+
99+
```json copy
100+
{
101+
"$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",
102+
"mcpServers": {
103+
"deployment-api": {
104+
"type": "streamable-http",
105+
"url": "https://deploy.example.com/mcp"
106+
},
107+
"local-validator": {
108+
"type": "stdio",
109+
"command": "node",
110+
"args": ["${PLUGIN_ROOT}/server/index.js"],
111+
"cwd": "${PLUGIN_ROOT}",
112+
"env": {
113+
"DATA_DIR": "${PLUGIN_DATA}/validator"
114+
}
115+
}
116+
}
117+
}
118+
```
119+
120+
The `streamable-http` transport name is accepted for Streamable HTTP servers. For `stdio` servers, {% data variables.copilot.copilot_cli_short %} provides `PLUGIN_ROOT` and `PLUGIN_DATA` environment variables and expands `${PLUGIN_ROOT}` and `${PLUGIN_DATA}` in `args`, `env` values, and `cwd`.
121+
81122
1. Install your plugin locally, so that you can test it as you develop it.
82123

83124
For example, where `./my-plugin` is the path to your plugin directory, enter:
@@ -137,5 +178,6 @@ To distribute your plugin, you can add it to a marketplace. See [AUTOTITLE](/cop
137178

138179
## Further reading
139180

181+
* [Agent Plugins author documentation](https://agent-plugins.org/plugin-authors)
140182
* [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing)
141183
* [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-plugin-reference)

0 commit comments

Comments
 (0)