Learn about the development process for Copilot Extensions.
Anyone with a GitHub Copilot Pro or Copilot Free subscription can use Copilot Extensions.
For organizations or enterprises with a Copilot Business or Copilot Enterprise subscription, organization owners and enterprise administrators can grant access to Copilot Extensions.
Copilot Extensions is not available for GitHub Enterprise Server.
Copilot Extensions are integrations that expand the functionality of Copilot Chat, allowing developers to bring external tools, services, and custom behaviors into the Chat experience. You can use Copilot Extensions to extend the capabilities of Copilot Chat in a variety of ways, including:
GitHub Copilot Extensions are a type of Copilot Extension built with GitHub Apps. GitHub Copilot Extensions are best suited for developers who want cross-platform compatibility and app management and support from GitHub.
GitHub 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.
Permissions vary by extension, depending on the level of authorization that the extension requires in order to respond to your query. You can view the required permissions on the extension’s installation page, located after the billing information step and before the install and authorize step.
For developers: At a minimum, the Copilot Chat permissions must be set to "Read-only". Additional permissions may include executing write actions on other surfaces and authorizing read access to repository and organization level data in GitHub.
For builders: In addition to the above, you may also request local context from a user’s editor to further tailor responses. To do so, the Copilot Editor Context permissions must be set to "Read-only". Users will be notified to provide the required authorization.
For more information on GitHub App permissions, see Choosing permissions for a GitHub App
Only organization admins can grant permissions for Copilot Extensions to access organization resources. To grant organization members access:
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:
You can allow your Copilot Extension to receive context from the editor, such as the currently opened file, by enabling the Read-only access level for the "Copilot Editor Context" permission in your GitHub App settings. See step 10 of Configuring your GitHub App.
The GitHub Copilot Extensibility Platform automatically handles messaging when implicit and explicit context is unavailable or unauthorized. To enable context passing, you are required to request permissions from users. To enable context passing, you are required to:
Context passing respects content exclusions, which refers to any files listed in your context exclusion settings, including files that begin with ..
.
For more information about context passing, see Context passing for your agent.
Building GitHub Copilot Extensions requires using the GitHub API. Optionally, the Copilot API can be used for additional capabilities. For details on request and response formatting, see the OpenAI API documentation.
Note
The Copilot API is available for Copilot Extension builders, but only GitHub Apps and VS Code Chat extensions can be used to access these endpoints.
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 GitHub Copilot Extension from scratch, you may want to explore an existing Copilot agent, then 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 GitHub Copilot Extension:
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 GitHub Copilot Extension. For more information, see the Blackbeard Copilot Extension.
GitHub Models: A more complex Copilot agent that lets 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.
GitHub Models are in public preview and subject to change. To request access, join the waitlist.
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 GitHub 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.
The GitHub documentation focuses on building GitHub Copilot Extensions, not Copilot-enabled Visual Studio Code extensions.
You can build a Copilot Extension that is exclusive and native to Visual Studio Code, called a Copilot-enabled Visual Studio Code extensions. This option is best suited for developers who want to build extensions that use VS Code-specific APIs and functionality, or extend existing VS Code extensions.
Also known as VS Code Chat extensions, Copilot-enabled Visual Studio Code extensions function similarly to GitHub Copilot Extensions by extending the capabilities of Copilot Chat, with a few notable differences:
For more information on Copilot-enabled Visual Studio Code extensions, see Chat extensions in the Visual Studio Code documentation.