This article is designed to help you build an entirely new Extensión de GitHub Copilot. To instead learn how to quickly build and test a demo Extensión de Copilot created by GitHub, see Quickstart for GitHub Copilot Extensions using agents.
Los conjuntos de aptitudes y los agentes son las dos maneras de ampliar las capacidades de Copilot y el contexto mediante la . Permiten integrar servicios externos y API en , pero cada uno atiende diferentes casos de uso y ofrece distintos niveles de control y complejidad:
- Los conjuntos de aptitudes son ligeros y funcionales y están diseñados para desarrolladores que necesitan que Copilot lleve a cabo tareas específicas (por ejemplo, recuperación de datos u operaciones simples) con una configuración mínima. Controlan el enrutamiento, la creación de indicaciones, la evaluación de funciones y la generación de respuestas automáticamente, lo que hace que sean perfectos para integraciones rápidas y sencillas. For more information about skillsets, see About skillsets for Copilot Extensions.
- Los agentes son para integraciones complejas que necesitan un control total sobre cómo se procesan las solicitudes y se generan respuestas. Permiten implementar lógica personalizada, integrarla con otros modelos LLM o la API de Copilot, administrar el contexto de conversación y controlar todos los aspectos de la interacción del usuario. Aunque los agentes requieren más tareas de ingeniería y mantenimiento, ofrecen máxima flexibilidad para flujos de trabajo sofisticados. Para más información sobre los agentes, consulta About agents for Copilot Extensions.
1. Learn about Agentes de Copilot
Agentes de Copilot contain the custom code for your Extensión de Copilot, and integrate with a GitHub App to form the Extensión de Copilot itself. For more information, see About agents for Copilot Extensions.
To successfully build a Agente de Copilot, you need to understand how the agent communicates with:
- The Copilot platform using server-sent events. See Configuring your Copilot agent to communicate with the Copilot platform.
- The GitHub API. See Configuring your Copilot agent to communicate with GitHub.
2. Review example Agentes de Copilot and the Extensiones de Copilot SDK
To see the previous concepts in practice and learn about agent implementations, review the following example agents and software development kit (SDK), all of which are available in the copilot-extensions
organization:
- Blackbeard (best starting point): A simple agent that responds to requests like a pirate using Copilot's large language model (LLM) API and special system prompts.
- GitHub Models: A more complex agent that lets you ask about and interact with various LLMs listed on the GitHub Marketplace through Copilot Chat. The GitHub Models agent makes use of function calling.
- Function Calling: An example agent written in Go that demonstrates function calling and confirmation dialogs.
- RAG Extension: An example agent written in Go that demonstrates a simple implementation of retrieval augmented generation.
- Preview SDK: An SDK that streamlines the development of Extensiones de Copilot by handling request verification, payload parsing, and response formatting automatically. This SDK allows extension builders to focus more on creating core functionality and less on boilerplate code.
3. Build a Agente de Copilot
Using the reference material from the previous steps, plan and build your Agente de Copilot. You can choose to implement any of the following options:
- To avoid building and managing your own LLM deployment, your agent can call the Copilot LLM deployment. See Using Copilot's LLM for your agent.
- To quickly interpret user input and choose from a variety of predefined functions to execute, you can implement function calling in your agent. To learn more, see How to use function calling with Azure OpenAI Service in the Azure OpenAI documentation and Function calling in the OpenAI documentation.
4. Deploy your Agente de Copilot
To make your Agente de Copilot accessible to the Copilot platform and GitHub, you need to deploy it to a server that is reachable by HTTP request. See Configuring your server to host your Copilot extension.
5. Create a GitHub App and integrate it with your Agente de Copilot
To create a Extensión de Copilot, you need to create and configure a GitHub App, then integrate it with your Agente de Copilot. See Creating a GitHub App for your Copilot Extension and Configuring your GitHub App for your Copilot extension.
6. Choose the availability of your Extensión de Copilot
Choose one of two visibility levels for your Extensión de Copilot:
- Public: Any user or organization account with the installation page link for the extension can install it.
- Private: Only the user or organization account that created the extension can install it.
If you make your Extensión de Copilot public, you can then choose to list it on the GitHub Marketplace.
To learn how to change the visibility of your Extensión de Copilot and list it on the GitHub Marketplace, see Managing the availability of your Copilot Extension.
Next steps
To learn how to use your Extensión de Copilot, see Using extensions to integrate external tools with Copilot Chat.
1. Learn about Conjuntos de aptitudes de GitHub Copilot
Conjuntos de aptitudes de GitHub Copilot contain the custom code for your Extensión de Copilot, and integrate with a GitHub App to form the Extensión de Copilot itself.
Unlike Agentes de Copilot, Conjuntos de aptitudes de Copilot handle the logic behind prompt crafting, function evaluation, and response generation, making them an ideal choice for developers seeking quick and effective integrations with minimal effort. For more information, see About skillsets for Copilot Extensions.
2. Build a Conjunto de aptitudes de Copilot
To explore an example of a skillset implementation, see the skillset-example repository in the copilot-extensions
organization.
To build a skillset, see Building Copilot skillsets.
3. Deploy your Conjunto de aptitudes de Copilot
To make your Conjunto de aptitudes de Copilot accessible to the Copilot platform and GitHub, you need to deploy it to a server that is reachable by HTTP request. See Configuring your server to host your Copilot extension.
4. Create a GitHub App and integrate it with your Conjunto de aptitudes de Copilot
To create a Extensión de Copilot, you need to create and configure a GitHub App, then integrate it with your Conjunto de aptitudes de Copilot. See Creating a GitHub App for your Copilot Extension and Configuring your GitHub App for your Copilot extension.
5. Choose the availability of your Conjunto de aptitudes de Copilot
Choose one of two visibility levels for your Extensión de Copilot:
- Public: Any user or organization account with the installation page link for the extension can install it.
- Private: Only the user or organization account that created the extension can install it.
If you make your Extensión de Copilot public, you can then choose to list it on the GitHub Marketplace.
To learn how to change the visibility of your Extensión de Copilot and list it on the GitHub Marketplace, see Managing the availability of your Copilot Extension.
Next steps
To learn how to use your Extensión de Copilot, see Using extensions to integrate external tools with Copilot Chat.