Skip to main content

Настройка расширений Copilot

Выполните следующие действия, чтобы начать сборку данных Copilot Extensions.

Tool navigation

Note

GitHub Copilot Extensions is in public preview and subject to change.

This article is designed to help you build an entirely new GitHub Copilot Extension. To instead learn how to quickly build and test a demo Copilot Extension created by GitHub, see "Quickstart for GitHub Copilot Extensions using agents."

Skillsets and agents are the two ways to extend Copilot's capabilities and context through the Copilot Extensibility Platform. They let you integrate external services and APIs into Copilot Chat, but each one serves different use cases and offers different levels of control and complexity:

  • Skillsets are lightweight and streamlined, designed for developers who need Copilot to perform specific tasks (e.g., data retrieval or simple operations) with minimal setup. They handle routing, prompt crafting, function evaluation, and response generation automatically, making them ideal for quick and straightforward integrations. For more information about skillsets, see "About Copilot skillsets."
  • Agents are for complex integrations that need full control over how requests are processed and responses are generated. They let you implement custom logic, integrate with other LLMs and/or the Copilot API, manage conversation context, and handle all aspects of the user interaction. While Agents require more engineering and maintenance, they offer maximum flexibility for sophisticated workflows. For more information about agents, see "About Copilot agents."

1. Learn about Copilot agents

Copilot agents contain the custom code for your Copilot Extension, and integrate with a GitHub App to form the Copilot Extension itself. For more information, see "About Copilot agents."

To successfully build a Copilot agent, you need to understand how the agent communicates with:

2. Review example Copilot agents and the Copilot Extensions SDK

To see the previous concepts in practice and learn about agent implementations, review the following example agents and software development kit (SDK), all of which are available in the copilot-extensions organization:

  • Blackbeard (best starting point): A simple agent that responds to requests like a pirate using Copilot's large language model (LLM) API and special system prompts.
  • GitHub Models: A more complex agent that lets you ask about and interact with various LLMs listed on the GitHub Marketplace through Copilot Chat. The GitHub Models agent makes use of function calling.
  • Function Calling: An example agent written in Go that demonstrates function calling and confirmation dialogs.
  • RAG Extension: An example agent written in Go that demonstrates a simple implementation of retrieval augmented generation.
  • Preview SDK: An SDK that streamlines the development of Copilot Extensions by handling request verification, payload parsing, and response formatting automatically. This SDK allows extension builders to focus more on creating core functionality and less on boilerplate code.

3. Build a Copilot agent

Using the reference material from the previous steps, plan and build your Copilot agent. You can choose to implement any of the following options:

4. Deploy your Copilot agent

To make your Copilot agent accessible to the Copilot platform and GitHub, you need to deploy it to a server that is reachable by HTTP request. See "Configuring your server to host your Copilot extension."

5. Create a GitHub App and integrate it with your Copilot agent

To create a Copilot Extension, you need to create and configure a GitHub App, then integrate it with your Copilot agent. See "Creating a GitHub App for your Copilot Extension" and "Configuring your GitHub App for your Copilot extension."

6. Choose the availability of your Copilot Extension

Choose one of two visibility levels for your Copilot Extension:

  • Public: Any user or organization account with the installation page link for the extension can install it.
  • Private: Only the user or organization account that created the extension can install it.

If you make your Copilot Extension public, you can then choose to list it on the GitHub Marketplace.

To learn how to change the visibility of your Copilot Extension and list it on the GitHub Marketplace, see "Managing the availability of your Copilot Extension."

Next steps

To learn how to use your Copilot Extension, see "Using extensions to integrate external tools with Copilot Chat."

1. Learn about Github Copilot skillsets

Github Copilot skillsets contain the custom code for your Copilot Extension, and integrate with a GitHub App to form the Copilot Extension itself.

Unlike Copilot agents, Copilot skillsets handle the logic behind prompt crafting, function evaluation, and response generation, making them an ideal choice for developers seeking quick and effective integrations with minimal effort. For more information, see "About Copilot skillsets."

2. Build a Copilot skillset

To explore an example of a skillset implementation, see the skillset-example repository in the copilot-extensions organization.

To build a skillset, see "Building Copilot skillsets."

3. Deploy your Copilot skillset

To make your Copilot skillset accessible to the Copilot platform and GitHub, you need to deploy it to a server that is reachable by HTTP request. See "Configuring your server to host your Copilot extension."

4. Create a GitHub App and integrate it with your Copilot skillset

To create a Copilot Extension, you need to create and configure a GitHub App, then integrate it with your Copilot skillset. See "Creating a GitHub App for your Copilot Extension" and "Configuring your GitHub App for your Copilot extension."

5. Choose the availability of your Copilot skillset

Choose one of two visibility levels for your Copilot Extension:

  • Public: Any user or organization account with the installation page link for the extension can install it.
  • Private: Only the user or organization account that created the extension can install it.

If you make your Copilot Extension public, you can then choose to list it on the GitHub Marketplace.

To learn how to change the visibility of your Copilot Extension and list it on the GitHub Marketplace, see "Managing the availability of your Copilot Extension."

Next steps

To learn how to use your Copilot Extension, see "Using extensions to integrate external tools with Copilot Chat."