Skip to main content

About Copilot Extensions

Learn about the development process for Extensões do Copilot.

Quem pode usar esse recurso?

Qualquer pessoa com um plano do Copilot Pro, do Copilot Pro+ ou do Copilot Free pode usar o Extensões do Copilot.

Para organizações ou empresas com um plano do Copilot Business ou do Copilot Enterprise, proprietários de organização e administradores de empresa podem conceder acesso a Extensões do Copilot.

O Extensões do Copilot não está disponível para o GitHub Enterprise Server.

About Extensões do Copilot

Extensões do Copilot 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 Extensões do Copilot to extend the capabilities of Copilot Chat in a variety of ways, including:

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

Extensões do GitHub Copilot are built with GitHub Apps. They are best suited for developers who want cross-platform compatibility and app management and support from GitHub.

Supported clients and IDEs

Clientes e IDEsSuporte para Extensões do GitHub Copilot
Visual Studio Code
Visual Studio.
GitHub.com
GitHub Mobile
IDEs JetBrains
GitHub Codespaces
Vim/Neovim
Copilot na CLI
Xcode

Visibility of Extensões do GitHub Copilot

Extensões do GitHub Copilot 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

Extensões do GitHub Copilot permissions

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 extension users: 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 extension creators: 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 Escolhendo permissões para um Aplicativo GitHub.

Granting permissions to access organization resources

Users with an individual Copilot subscription can install and use Extensões do Copilot. Users with a Copilot Business or Copilot Enterprise subscription need an organization administrator to enable this feature.

Only organization administrators can grant permissions for Extensões do Copilot to access organization resources.

To grant organization members access, the organization administrator must:

  • Install the extension
  • Grant the extension permission to access specific repositories
  • Authorize access for all, or specific repositories

Controlling access at the enterprise level

If you are an enterprise administrator, you can disable Extensões do Copilot across your enterprise by setting the Extensões do Copilot policy to "Disabled". The "No Policy" setting allows organization administrators to set their own policy.

No, there is no allowlist or blocklist at the enterprise level.

Sharing data with Extensões do Copilot

The following data is shared when you interact with Extensões do Copilot:

  • Data attached to your account and Copilot Chat usage, such as GitHub user ID, and timestamps of messages.
  • Past messages within the chat thread where you are invoking an extension. Only one extension can be used per thread, preventing data sharing across extensions. The data retention period for thread context is 30 days.
  • Any additional organization and repository data that is authorized for the extension by your organization administrator. Administrators installing extensions must approve access to the required permissions prior to completing installation.
  • For Chat do Copilot no GitHub, if your administrator has approved the extension to access repository or organization metadata, that data will be shared as well.

About skillsets and agents

Conjuntos de habilidades e agentes são as duas maneiras de estender as funcionalidades e o contexto do Copilotpor meio do Plataforma de Extensibilidade do Copilot. Eles permitem que você integre serviços externos e APIs ao Copilot Chat, mas cada um deles atende a diferentes casos de uso e oferece diferentes níveis de controle e complexidade:

  • Conjuntos de habilidades são leves e simplificados, projetados para desenvolvedores que precisam do Copilot para executar tarefas específicas (por exemplo, recuperação de dados ou operações simples) com configuração mínima. Eles lidam com roteamento, criação de prompts, avaliação de função e geração de resposta automaticamente, tornando-os ideais para integrações rápidas e simples. For more information about skillsets, see About skillsets for Copilot Extensions.
  • Agentes são para integrações complexas que precisam de controle total sobre como as solicitações são processadas e as respostas são geradas. Eles permitem que você implemente a lógica personalizada, integre-se a outras LLMs e/ou à API do Copilot, gerencie o contexto da conversa e lide com todos os aspectos da interação do usuário. Embora os Agentes exijam mais engenharia e manutenção, eles oferecem flexibilidade máxima para fluxos de trabalho sofisticados. Para saber mais sobre agentes, confira About agents for Copilot Extensions.

About context passing

You can allow your Extensão do Copilot 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 Plataforma de extensibilidade do GitHub Copilot 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:

  • Update your APIs to handle new reference types.
  • Request permissions from users. When requesting permissions, follow these best practices:
    • Clearly communicate what context you need and what you need it for.
    • Implement appropriate error handling for unavailable context that your own application logic and API calls.
    • If context is unavailable, provide value where possible without this data.
    • Request only the minimum required permissions for your extension.

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.

Using APIs in Extensões do GitHub Copilot

Building Extensões do GitHub Copilot 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.

Observação

The Copilot API is available for Extensão do Copilot builders, but only GitHub Apps and VS Code Chat extensions can be used to access these endpoints.

Resources for building Extensões do GitHub Copilot

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 Extensão do GitHub Copilot from scratch, you may want to explore an existing Agente do Copilot, then integrate it with a GitHub App to see how it works. GitHub provides a few example Agentes do Copilot that you can clone and use as the basis for your own Extensão do GitHub Copilot:

  • Blackbeard: A simple Agente do Copilot 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 Extensão do GitHub Copilot. For more information, see the Blackbeard Extensão do Copilot.

  • GitHub Models: A more complex Agente do Copilot 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 Extensão do Copilot.

    Observação

    GitHub Models are in versão prévia pública and subject to change.

  • 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 Extensões do GitHub Copilot 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 building Copilot-enabled VS Code chat participants

Observação

The GitHub documentation focuses on building Extensões do GitHub Copilot, not Copilot-enabled VS Code chat participants.

You can build a Extensão do Copilot that is exclusive and native to Visual Studio Code, called a Copilot-enabled VS Code chat participant.

Extensões do GitHub Copilot and Copilot-enabled VS Code chat participants use the same backend platform to route requests to extensions. Both provide similar end-user experiences, integrate with Copilot Chat, and can leverage the Copilot API or other LLMs.

While they share similarities, below are several key differences:

  • Extensões do GitHub Copilot can be used in any editor where extensions are supported, while Copilot-enabled VS Code chat participants are only available in Visual Studio Code.
  • Extensões do GitHub Copilot are server-side extensions, requiring server infrastructure to build. These extensions provide a built-in connection to your GitHub workspaces, as set by your organization administrator.
  • Copilot-enabled VS Code chat participants are client-side extensions that have more access to VS Code's features and APIs, allowing more editor-specific interactions like accessing local workspace data, manipulating Visual Studio Code's interface, and read/write access to local files. They do not require server infrastructure.
  • Because Copilot-enabled VS Code chat participants are local to the user's machine, they cannot be controlled by the Copilot policies of an organization or enterprise on GitHub.com.
  • Copilot-enabled VS Code chat participants are published to the VS Code Marketplace, not the GitHub Marketplace.

Copilot-enabled VS Code chat participants are best suited for developers who want to build extensions that use VS Code-specific APIs and functionality, or extend existing VS Code extensions.

For more information on Copilot-enabled VS Code chat participants, see Chat extensions in the Visual Studio Code documentation.

Indemnity for Extensões do Copilot

Extensões do Copilot are not covered by GitHub Copilot’s indemnity policy. However, this exclusion applies only to issues that arise within extension chat threads.

Installing and using extensions does not affect indemnity coverage for any issues that occur while using other Copilot features such as code completion and chat.

Further reading