Skip to main content

About building GitHub Copilot Extensions

Learn about developing Copilot 확장.

누가 이 기능을 사용할 수 있나요?

Copilot Pro, Copilot Pro(프로)+, Copilot Free 플랜을 구독 중인 모든 사용자는 Copilot 확장를 이용할 수 있습니다.

Copilot Business 또는 Copilot Enterprise 플랜을 보유한 조직 또는 엔터프라이즈의 경우 조직 소유자 및 엔터프라이즈 관리자는 Copilot 확장에 대한 액세스 권한을 부여할 수 있습니다.

Copilot 확장는 현재 GitHub Enterprise Server에 사용할 수 없습니다.

About building Copilot 확장

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 Copilot 확장 to extend the capabilities of Copilot Chat in a variety of ways, including:

  • Querying documentation: A Copilot 확장 can allow Copilot Chat to query a third-party documentation service to find information about a specific topic.
  • AI-assisted coding: A Copilot 확장 can use a third-party AI model to provide code suggestions.
  • Data retrieval: A Copilot 확장 can allow Copilot Chat to query a third-party data service to retrieve information about a specific topic.
  • Action execution: A 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.

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.

About skillsets and agents

기술 세트와 에이전트는 Copilot 확장성 플랫폼을 통해 Copilot의 기능과 컨텍스트를 확장하는 두 가지 방법입니다. 외부 서비스와 API를 Copilot Chat에 통합할 수 있지만 각각 다른 사용 사례를 제공하고 다양한 수준의 제어와 복잡성을 제공합니다.

  • 기술 세트는 Copilot가 최소한의 설정으로 특정 작업(예: 데이터 검색이나 간단한 작업)을 수행해야 하는 개발자를 위해 가볍고 간소화되었습니다. 라우팅, 프롬프트 작성, 함수 평가, 응답 생성을 자동으로 처리하므로 빠르고 간단한 통합에 적합합니다. For more information about skillsets, see GitHub Copilot 확장용 기술 세트 정보.
  • 에이전트는 요청이 처리되고 응답이 생성되는 방식을 완전히 제어해야 하는 복잡한 통합을 위한 것입니다. 사용자 지정 논리를 구현하고, 다른 LLM 및/또는 Copilot API와 통합하고, 대화 컨텍스트를 관리하고, 사용자 상호 작용의 모든 측면을 처리할 수 있습니다. 에이전트는 더 많은 엔지니어링과 유지 관리가 필요하지만, 정교한 워크플로를 위한 최대 유연성을 제공합니다. 에이전트에 대한 자세한 내용은 GitHub Copilot 확장용 에이전트 정보을(를) 참조하세요.

About context passing

You can allow your 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 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 에이전트에 대한 컨텍스트 전달.

Using APIs in GitHub Copilot 확장

Building 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.

참고 항목

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

Resources for building 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 GitHub Copilot 확장 from scratch, you may want to explore an existing Copilot 에이전트, then integrate it with a GitHub App to see how it works. GitHub provides a few example Copilot 에이전트 that you can clone and use as the basis for your own GitHub Copilot 확장:

  • Blackbeard: A simple 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 GitHub Copilot 확장. For more information, see the Blackbeard Copilot 확장.

  • GitHub Models: A more complex 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 Copilot 확장.

    참고 항목

    GitHub Models are in 공개 미리 보기 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 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 지원 VS Code 채팅 참가자

참고 항목

The GitHub documentation focuses on building GitHub Copilot 확장, not Copilot 지원 VS Code 채팅 참가자.

You can build a Copilot 확장 that is exclusive and native to Visual Studio Code, called a Copilot 지원 VS Code 채팅 참가자.

GitHub Copilot 확장 and Copilot 지원 VS Code 채팅 참가자 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:

  • GitHub Copilot 확장 can be used in any editor where extensions are supported, while Copilot 지원 VS Code 채팅 참가자 are only available in Visual Studio Code.
  • 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 지원 VS Code 채팅 참가자 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 지원 VS Code 채팅 참가자 are local to the user's machine, they cannot be controlled by the Copilot policies of an organization or enterprise on GitHub.com.
  • Copilot 지원 VS Code 채팅 참가자 are published to the VS Code Marketplace, not the GitHub Marketplace.

Copilot 지원 VS Code 채팅 참가자 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 지원 VS Code 채팅 참가자, see Chat extensions in the Visual Studio Code documentation.

Indemnity for Copilot 확장

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