Custom agents allow you to tailor Copilot's expertise for specific tasks. For a conceptual overview of custom agents, see Acerca de los agentes personalizados.
Nota:
Custom agents se encuentran en versión preliminar pública para los IDEs de JetBrains, Eclipse y Xcode y pueden estar sujetos a cambios.
Creating a custom agent profile
- Open GitHub Copilot Chat in Visual Studio Code.
- From the agents dropdown at the bottom of the chat view, click Configure Custom Agents..., then click Create new custom agent.
- Choose the location where the agent profile should be created:
- Workspace: Create the custom agent profile in the
.github/agentsfolder of your workspace to only use it within that workspace. - User profile: Create the custom agent profile in the current user profile folder to use it across all your workspaces.
- Workspace: Create the custom agent profile in the
- Enter a file name for the custom agent. This is the default name that appears in the agents dropdown.
- Configure the agent profile in the newly created
.agent.mdfile, including the description, tools, and prompts. For more information on what the agent profile can include, see Configuring an agent profile.- You can use the Configure Tools... button within the editor to open the "Configure Tools" dialog, where you can view and select available tools, including built-in tools and tools from MCP servers. Click OK to add selected tools to the agent profile.
- To set which AI model the agent uses, add a
model:property and select your preferred model from the autocomplete dropdown.
To update an agent profile, select Configure Custom Agents from the agents dropdown, and then click on an agent from the list to modify it. For more information on custom agents in VS Code, see Custom agents in VS Code.
Creating a custom agent profile
- Open the GitHub Copilot Chat window in your JetBrains IDE.
- From the agents dropdown at the bottom of the chat view, click Configure Agents..., then in the settings window, under "Chat Agents", click Workspace.
- Enter a file name for the custom agent. This is the default name that appears in the agents dropdown.
- Configure the agent profile in the newly created
.agent.mdfile in the.github/agentsdirectory, including the description, tools, and prompts. For more information on what the agent profile can include, see Configuring an agent profile.- You can use the Configure Tools... button within the editor to open the tools dialog, where you can view and select available tools, including built-in tools and tools from MCP servers. Click Apply to add selected tools to the agent profile.
- To set which AI model the agent uses, add a
model:property and select your preferred model from the autocomplete dropdown.
To update an agent profile, select Configure Custom Agents from the agents dropdown, and then click next to the agent you want to modify.
Creating a custom agent profile
- Open the GitHub Copilot Chat window in Eclipse.
- From the agents dropdown at the bottom of the chat view, click Configure Agents..., then click Add....
- Enter a file name for the custom agent. This is the default name that appears in the agents dropdown.
- Configure the agent profile in the newly created
.agent.mdfile in the.github/agentsdirectory, including the description, tools, and prompts. For more information on what the agent profile can include, see Configuring an agent profile.- You can use the Configure Tools... button within the editor to open the "Configure Tools" dialog, where you can view and select available tools, including built-in tools and tools from MCP servers. Click Apply to add selected tools to the agent profile.
- To set which AI model the agent uses, add a
model:property and select your preferred model from the autocomplete dropdown.
To update an agent profile, select Configure Agents... from the agents dropdown, and then select the agent you want to modify and click Edit.
Creating a custom agent profile
- Open the GitHub Copilot Chat window in Xcode.
- From the agents dropdown at the bottom of the chat view, click Create an agent.
- Enter a file name for the custom agent. This is the default name that appears in the agents dropdown.
- Configure the agent profile in the newly created
.agent.mdfile in the.github/agentsdirectory, including the description, tools, and prompts. For more information on what the agent profile can include, see Configuring an agent profile.- You can use the Customize Agent button within the file editor to open a dialog, where you can select the AI model for the agent to use, select available tools (including built-in and MCP server tools), and configure the
handoffsproperty for transitioning between custom agents. Click Apply to add selected options to the agent profile.
- You can use the Customize Agent button within the file editor to open a dialog, where you can select the AI model for the agent to use, select available tools (including built-in and MCP server tools), and configure the
To update an agent profile, from the agents dropdown, click the pencil icon next to the agent you want to modify.
Configuring an agent profile
Un agent profile es un archivo Markdown con frontmatter de YAML que especifica el nombre, la descripción, las herramientas disponibles y las configuraciones del servidor MCP de custom agent. La configuración de un agent profile elemento implica definir la identidad, las funcionalidades, el acceso a herramientas y las instrucciones de comportamiento del agente.
Para obtener información detallada sobre las propiedades YAML, las herramientas, la configuración del servidor MCP, los alias de herramientas y cómo se procesan custom agents, consulte Configuración de agentes personalizados.
Para configurar agent profile:
- Opcionalmente, escriba un
namepara custom agent. Si no se establece, el nombre tendrá como valor predeterminado el nombre de archivo (sin el.mdsufijo o.agent.md). - Escriba un breve
description(obligatorio) explicando lo que hace tu agente y sus capacidades específicas o su expertise en el dominio. - En la
toolspropiedad , defina qué herramientas puede usar el agente. Se trata de una lista de nombres o alias de herramientas, incluidas las herramientas de los servidores MCP configurados en la configuración del repositorio o en agent profile (por ejemplo,tools: ["read", "edit", "search", "some-mcp-server/tool-1"]). Si omite esta propiedad, el agente tendrá acceso a todas las herramientas disponibles. Consulte "Herramientas" en Configuración de agentes personalizados. - Opcionalmente, en la
mcp-serverspropiedad , puede configurar servidores MCP que solo estarán disponibles para este agente para ampliar sus funcionalidades. Consulte "Detalles de configuración del servidor MCP" en Configuración de agentes personalizados. - Si van a crear y usar agent profile en VS Code, los IDEs de JetBrains, Eclipse o Xcode, también pueden usar la propiedad
modelpara controlar qué modelo de IA debe usar el agente. - Opcionalmente, establezca la propiedad
targetenvscodeogithub-copilotsi solo desea usar el agente en un entorno específico. El agente estará disponible en ambos entornos si omite la propiedad. - Escriba el mensaje del agente. Defina el comportamiento, la experiencia y las instrucciones del agente en el contenido de Markdown debajo del frontmatter de YAML. El mensaje puede tener un máximo de 30 000 caracteres.
Example agent profiles
En los ejemplos siguientes se muestra lo que un agent profile podría parecer para las tareas comunes de realizar pruebas o planificar la implementación de un proyecto. Para obtener más inspiración, consulte los ejemplos de Custom agents en la biblioteca de personalización. También puede encontrar ejemplos más específicos en la colección de comunidad awesome-copilot .
Especialista en pruebas
En este ejemplo se habilitan todas las herramientas omitiendo la tools propiedad .
--- name: test-specialist description: Focuses on test coverage, quality, and testing best practices without modifying production code --- You are a testing specialist focused on improving code quality through comprehensive testing. Your responsibilities: - Analyze existing tests and identify coverage gaps - Write unit tests, integration tests, and end-to-end tests following best practices - Review test quality and suggest improvements for maintainability - Ensure tests are isolated, deterministic, and well-documented - Focus only on test files and avoid modifying production code unless specifically requested Always include clear test descriptions and use appropriate testing patterns for the language and framework.
---
name: test-specialist
description: Focuses on test coverage, quality, and testing best practices without modifying production code
---
You are a testing specialist focused on improving code quality through comprehensive testing. Your responsibilities:
- Analyze existing tests and identify coverage gaps
- Write unit tests, integration tests, and end-to-end tests following best practices
- Review test quality and suggest improvements for maintainability
- Ensure tests are isolated, deterministic, and well-documented
- Focus only on test files and avoid modifying production code unless specifically requested
Always include clear test descriptions and use appropriate testing patterns for the language and framework.
Planificador de implementación
En este ejemplo solo se habilita un subconjunto de herramientas.
--- name: implementation-planner description: Creates detailed implementation plans and technical specifications in markdown format tools: ["read", "search", "edit"] --- You are a technical planning specialist focused on creating comprehensive implementation plans. Your responsibilities: - Analyze requirements and break them down into actionable tasks - Create detailed technical specifications and architecture documentation - Generate implementation plans with clear steps, dependencies, and timelines - Document API designs, data models, and system interactions - Create markdown files with structured plans that development teams can follow Always structure your plans with clear headings, task breakdowns, and acceptance criteria. Include considerations for testing, deployment, and potential risks. Focus on creating thorough documentation rather than implementing code.
---
name: implementation-planner
description: Creates detailed implementation plans and technical specifications in markdown format
tools: ["read", "search", "edit"]
---
You are a technical planning specialist focused on creating comprehensive implementation plans. Your responsibilities:
- Analyze requirements and break them down into actionable tasks
- Create detailed technical specifications and architecture documentation
- Generate implementation plans with clear steps, dependencies, and timelines
- Document API designs, data models, and system interactions
- Create markdown files with structured plans that development teams can follow
Always structure your plans with clear headings, task breakdowns, and acceptance criteria. Include considerations for testing, deployment, and potential risks. Focus on creating thorough documentation rather than implementing code.
Using custom agents
Una vez que haya creado un custom agent, puede usarlo donde Copilot cloud agent esté disponible.
- Cuando solicite a Copilot cloud agent una tarea en GitHub.com, use el menú desplegable del panel de agentes o de la pestaña de agentes para seleccionar la opción custom agent en lugar de la predeterminada cloud agent.
- Al asignar Copilot cloud agent a un problema, puede seleccionar custom agent del menú desplegable para gestionar la incidencia con su configuración especializada.
- Al usar GitHub Copilot CLI, puede optar por usar un custom agent concreto mediante el comando de barra oblicua
/agento haciendo referencia al agente en un indicador del sistema o a través de un argumento de línea de comandos. Para obtener más información, vea Uso de la CLI de GitHub Copilot.
Cuando Copilot abre solicitudes de incorporación de datos, anotará qué custom agent se usó para completar la descripción de la solicitud de incorporación de datos.
Para más información sobre el uso de Copilot cloud agent, consulta Inicio de sesiones de GitHub Copilot.
Using custom agents in your IDE
You can also use your custom agent profiles directly in supported IDEs. You can switch between custom agents using the agent dropdown in the Chat window, allowing you to access specialized configurations for different tasks like planning, code editing, or research.
Some properties may function differently between the GitHub.com and IDE environments. For more information on supported properties, see Configuración de agentes personalizados.
For more information on custom agents in VS Code specifically, see Custom agents in VS Code in the VS Code documentation.
Next steps
- Para ver un tutorial práctico para crear su primer custom agent, consulte Primer agente personalizado.
- Para obtener información detallada sobre la configuración, consulte Configuración de agentes personalizados.
- Para obtener información sobre el uso de agentes en la nube, incluido custom agents, para iniciar Copilot sesiones, consulte Inicio de sesiones de GitHub Copilot.