About building Copilot-Erweiterungen
Copilot-Erweiterungen 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-Erweiterungen to extend the capabilities of Copilot Chat in a variety of ways, including:
- Querying documentation: A Copilot-Erweiterung can allow Copilot Chat to query a third-party documentation service to find information about a specific topic.
- AI-assisted coding: A Copilot-Erweiterung can use a third-party AI model to provide code suggestions.
- Data retrieval: A Copilot-Erweiterung can allow Copilot Chat to query a third-party data service to retrieve information about a specific topic.
- Action execution: A Copilot-Erweiterung 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-Erweiterungen 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
Mit Skillsets und Agents können die Funktionen und der Kontext von Copilot mithilfe der Copilot Extensibility Platform erweitert werden. Damit kannst du externe Dienste und APIs mit Copilot Chat integrieren. Jede Instanz hat verschiedene Anwendungsfälle und unterschiedliche Kontrollmöglichkeiten und Komplexitätsniveaus:
- Skillsets sind einfach, optimiert und für Entwickler erstellt, die Copilot zum Durchführen bestimmter Aufgaben mit geringem Setup benötigen, z. B. Abrufen von Daten oder einfache Vorgänge. Routing, das Erstellen von Prompts, das Auswerten von Funktionen und das Generieren von Antworten wird automatisch verarbeitet. Daher eignen sich Skillsets ideal für schnelle und einfache Integrationen. For more information about skillsets, see Info zu Skillsets für GitHub Copilot-Erweiterungen.
- Agents sind für komplexe Integrationen vorgesehen, die vollständige Kontrolle darüber erfordern, wie Anforderungen verarbeitet und Antworten generiert werden. So kannst du benutzerdefinierte Logik implementieren, mit anderen LLMs und/oder der Copilot-API integrieren, Unterhaltungskontext verwalten und dich um alle Aspekte der Benutzerinteraktion kümmern. Während Agents mehr Engineering und Wartung erfordern, bieten sie maximale Flexibilität für anspruchsvolle Workflows. Weitere Informationen zu Agents findest du unter Info zu Agents für GitHub Copilot-Erweiterungen.
About context passing
You can allow your Copilot-Erweiterung 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:
- 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 Kontextweitergabe für deinen Agent.
Using APIs in GitHub Copilot-Erweiterungen
Building GitHub Copilot-Erweiterungen 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.
Hinweis
The Copilot API is available for Copilot-Erweiterung builders, but only GitHub Apps and VS Code Chat extensions can be used to access these endpoints.
Resources for building GitHub Copilot-Erweiterungen
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-Erweiterung 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-Erweiterung:
-
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-Erweiterung. For more information, see the Blackbeard Copilot-Erweiterung.
-
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-Erweiterung.
Hinweis
GitHub Models are in public preview 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-Erweiterungen 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-basierte VS Code-Chatteilnehmer
Hinweis
The GitHub documentation focuses on building GitHub Copilot-Erweiterungen, not Copilot-basierte VS Code-Chatteilnehmer.
You can build a Copilot-Erweiterung that is exclusive and native to Visual Studio Code, called a Copilot-basierter VS Code-Chatteilnehmer.
GitHub Copilot-Erweiterungen and Copilot-basierte VS Code-Chatteilnehmer 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-Erweiterungen can be used in any editor where extensions are supported, while Copilot-basierte VS Code-Chatteilnehmer are only available in Visual Studio Code.
- GitHub Copilot-Erweiterungen 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-basierte VS Code-Chatteilnehmer 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-basierte VS Code-Chatteilnehmer are local to the user's machine, they cannot be controlled by the Copilot policies of an organization or enterprise on GitHub.com.
- Copilot-basierte VS Code-Chatteilnehmer are published to the VS Code Marketplace, not the GitHub Marketplace.
Copilot-basierte VS Code-Chatteilnehmer 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-basierte VS Code-Chatteilnehmer, see Chat extensions in the Visual Studio Code documentation.
Indemnity for Copilot-Erweiterungen
Copilot-Erweiterungen 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.