Skip to main content

About building Copilot Extensions

Learn about the development process for Copilot Extension.

Note

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

About Copilot Extensions

Copilot Extensions are integrations that expand the functionality of Copilot Chat. Copilot Extensions allow developers to integrate external tools, services, and custom behaviours into the Copilot Chat experience across all supported IDEs and GitHub.

Copilot Extensions are built as GitHub Apps with additional capabilities, including:

  • Read-access to your Copilot Chat history
  • Sending responses to users in the Copilot Chat window
  • Execution of GitHub (first party) or functions on external services (third party)

Copilot Extensions can be used with:

  • Copilot Chat in Visual Studio
  • Copilot Chat in Visual Studio Code
  • Copilot Chat in GitHub.com (with a Copilot Enterprise subscription)

Visibility of Copilot Extensions

Copilot Extensions can be private, public and shareable, or public and listed on the GitHub Marketplace. Which visibility option you choose will depend on your use case and the audience you are targeting.

  • Private extensions are often preferred by large enterprises or companies that:
    • Want more customization and controls over data access
    • Need to integrate with a large volume of internal documents and databases
    • Have strict security policies making it difficult to authorize permissions for third-parties
  • Public extensions are suitable for:
    • Open-source projects
    • Collaborative development and use across organizations within an enterprise
    • Sharing your tool and getting feedback before publishing to the GitHub Marketplace
  • GitHub Marketplace extensions are ideal for third-parties that want to:
    • Offer their service to a broader audience
    • Integrate their tool into the developer workflow on GitHub and the IDE
    • Leverage the GitHub ecosystem to raise awareness for their product

Use cases

You can use Copilot Extensions to extend the capabilities of Copilot Chat in a variety of ways. For example, you could use them for:

  • Docs querying: A Copilot Extension could allow Copilot Chat to query a third-party documentation service to find information about a specific topic.
  • AI-assisted coding: A Copilot Extension could use a third-party AI model to provide code suggestions.
  • Data retrieval: A Copilot Extension could allow Copilot Chat to query a third-party data service to retrieve information about a specific topic.
  • Action execution: A Copilot Extension could allow Copilot Chat to execute a specific action, such as posting to a message board or updating a tracking item in an external system.

Extensions toolkit, code samples and SDK

GitHub provides a comprehensive toolkit for extension builders, with code samples, a CLI debugging tool, quickstart SDKs, and a user feedback repository. For more information, see the copilot-extensions organization on GitHub.

Before creating your own Copilot Extension from scratch, you may want to explore an existing Copilot agent, and integrate it with a GitHub App to see how it works. GitHub provides a few example Copilot agents, that you can clone and use as the basis for your own Copilot Extension, including:

  • Blackbeard: A simple Copilot agent that responds to requests like a pirate, using Copilot's LLM API and special system prompts. It is a good starting point for learning how to build a Copilot Extension. For more information, see the Blackbeard Copilot Extension.
  • GitHub Models: A more complex Copilot agent that let's you ask about and interact with various LLMs listed on the GitHub Marketplace from within Copilot Chat. For more information, see the GitHub Models Copilot Extension.
  • Function calling: an example agent written in Go that demonstrates function calling and confirmation dialogues. For more information, see the Function calling extension.
  • RAG extension: an example agent written in Go that demonstrates a simple implementation of retrieval augmented generation. For more information, see the RAG extension.
  • Preview SDK: An SDK that simplifies the process of building Copilot Extensions by handling request verification, response formatting, and API interactions. It allows builders to focus on their extension's core functionality rather than boilerplate, by streamlining the integration of tools, APIs, and data sources into Copilot Chat. For more information, see the Preview SDK.

About Visual Studio Code Chat extensions

GitHub Copilot Extensions are generally built as GitHub Apps. However, there is also an option to build a Visual Studio Code Chat extension that integrates with Copilot Chat and provides a similar end user experience. Visual Studio Code Chat extensions are a good option for developers looking to customize their copilot experience with functionalities specific to Visual Studio Code.

There are some key differences from GitHub App Copilot Extensions:

  • Visual Studio Code Specific: Unlike GitHub App Copilot Extensions, which work across all supported IDEs and GitHub, Visual Studio Code Chat extensions only work within the Visual Studio Code environment.
  • Capabilities: They have more access to Visual Studio Code's features and APIs, allowing for more editor-specific interactions, such as accessing local workspace data and manipulating Visual Studio Code's interface.
  • Publishing: They can be published to the Visual Studio Code Marketplace. They cannot be published on the GitHub Marketplace.

For more information, see Visual Studio Code Chat extensions in the Visual Studio Code documentation.

Further reading