1
0
mirror of synced 2025-12-19 09:57:42 -05:00

[DO NOT MERGE] MSFT Build Copilot coding agent megabranch (#55536)

Co-authored-by: hubwriter <hubwriter@github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com>
Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com>
Co-authored-by: felix <guntrip@github.com>
Co-authored-by: Felix Guntrip <stevecat@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Tim Rogers <timrogers@github.com>
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com>
Co-authored-by: Nhu Do <nhu-do@github.com>
Co-authored-by: Ellie Bennett <34038869+elliebennett@users.noreply.github.com>
Co-authored-by: Janice <janiceilene@github.com>
Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
Co-authored-by: Sunbrye Ly <56200261+sunbrye@users.noreply.github.com>
Co-authored-by: Steve Ward <steveward@github.com>
Co-authored-by: Vanessa <vgrl@github.com>
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
Co-authored-by: Kate Catlin <KateCatlin@users.noreply.github.com>
Co-authored-by: Claire W <78226508+crwaters16@users.noreply.github.com>
This commit is contained in:
Siara
2025-05-19 08:32:57 -07:00
committed by GitHub
parent f5c32bbd90
commit 4ebc0afdca
111 changed files with 3188 additions and 63 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -47,6 +47,38 @@ Some migrations cannot be completed through self-service options.
* **Changing between {% data variables.product.prodname_copilot_business_short %} and {% data variables.product.prodname_copilot_enterprise_short %}**: If you need to migrate between these plans within your enterprise and the option isn't available in your "Billing & Licensing" settings, contact {% data variables.contact.contact_support_page %} or your account manager for assistance.
## Allowance usage for {% data variables.copilot.copilot_coding_agent %}
{% data reusables.copilot.coding-agent.premium-requests-start-date %}
Within your monthly usage allowance for {% data variables.product.prodname_actions %} and {% data variables.product.prodname_copilot %} premium requests, you can ask {% data variables.product.prodname_copilot_short %} to work on coding tasks without incurring any additional costs.
When {% data variables.product.prodname_copilot_short %} works on coding tasks, {% data variables.copilot.copilot_coding_agent %} uses:
* **{% data variables.product.prodname_actions %} minutes** from your account's monthly allowance of free minutes for {% data variables.product.prodname_dotcom %}-hosted runners.
This allowance of free minutes is shared with all {% data variables.product.prodname_actions %} workflows in your account.
For details of the free minutes allowance for your {% data variables.product.github %} plan, see [AUTOTITLE](/billing/managing-billing-for-github-actions/about-billing-for-github-actions#included-storage-and-minutes).
* **Premium requests** from your account's monthly allowance of premium {% data variables.product.prodname_copilot_short %} requests.
This allowance of free premium requests is shared with other {% data variables.product.prodname_copilot_short %} features, such as {% data variables.product.prodname_copilot_chat_short %}.
When you use {% data variables.copilot.copilot_coding_agent %}, {% data variables.product.prodname_copilot_short %} may make multiple premium requests to complete a single task. This includes both user-initiated prompts and follow-up actions {% data variables.product.prodname_copilot_short %} takes on your behalf. The total premium requests used will depend on the complexity of the task and the number of steps involved. See [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/monitoring-usage-and-entitlements/avoiding-unexpected-copilot-costs).
For more information about {% data variables.copilot.copilot_coding_agent %}, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
### What happens if you have used up your monthly quota?
If you run out of free Actions minutes or free premium requests, and you have set up billing and a spending limit, you will be charged at the normal rates for additional minutes and premium requests. See [AUTOTITLE](/billing/managing-billing-for-github-actions/about-billing-for-github-actions) and [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests#additional-premium-requests).
If you run out of free minutes or premium requests, and you have _not_ set up billing, a message is displayed explaining why {% data variables.product.prodname_copilot_short %} cannot work on the task.
### Monitoring your use of Actions minutes and premium requests
You can track your monthly usage of {% data variables.product.prodname_actions %} minutes and premium requests, to help you get the most value from your {% data variables.product.prodname_copilot_short %} plan. See [AUTOTITLE](/enterprise-cloud@latest/billing/managing-billing-for-your-products/managing-billing-for-github-actions/viewing-your-github-actions-usage) and [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/monitoring-usage-and-entitlements/monitoring-your-copilot-usage-and-entitlements).
## Further reading
* [AUTOTITLE](/copilot/about-github-copilot/subscription-plans-for-github-copilot)

View File

@@ -1,7 +1,7 @@
---
title: Adding repository custom instructions for GitHub Copilot
shortTitle: Repository custom instructions
intro: 'Create a file in a repository that automatically adds information to questions you ask {% data variables.product.prodname_copilot_chat_short %}.'
intro: 'Create a file in a repository that gives {% data variables.product.prodname_copilot_short %} additional context for the work it does in that repository.'
redirect_from:
- /copilot/customizing-copilot/adding-custom-instructions-for-github-copilot
versions:
@@ -15,16 +15,18 @@ topics:
> This feature is currently in {% data variables.release-phases.public_preview %} and is subject to change.
>
{% data reusables.copilot.repository-custom-instructions-note %}
{% data reusables.copilot.repository-custom-instructions-note %} They are also supported for {% data variables.copilot.copilot_coding_agent %}.
>
> This version of this article is for using repository custom instructions on the {% data variables.product.github %} website. Click the tabs above for information on using custom instructions in other environments. <!-- markdownlint-disable-line MD027 -->
For an overview of the methods you can use to customize {% data variables.product.prodname_copilot_chat %} responses, see [AUTOTITLE](/copilot/customizing-copilot/about-customizing-github-copilot-chat-responses?tool=webui).
For an overview of the methods you can use to customize {% data variables.product.prodname_copilot_chat %} responses, see [AUTOTITLE](/copilot/customizing-copilot/about-customizing-github-copilot-chat-responses?tool=webui). For information on customizing {% data variables.copilot.copilot_coding_agent %} see [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent).
## About repository custom instructions for {% data variables.product.prodname_copilot_chat %}
## About repository custom instructions for {% data variables.product.prodname_copilot_short %}
{% data variables.product.prodname_copilot %} can provide chat responses that are tailored to the way your team works, the tools you use, or the specifics of your project, if you provide it with enough context to do so. Instead of repeatedly adding this contextual detail to your chat questions, you can create a file in your repository that automatically adds this information for you. The additional information is not displayed in the chat, but is available to {% data variables.product.prodname_copilot_short %} to allow it to generate higher quality responses.
The custom instructions file is also used by {% data variables.product.prodname_copilot_short %} when you assign it to an issue or ask it to create a pull request. Instructions included in this file can help {% data variables.product.prodname_copilot_short %} to work on files in a way that matches your team's working practices and conforms to coding standards for your project. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
### Example
{% data reusables.copilot.repository-custom-instructions-example %}

View File

@@ -0,0 +1,59 @@
---
title: Customizing or disabling the firewall for Copilot coding agent
shortTitle: Customize the agent firewall
intro: "Learn how to control the domains and URLs that {% data variables.copilot.copilot_coding_agent %} can access."
versions:
feature: copilot
topics:
- Copilot
type: how_to
---
> [!NOTE]
> {% data reusables.copilot.coding-agent.preview-note-text %}
>
> For more information about {% data variables.copilot.copilot_coding_agent %}, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
## Overview
By default, {% data variables.product.prodname_copilot_short %}'s access to the internet is limited by a firewall.
Limiting access to the internet helps to manage data exfiltration risks, where surprising behavior from {% data variables.product.prodname_copilot_short %}, or malicious instructions given to it, could lead to code or other sensitive information being leaked to remote locations.
The default firewall rules allow access to a number of hosts that {% data variables.product.prodname_copilot_short %} uses to interact with {% data variables.product.github %} or to download dependencies.
If {% data variables.product.prodname_copilot_short %} tries to make a request which is blocked by the firewall, a warning is added to the pull request body (if {% data variables.product.prodname_copilot_short %} is creating a pull request for the first time) or to a comment (if {% data variables.product.prodname_copilot_short %} is responding to a pull request comment). The warning shows the blocked address and the command that tried to make the request.
![Screenshot of a warning from {% data variables.product.prodname_copilot_short %} about being blocked by the firewall.](/assets/images/help/copilot/coding-agent/firewall-warning.png)
## Allowlisting additional hosts in the agent's firewall
You can allowlist additional addresses in the agent's firewall by setting the `COPILOT_AGENT_FIREWALL_ALLOW_LIST_ADDITIONS` {% data variables.product.prodname_actions %} variable to a comma-separated list. In that list, you can include:
* **Domains** (for example, `packages.contoso.corp`), in which case traffic will be allowed to that domain and any subdomains.
**Example**: `packages.contoso.corp` would allow traffic to `packages.contoso.corp` and `prod.packages.contoso.corp`, but not `artifacts.contoso.corp`.
* **URLs** (for example, `https://packages.contoso.corp/project-1/`), in which case traffic will only be allowed on the specified scheme (`https`) and host (`packages.contoso.corp`), and limited to the specified path and descendant paths.
**Example**: `https://packages.contoso.corp/project-1/` would allow traffic to `https://packages.contoso.corp/project-1/` and `https://packages.contoso.corp/project-1/tags/latest`, but not `https://packages.consoto.corp/project-2`, `ftp://packages.contoso.corp` or `https://artifacts.contoso.corp`.
## Overwriting the firewall allowlist
By default, the firewall allows access to a number of hosts that are commonly used to download dependencies or that {% data variables.product.prodname_copilot_short %} uses to interact with {% data variables.product.github %}.
To completely clear this default allowlist and start again from scratch, set the `COPILOT_AGENT_FIREWALL_ALLOW_LIST` {% data variables.product.prodname_actions %} variable to a comma-separated list of hosts.
For example, to _only_ allow access to `packages.contoso.corp` and `artifacts.contoso.corp`, set the `COPILOT_AGENT_FIREWALL_ALLOW_LIST` variable to `packages.contoso.corp,artifacts.contoso.corp`.
### Disabling the firewall
> [!WARNING]
> Disabling the firewall will allow {% data variables.product.prodname_copilot_short %} to connect to any host, increasing risks of exfiltration of code or other sensitive information.
The firewall is enabled by default. To disable the firewall, set the `COPILOT_AGENT_FIREWALL_ENABLED` {% data variables.product.prodname_actions %} variable to `false`.
## Further reading
* [AUTOTITLE](/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#creating-configuration-variables-for-a-repository)
* [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent)

View File

@@ -0,0 +1,111 @@
---
title: Customizing the development environment for Copilot coding agent
shortTitle: Customize the agent environment
intro: "Learn how to customize {% data variables.product.prodname_copilot %}'s development environment with additional tools."
versions:
feature: copilot
topics:
- Copilot
type: how_to
---
> [!NOTE]
> {% data reusables.copilot.coding-agent.preview-note-text %}
>
> For more information about {% data variables.copilot.copilot_coding_agent %}, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
## About customizing {% data variables.copilot.copilot_coding_agent %}'s development environment
While working on a task, {% data variables.product.prodname_copilot_short %} has access to its own ephemeral development environment, powered by {% data variables.product.prodname_actions %}, where it can explore your code, make changes, execute automated tests and linters and more.
You can customize {% data variables.product.prodname_copilot_short %}'s environment by:
* [Preinstalling tools or dependencies in {% data variables.product.prodname_copilot_short %}'s environment](#preinstalling-tools-or-dependencies-in-copilots-environment).
* [Upgrading from standard {% data variables.product.prodname_dotcom %}-hosted {% data variables.product.prodname_actions %} runners to larger runners](#upgrading-to-larger-github-hosted-github-actions-runners).
* [Disabling or customizing the agent's firewall](/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent).
## Preinstalling tools or dependencies in {% data variables.product.prodname_copilot_short %}'s environment
In its ephemeral development environment, {% data variables.product.prodname_copilot_short %} can build or compile your project and run automated tests, linters and other tools. To do this, it will need to install your project's dependencies.
{% data variables.product.prodname_copilot_short %} can discover and install these dependencies itself via a process of trial and error, but this can be slow and unreliable, given the non-deterministic nature of large language models (LLMs), and in some cases, it may be completely unable to download these dependencies—for example, if they are private.
Instead, you can preconfigure {% data variables.product.prodname_copilot_short %}'s environment before the agent starts by creating a special {% data variables.product.prodname_actions %} workflow file, located at `.github/workflows/copilot-setup-steps.yml` within your repository.
A `copilot-setup-steps.yml` file looks like a normal {% data variables.product.prodname_actions %} workflow file, but must contain a single `copilot-setup-steps` job. This job will be executed in {% data variables.product.prodname_actions %} before {% data variables.product.prodname_copilot_short %} starts working. For more information on {% data variables.product.prodname_actions %} workflow files, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions).
Here is a simple example of a `copilot-setup-steps.yml` file for a TypeScript project that clones the project, installs Node.js and downloads and caches the project's dependencies. You should customize this to fit your own project's language(s) and dependencies:
```yaml copy
name: "Copilot Setup Steps"
# Allow testing of the setup steps from your repository's "Actions" tab.
on: workflow_dispatch
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
contents: read
# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- name: Checkout code
uses: {% data reusables.actions.action-checkout %}
- name: Set up Node.js
uses: {% data reusables.actions.action-setup-node %}
with:
node-version: "20"
cache: "npm"
- name: Install JavaScript dependencies
run: npm ci
```
In your `copilot-setup-steps.yml` file, you can only customize the following settings of the `copilot-setup-steps` job. If you try to customize other settings, your changes will be ignored.
* `steps` (see above)
* `permissions` (see above)
* `runs-on` (see below)
* `container `
* `services`
* `snapshot`
* `timeout-minutes` (maximum value: `59`)
For more information on these options, see [AUTOTITLE](/actions/writing-workflows/workflow-syntax-for-github-actions#jobs).
Once you have created a `copilot-setup-steps.yml` file and merged it into your default branch, you can manually run the workflow from the repository's **Actions** tab to check that it works. For more information, see [AUTOTITLE](/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow).
## Upgrading to larger {% data variables.product.prodname_dotcom %}-hosted {% data variables.product.prodname_actions %} runners
By default, {% data variables.product.prodname_copilot_short %} works in a standard {% data variables.product.prodname_actions %} runner with limited resources.
You can choose instead to use larger runners with more advanced features—for example more RAM, CPU and disk space and advanced networking controls. You may want to upgrade to a larger runner if you see poor performance—for example when downloading dependencies or running tests. For more information, see [AUTOTITLE](/actions/using-github-hosted-runners/using-larger-runners/about-larger-runners).
Before {% data variables.product.prodname_copilot_short %} can use larger runners, you must first add one or more larger runners and then configure your repository to use them. See [AUTOTITLE](/actions/using-github-hosted-runners/managing-larger-runners). Once you have done this, you can use the `copilot-setup-steps.yml` file to tell {% data variables.product.prodname_copilot_short %} to use the larger runners.
To use larger runners, set the `runs-on` step of the `copilot-setup-steps` job to the label and/or group for the larger runners you want {% data variables.product.prodname_copilot_short %} to use. For more information on specifying larger runners with `runs-on`, see [AUTOTITLE](/actions/using-github-hosted-runners/running-jobs-on-larger-runners).
```yaml
# ...
jobs:
copilot-setup-steps:
runs-on: ubuntu-4-core
# ...
```
> [!NOTE]
> * {% data variables.copilot.copilot_coding_agent %} is only compatible with Ubuntu x86 Linux runners. Runners with Windows, macOS or other operating systems are not supported.
> * Self-hosted {% data variables.product.prodname_actions %} runners are not supported.
## Further reading
* [AUTOTITLE](/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent)

View File

@@ -7,13 +7,16 @@ versions:
feature: copilot
topics:
- Copilot
type: how_to
---
>[!NOTE]
> * MCP support is currently in {% data variables.release-phases.public_preview %} and subject to change.
> * MCP support is only available in {% data variables.product.prodname_copilot_chat_short %} for {% data variables.product.prodname_vscode %}.
> * MCP support is available in {% data variables.product.prodname_copilot_chat_short %} for {% data variables.product.prodname_vscode %}, JetBrains, Eclipse, and Xcode.
> * The [AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-pre-release-license-terms) apply to your use of this product.
{% vscode %}
## Overview
The Model Context Protocol (MCP) is an open standard that defines how applications share context with large language models (LLMs). MCP provides a standardized way to connect AI models to different data sources and tools, enabling them to work together more effectively.
@@ -47,7 +50,7 @@ You can use the same steps to configure MCP servers in your personal {% data var
```json copy
{
"inputs": [
// The "inputs" section defines the inputs required for the MCP server configuration.
// The "inputs" section defines the inputs required for the MCP server configuration.
{
"type": "promptString"
}
@@ -108,8 +111,92 @@ If you already have an MCP configuration in Claude Desktop, you can use that con
{% data variables.product.prodname_vscode %} will automatically find your existing configuration and use it in your {% data variables.product.prodname_vscode %} instance.
{% endvscode %}
{% jetbrains %}
## Overview
{% data reusables.copilot.mcp-overview-other-ides %}
For information on other currently available MCP servers, see [the MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main).
## Prerequisites
* **Access to {% data variables.product.prodname_copilot_short %}**. {% data reusables.copilot.subscription-prerequisite %}
* **A compatible JetBrains IDE**. {% data variables.product.prodname_copilot %} is compatible with the following IDEs:
{% data reusables.copilot.jetbrains-compatible-ides %}
{% data reusables.copilot.jetbrains-plugin-prerequisites %}
## Configuring MCP servers in JetBrains IDEs
1. In the lower right corner, click **{% octicon "copilot" aria-hidden="true" %}**.
1. From the menu, select "Edit settings".
1. Under the MCP section, click "Edit in `mcp.json`".
1. Define your MCP servers. You can use the following configuration as an example:
{% data reusables.copilot.mcp-chat-json-snippet-for-other-ides %}
Alternatively, to access the MCP settings, once you're in "Agent Mode", click the tools icon, then click **Add more tools**.
{% endjetbrains %}
{% xcode %}
## Overview
{% data reusables.copilot.mcp-overview-other-ides %}
For information on other currently available MCP servers, see [the MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main).
## Prerequisites
* **Access to {% data variables.product.prodname_copilot_short %}**. {% data reusables.copilot.subscription-prerequisite %}
* **{% data variables.product.prodname_copilot %} for Xcode extension**. See [AUTOTITLE](/copilot/configuring-github-copilot/installing-the-github-copilot-extension-in-your-environment).
## Configuring MCP servers in Xcode
1. Open the {% data variables.product.prodname_copilot %} for Xcode extension.
1. In agent mode, click the tools icon.
1. Select "Edit config".
1. Define your MCP servers, editing `mcp.json`. You can use the following configuration as an example:
{% data reusables.copilot.mcp-chat-json-snippet-for-other-ides %}
{% endxcode %}
{% eclipse %}
## Overview
{% data reusables.copilot.mcp-overview-other-ides %}
For information on other currently available MCP servers, see [the MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main).
## Prerequisites
{% data reusables.copilot.eclipse-prerequisites %}
* **Latest version of the {% data variables.product.prodname_copilot %} extension**. Download this from the [Eclipse Marketplace](https://aka.ms/copiloteclipse). For more information, see [AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/installing-the-github-copilot-extension-in-your-environment?tool=eclipse).
* **Sign in to {% data variables.product.company_short %} from Eclipse**.
## Configuring MCP servers in Eclipse
1. To open the {% data variables.product.prodname_copilot_chat_short %} panel, click the {% data variables.product.prodname_copilot_short %} icon ({% octicon "copilot" aria-hidden="true" %}) in the status bar at the bottom of Eclipse.
1. From the menu, select "Edit preferences".
1. In the left pane, expand {% data variables.product.prodname_copilot_chat_short %} and click **MCP**.
1. Define your MCP servers. You can use the following configuration as an example:
{% data reusables.copilot.mcp-chat-json-snippet-for-other-ides %}
{% endeclipse %}
## Creating a new MCP server
You can create a new MCP server to fulfill your specific needs, and then integrate it with {% data variables.product.prodname_copilot_chat_short %}. For example, you can create an MCP server that connects to a database or a web service, and then use that server in {% data variables.product.prodname_copilot_chat_short %} to perform tasks on that database or web service.
For more information on creating and configuring your own MCP servers, see [the official MCP documentation](https://modelcontextprotocol.io/quickstart/server).
## Further reading
* [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp)

View File

@@ -0,0 +1,214 @@
---
title: Extending Copilot coding agent with the Model Context Protocol (MCP)
shortTitle: Extend coding agent with MCP
allowTitleToDifferFromFilename: true
intro: "Learn how to use the Model Context Protocol (MCP) to extend the capabilities of {% data variables.copilot.copilot_coding_agent %}."
versions:
feature: copilot
topics:
- Copilot
type: how_to
---
> [!NOTE]
> {% data reusables.copilot.coding-agent.preview-note-text %}
>
> For more information about {% data variables.copilot.copilot_coding_agent %}, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
{% data reusables.copilot.coding-agent.mcp-brief-intro %}
The agent can use tools provided by local MCP servers. For example, the [Playwright MCP server](https://github.com/microsoft/playwright-mcp) provides tools to interact with web pages and pull in additional context when executing on the requested task.
For more information on MCP, see [the official MCP documentation](https://modelcontextprotocol.io/introduction). For information on some of the currently available MCP servers, see [the MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main).
> [!NOTE]
> * {% data variables.copilot.copilot_coding_agent %} only supports tools provided by MCP servers. It does not support resources or prompts.
> * {% data variables.copilot.copilot_coding_agent %} currently only supports local MCP servers. To learn more about transport types, see the [official MCP documentation](https://modelcontextprotocol.io/docs/concepts/transports).
## Staying safe with MCP servers
Once you've configured an MCP server, {% data variables.product.prodname_copilot_short %} will be able to use the tools provided by the server autonomously, and will not ask for your approval before using them.
We recommend that you restrict your servers to read-only tools. You can use the `tools` configuration option to only expose known, safe tools to {% data variables.product.prodname_copilot_short %}.
## Setting up MCP servers in a repository
As a repository administrator, you can configure MCP servers for use within your repository. This is done via JSON configuration that specifies the details of the MCP servers you want to use.
Once MCP servers are configured for use within a repository, the tools specified in the configuration will be available to {% data variables.copilot.copilot_coding_agent %} on each assigned task.
### Creating your JSON MCP configuration
You configure MCP servers using a special JSON format. The JSON must contain an `mcpServers` object, where the key is the name of the MCP server (for example, `playwright`), and the value is an object with the configuration for that MCP server.
The configuration object can contain the following keys:
* `command` (`string`): The command to run to start the MCP server.
* `args` (`string[]`): The arguments to pass to the `command`.
* `tools` (`string[]`): The tools from the MCP server to enable. You may be able to find a list of tools in the server's documentation, or in its code. We recommend that you allowlist specific tools, but you can also enable all tools by including `*` in the array.
* `env` (`object`): The environment variables to pass to the server. This object should map the name of the environment variable that should be exposed to your MCP server to either of the following:
* The name of a {% data variables.product.prodname_actions %} secret you have configured, beginning with `COPILOT_MCP_`.
* A string value.
#### Example: Playwright
The [Playwright MCP server](https://github.com/microsoft/playwright-mcp) provides tools which allow {% data variables.product.prodname_copilot_short %} to browse the internet.
```json copy
{
"mcpServers": {
"playwright": {
"command": "docker",
"args": ["run", "-i", "--rm", "--init", "mcp/playwright"],
"tools": ["*"]
}
}
}
```
#### Example: Sentry
The [Sentry MCP server](https://github.com/getsentry/sentry-mcp) gives {% data variables.product.prodname_copilot_short %} authenticated access to exceptions recorded in [Sentry](https://sentry.io).
```javascript copy
// If you copy and paste this example, you will need to remove the comments prefixed with `//`, which are not valid JSON.
{
"mcpServers": {
"sentry": {
"command": "npx",
// We can use the $SENTRY_HOST environment variable which is passed to
// the server because of the `env` value below.
"args": ["@sentry/mcp-server@latest", "--host=$SENTRY_HOST"],
"tools": ["get_issue_details", "get_issue_summary"],
"env": {
// We can specify an environment variable value as a string...
"SENTRY_HOST": "https://contoso.sentry.io",
// or refer to a {% data variables.product.prodname_actions %} secret with a name starting with
// `COPILOT_MCP_`
"SENTRY_AUTH_TOKEN": "COPILOT_MCP_SENTRY_AUTH_TOKEN"
}
}
}
}
```
#### Example: Notion
The [Notion MCP server](https://github.com/makenotion/notion-mcp-server) gives {% data variables.product.prodname_copilot_short %} authenticated access to notes and other content from [Notion](https://notion.so).
```javascript copy
// If you copy and paste this example, you will need to remove the comments prefixed with `//`, which are not valid JSON.
{
"mcpServers": {
"notionApi": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
// We can use the $NOTION_API_KEY environment variable which is passed to
// the server because of the `env` value below.
"OPENAPI_MCP_HEADERS={\"Authorization\": \"Bearer $NOTION_API_KEY\", \"Notion-Version\": \"2022-06-28\"}",
"mcp/notion"
],
"env": {
// The value of the `COPILOT_MCP_NOTION_API_KEY` secret will be passed to the
// server command as an environment variable called `NOTION_API_KEY`
"NOTION_API_KEY": "COPILOT_MCP_NOTION_API_KEY"
},
"tools": ["*"]
}
}
}
```
#### Reusing your MCP configuration from {% data variables.product.prodname_vscode %}
If you have already configured MCP servers in {% data variables.product.prodname_vscode_shortname %}, you can leverage similar configuration for {% data variables.copilot.copilot_coding_agent %}.
Depending on how {% data variables.product.prodname_vscode_shortname %} is configured, you may be able to find your MCP settings in your repository's `.vscode/mcp.json` file, or in your machine's private `settings.json` file.
To adapt the configuration for {% data variables.copilot.copilot_coding_agent %}, you will need to:
1. Add a `tools` key for each MCP server, specifying the tools that should be available to {% data variables.product.prodname_copilot_short %}.
1. If you've configured `inputs`, switch to using `env` directly.
1. If you've configured an `envFile`, switch to using `env` directly.
1. Update any references to `inputs` in your `args` configuration to refer to environment variables from `env` instead.
For more information on MCP in {% data variables.product.prodname_vscode_shortname %}, see the [{% data variables.product.prodname_vscode_shortname %} docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
### Adding your configuration to your repository
Repository administrators can configure MCP servers by following these steps:
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. In the "Code & automation" section of the sidebar, click **{% data variables.product.prodname_copilot_short %}** then **{% data variables.copilot.coding_agent_UI %}**.
1. Add your configuration in the **MCP configuration** section.
1. Click **Save**.
Your configuration will be validated to ensure proper syntax.
1. If your MCP server requires a key or secret, add a secret to your Copilot environment. Only secrets with names prefixed with `COPILOT_MCP_` will be available to your MCP configuration. See [Setting up a Copilot environment for Copilot coding agent](#setting-up-a-copilot-environment-for-copilot-coding-agent).
### Setting up a {% data variables.product.prodname_copilot_short %} environment for {% data variables.copilot.copilot_coding_agent %}
Some MCP servers will require keys or secrets. To leverage those servers in {% data variables.copilot.copilot_coding_agent %}, you can add secrets to an environment for {% data variables.product.prodname_copilot_short %}. This ensures the secrets are properly recognized and passed to the applicable MCP server that you have configured.
You must be a repository administrator to configure a {% data variables.product.prodname_copilot_short %} environment for your repository.
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.actions.sidebar-environment %}
{% data reusables.actions.new-environment %}
1. Call the new environment `copilot` and click **Configure environment**.
1. Under "Environment secrets", click **Add environment secret**.
1. Give the secret a name beginning `COPILOT_MCP_`, add the secret value, then click **Add secret**.
### Validating your MCP configuration
Once you've set up your MCP configuration, you should test it to make sure it is set up correctly.
1. Create an issue in the repository, then assign it to {% data variables.product.prodname_copilot_short %}.
1. Wait a few seconds, and {% data variables.product.prodname_copilot_short %} will leave an 👀 reaction on the issue.
1. Wait a few more seconds, and {% data variables.product.prodname_copilot_short %} will create a pull request, which will appear in the issue's timeline.
1. Click the created pull request in the timeline, and wait until a "Copilot started work" timeline event appears.
1. Click **View session** to open the {% data variables.copilot.copilot_coding_agent %} logs.
1. Click the ellipsis button (**...**) at the top right of the log viewer, then click **{% data variables.product.prodname_copilot_short %}** in the sidebar.
1. Click the **Start MCP Servers** step to expand the logs.
1. If your MCP servers have been started successfully, you will see their tools listed at the bottom of the logs.
If your MCP servers require any dependencies that are not installed on the {% data variables.product.prodname_actions %} runner by default, such as `uv` and `pipx`, or that need special setup steps, you may need to create a `copilot-setup-steps.yml` to install them. For more information, see [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent).
## Customizing the built-in {% data variables.product.github %} MCP server
The {% data variables.product.github %} MCP server is enabled by default, giving {% data variables.product.prodname_copilot_short %} access to {% data variables.product.github %} data like issues and pull requests.
By default, the MCP server connects to {% data variables.product.github %} with a specially scoped token that only has read-only access to the current repository.
If you want to allow {% data variables.product.prodname_copilot_short %} to access data outside the current repository, you can give it a {% data variables.product.pat_generic %} with wider access.
1. Create a {% data variables.product.pat_generic %} with the appropriate permissions. We recommend using a {% data variables.product.pat_v2 %}, where you can limit the token's access to read-only permissions on specific repositories. For more information on {% data variables.product.pat_generic_plural %}, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. In the "Code & automation" section of the sidebar, click **{% data variables.product.prodname_copilot_short %}** then **{% data variables.copilot.coding_agent_UI %}**.
1. Add your configuration in the **MCP configuration** section.
1. Click **Save**.
{% data reusables.actions.sidebar-environment %}
1. Click the `copilot` environment.
1. Under "Environment secrets", click **Add environment secret**.
1. Call the secret `COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN`, enter your {% data variables.product.pat_generic %} in the "Value" field, then click **Add secret**.
## Best practices for using MCP servers in {% data variables.copilot.copilot_coding_agent %}
* Enabling third-party MCP servers for use may impact the performance of the agent and the quality of the outputs. Review the third-party MCP server thoroughly and ensure that it meets your organizations requirements.
* By default, {% data variables.copilot.copilot_coding_agent %} does not have access to write MCP server tools. However, some MCP servers do contain such tools. Be sure to review the tools available in the MCP server you want to use. Update the `tools` field in the MCP configuration with only the necessary tooling.
* Carefully review the configured MCP servers prior to saving the configuration to ensure the correct servers are configured for use.
## Further reading
* [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent)
* [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-chat-with-mcp)

View File

@@ -43,3 +43,8 @@ Before you install any {% data variables.product.prodname_copilot_extensions_sho
After installing a {% data variables.product.prodname_copilot_extension_short %} for your organization, developers in your organization can start using the extension. See [AUTOTITLE](/copilot/github-copilot-chat/github-copilot-extensions/using-github-copilot-extensions).
You can also manage the permissions of installed {% data variables.product.prodname_copilot_extensions_short %}. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#managing-permissions-for-a-github-copilot-extension-in-your-organization).
## Further reading
* [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-chat-with-mcp)
* [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp)

View File

@@ -12,7 +12,10 @@ children:
- /adding-personal-custom-instructions-for-github-copilot
- /adding-repository-custom-instructions-for-github-copilot
- /adding-organization-custom-instructions-for-github-copilot
- /customizing-the-development-environment-for-copilot-coding-agent
- /customizing-or-disabling-the-firewall-for-copilot-coding-agent
- /extending-copilot-chat-with-mcp
- /extending-copilot-coding-agent-with-mcp
- /managing-copilot-knowledge-bases
- /creating-a-custom-model-for-github-copilot
redirect_from:

View File

@@ -73,7 +73,7 @@ You can use your repository settings to specify content in your repository that
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. In the "Code & automation" section of the side bar, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**.
1. In the "Code & automation" section of the sidebar, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**.
If your repository inherits any exclusions from {% ifversion fpt %}its parent organization{% else %} organizations in the same enterprise{% endif %}, you'll see {% ifversion ghec %}one or more{% else %} a{% endif %} gray box{% ifversion ghec %}es{% endif %} at the top of the page containing details of these exclusions. You cannot edit these settings.

View File

@@ -22,7 +22,7 @@ Organization and repository settings include the ability to exclude content from
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. In the "Code & automation" section of the side bar, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**.
1. In the "Code & automation" section of the sidebar, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**.
{% data reusables.copilot.view-last-change-content-exclusions %}
1. Click the time of the last change.

View File

@@ -30,6 +30,23 @@ If you choose to allow suggestions matching public code, when {% data variables.
{% data reusables.user-settings.copilot-settings %}
1. To the right of **Suggestions matching public code**, select the dropdown menu, then click **Allow** to allow suggestions matching public code, or **Block** to block suggestions matching public code.
## Enabling or disabling {% data variables.copilot.copilot_coding_agent %}
{% data variables.copilot.copilot_coding_agent %} allows you to assign {% data variables.product.prodname_copilot_short %} to {% data variables.product.github %} issues, or ask {% data variables.product.prodname_copilot_short %} to raise a pull request from a prompt in {% data variables.product.prodname_copilot_chat_short %}.
> [!NOTE]
> * {% data reusables.gated-features.copilot-coding-agent %}
> * {% data reusables.copilot.coding-agent.preview-note-text %}
To use {% data variables.copilot.copilot_coding_agent %} in repositories owned by your own personal account, you must enable it for those repositories in your account settings.
{% data reusables.user-settings.copilot-settings %}
1. In the sidebar, under **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**, click **Coding agent**.
1. On the {% data variables.copilot.copilot_coding_agent %} page, under "Policies," click the dropdown button for "Repository access," then choose either **No repositories**, **All repositories**, or **Only selected repositories**.
1. If you choose **Only selected repositories**, click **Select repositories** and choose the repositories where you want to enable {% data variables.copilot.copilot_coding_agent %}.
{% data reusables.copilot.coding-agent.enabling-for-orgs-and-enterprises %}
{% ifversion fpt %}
## Enabling or disabling prompt and suggestion collection

View File

@@ -10,4 +10,5 @@ children:
- /managing-the-copilot-plan-for-your-enterprise
- /managing-access-to-copilot-in-your-enterprise
- /managing-policies-and-features-for-copilot-in-your-enterprise
- /making-copilot-coding-agent-available-to-enterprise
---

View File

@@ -0,0 +1,44 @@
---
title: 'Making {% data variables.copilot.copilot_coding_agent %} available to enterprise members'
intro: 'Enable members of your enterprise to use {% data variables.copilot.copilot_coding_agent %}.'
allowTitleToDifferFromFilename: true
permissions: Enterprise owners
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/github-copilot/purchase?ref_cta=Copilot+Enterprise+trial&ref_cta=Copilot+Business+trial&ref_loc=making-cca-available-ent" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot-enterprise
topics:
- Copilot
shortTitle: 'Add {% data variables.copilot.copilot_coding_agent %}'
redirect_from:
- /copilot/managing-copilot/managing-copilot-for-your-enterprise/adding-copilot-coding-agent-to-enterprise
---
<!--JTBD: When I decide to enable CCA for -->
{% data reusables.copilot.coding-agent.preview-note %}
## Prerequisites
* For general information, see [AUTOTITLE](/copilot/rolling-out-github-copilot-at-scale/enabling-developers/using-copilot-coding-agent-in-org).
* For information on premium requests and Actions minutes, see [Allowance usage for {% data variables.copilot.copilot_coding_agent %}](/billing/managing-billing-for-your-products/managing-billing-for-github-copilot/about-billing-for-github-copilot#allowance-usage-for-copilot-coding-agent).
* For information on MCP servers, see [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp).
## Enabling {% data variables.copilot.copilot_coding_agent %} for your members
{% data variables.copilot.copilot_coding_agent %} and use of third-party MCP servers are disabled by default for users with a {% data variables.product.prodname_copilot_short %} license. You can enable these features for your members on the {% data variables.product.prodname_copilot_short %} policies page for your enterprise. See [Configuring policies for {% data variables.product.prodname_copilot %}](/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#configuring-policies-for-github-copilot).
* For the "{% data variables.copilot.copilot_coding_agent %}" policy, select "Enabled" or "No policy".
* For the "MCP servers on {% data variables.product.prodname_dotcom_the_website %}" policy, select "Enabled" or "No policy".
Where:
* "Enabled" means all users granted a {% data variables.product.prodname_copilot_short %} license by any of your organizations will be able to use the feature.
* "Disabled" means no users granted a {% data variables.product.prodname_copilot_short %} license by your organizations will be able to use the feature.
* "No policy" means organization owners in each of your organizations will be able to decide if their {% data variables.product.prodname_copilot_short %} licensees can use the feature.
## Next steps
* If you selected "Enabled", tell organization owners that {% data variables.copilot.copilot_coding_agent %} is enabled for all members. They should define which repositories are allowed to use {% data variables.copilot.copilot_coding_agent %}.
* If you selected "No policy", discuss member enablement and {% data variables.copilot.copilot_coding_agent %} availability in repositories with organization owners.
For more information, see [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/adding-copilot-coding-agent-to-organization).

View File

@@ -14,10 +14,11 @@ shortTitle: Manage policies
You can set policies that control the availability of {% data variables.product.prodname_copilot_short %} and its features in your enterprise and organizations.
There are **two enforcement options** for {% data variables.product.prodname_copilot_short %} policies in your enterprise:
The enforcement options for {% data variables.product.prodname_copilot_short %} policies in your enterprise are:
* **Enabled** - The feature is available in all organizations with {% data variables.product.prodname_copilot_short %} enabled in your enterprise.
* **Disabled** - The feature is blocked for all organizations with {% data variables.product.prodname_copilot_short %} enabled in your enterprise.
* **No policy** - Control of the feature is delegated to organization owners to set.
If a policy is enabled or disabled at the enterprise level, the same policy cannot be changed at the organization level.
@@ -36,6 +37,8 @@ You can configure policies for your enterprise. If no policy is chosen at the en
| [Give {% data variables.product.prodname_copilot_short %} access to Bing](#give-copilot-access-to-bing) | least restrictive |
| [{% data variables.product.prodname_copilot_short %} access to alternative AI models](#copilot-access-to-alternative-ai-models) | least restrictive |
| [{% data variables.product.prodname_copilot_short %} Metrics API access](#copilot-metrics-api-access) | most restrictive |
| [{% data variables.copilot.copilot_coding_agent %}](#copilot-coding-agent) | least restrictive |
| [MCP servers on {% data variables.product.prodname_dotcom_the_website %}](#mcp-servers-on-githubcom) | least restrictive |
### {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}
@@ -90,10 +93,31 @@ By default, {% data variables.product.prodname_copilot_chat_short %} uses a base
* **{% data variables.copilot.copilot_gemini %}**. See [AUTOTITLE](/copilot/using-github-copilot/ai-models/using-gemini-in-github-copilot).
* **OpenAI models:** See [AUTOTITLE](/copilot/using-github-copilot/ai-models/using-openai-gpt-41-in-github-copilot).
> [!NOTE]
> This setting has no impact on the model used by {% data variables.copilot.copilot_coding_agent %}.
### {% data variables.product.prodname_copilot_short %} Metrics API access
Enable this policy to allow users to use the {% data variables.product.prodname_copilot_short %} Metrics API. See [AUTOTITLE](/rest/copilot/copilot-metrics).
### {% data variables.copilot.copilot_coding_agent %}
{% data reusables.copilot.coding-agent.preview-note %}
{% data variables.copilot.copilot_coding_agent %} is an autonomous, AI-powered software development agent. During the preview, use of the feature is subject to [GitHub Pre-release License Terms](/free-pro-team@latest/site-policy/github-terms/github-pre-release-license-terms). This feature may use models which are not enabled on your "Models" settings page. The cost of a premium request made by {% data variables.copilot.copilot_coding_agent %} is independent of the model it uses.
With a **{% data variables.product.prodname_copilot_enterprise_short %} license**, you can enable "{% data variables.copilot.copilot_coding_agent %}" to allow members of your enterprise to use {% data variables.copilot.copilot_coding_agent %} under the Copilot license you have assigned them. This will allow them to assign work or issues to {% data variables.product.prodname_copilot_short %} in organization repositories where {% data variables.copilot.copilot_coding_agent %} is available and to enable {% data variables.copilot.copilot_coding_agent %} for their personal repositories.
Alternatively, set to "No policy" to leave organization owners to make the decision in their organization settings.
> [!TIP] Enabling your license holders to use {% data variables.copilot.copilot_coding_agent %} is the first step in making {% data variables.copilot.copilot_coding_agent %} available for use in repositories in your organizations. For more information, see [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/adding-copilot-coding-agent-to-organization).
### MCP servers on {% data variables.product.prodname_dotcom_the_website %}
> [!NOTE] Use of MCP servers on {% data variables.product.prodname_dotcom_the_website %} is in public preview and subject to change.
{% data reusables.copilot.coding-agent.mcp-brief-intro %} See [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp).
## Configuring policies for {% data variables.product.prodname_copilot %}
{% data reusables.enterprise-accounts.access-enterprise %}

View File

@@ -0,0 +1,49 @@
---
title: 'Adding {% data variables.copilot.copilot_coding_agent %} to your organization'
intro: 'Enable {% data variables.copilot.copilot_coding_agent %} for your members and define repositories where it is available.'
allowTitleToDifferFromFilename: true
permissions: Organization owners
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/github-copilot/purchase?ref_cta=Copilot+Enterprise+trial&ref_cta=Copilot+Business+trial&ref_loc=adding-cca-to-org" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot
topics:
- Copilot
shortTitle: 'Add {% data variables.copilot.copilot_coding_agent %}'
---
{% data reusables.copilot.coding-agent.preview-note %}
## Prerequisites
* For general information, see [AUTOTITLE](/copilot/rolling-out-github-copilot-at-scale/enabling-developers/using-copilot-coding-agent-in-org).
* For information on premium requests and Actions minutes, see [Allowance usage for {% data variables.copilot.copilot_coding_agent %}](/billing/managing-billing-for-your-products/managing-billing-for-github-copilot/about-billing-for-github-copilot#allowance-usage-for-copilot-coding-agent).
* For information on MCP servers, see [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp).
## Enabling {% data variables.copilot.copilot_coding_agent %} for your members
{% data reusables.organizations.copilot-policy-ent-overrides-org %}
{% data variables.copilot.copilot_coding_agent %} and use of third-party MCP servers are disabled by default for organization members. Organization owners with {% data variables.product.prodname_copilot_enterprise %} can enable these features for members on the {% data variables.product.prodname_copilot_short %} policies page for their organization. See [Enabling {% data variables.product.prodname_copilot_short %} features in your organization](/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#enabling-copilot-features-in-your-organization).
* For the "{% data variables.copilot.copilot_coding_agent %}" policy, select "Enabled".
* For the "MCP servers on {% data variables.product.prodname_dotcom_the_website %}" policy, select "Enabled".
## Defining which repositories {% data variables.copilot.copilot_coding_agent %} can operate in
Owners of any organization—even organizations without a {% data variables.product.prodname_copilot_short %} plan—can define which repositories {% data variables.copilot.copilot_coding_agent %} can work in.
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
{% data reusables.copilot.coding-agent-settings %}
1. Use the "Repository access" control to define which repositories allow {% data variables.copilot.copilot_coding_agent %}.
1. If you choose "Selected repositories", in the "Select repositories" dialog, select the repositories that allow {% data variables.copilot.copilot_coding_agent %}, then click **Select**.
Once Copilot coding agent is enabled for a repository, any user with access to Copilot coding agent and write permission for the repository can delegate work to Copilot.
## Next steps
* Tell the members of repositories where {% data variables.copilot.copilot_coding_agent %} is available that they can delegate work to the coding agent.
* Encourage members to educate themselves about setting up their repository to get the most from {% data variables.copilot.copilot_coding_agent %}. Useful resources:
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/best-practices-for-using-copilot-to-work-on-tasks)
* [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent)
* [Security best practices](/copilot/rolling-out-github-copilot-at-scale/enabling-developers/using-copilot-coding-agent-in-org#security-best-practices)

View File

@@ -14,5 +14,6 @@ children:
- /managing-policies-for-copilot-in-your-organization
- /configuring-your-proxy-server-or-firewall-for-copilot
- /managing-access-to-github-copilot-in-your-organization
- /adding-copilot-coding-agent-to-organization
- /reviewing-activity-related-to-github-copilot-in-your-organization
---

View File

@@ -29,10 +29,10 @@ Organization owners can set policies to govern how {% data variables.product.pro
* {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}
* {% data variables.product.prodname_copilot_chat_short %} in the IDE
* Editor preview Copilot features, such as:
* Image support in {% data variables.product.prodname_copilot_chat_short %} (available in {% data variables.product.prodname_vscode_shortname %} and {% data variables.product.prodname_vs %})
>[!NOTE] This setting only applies to preview features within {% data variables.product.prodname_copilot_short %} and does not control all preview-related settings in {% data variables.product.prodname_vscode_shortname %}.
* {% data variables.copilot.copilot_coding_agent %} ({% data variables.release-phases.public_preview %})
* MCP servers on {% data variables.product.prodname_dotcom_the_website %} ({% data variables.release-phases.public_preview %})
* {% data variables.product.prodname_copilot_mobile_short %}
* {% data variables.product.prodname_copilot_cli_short %} and {% data variables.product.prodname_windows_terminal %}
* {% data variables.product.prodname_copilot_desktop_short %} ({% data variables.release-phases.public_preview %})
@@ -54,7 +54,7 @@ If an organization member is assigned a seat by multiple organizations with diff
## Enabling {% data variables.product.prodname_copilot_short %} features in your organization
>[!NOTE] {% data variables.product.prodname_copilot_short %} policies are also managed at the enterprise level. If your organization is part of an enterprise, and explicit settings have been selected at the enterprise level, you cannot override those settings at the organization level. For more information on managing policies at the enterprise level, see [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise).
{% data reusables.organizations.copilot-policy-ent-overrides-org %}
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
@@ -67,6 +67,9 @@ If an organization member is assigned a seat by multiple organizations with diff
{% data reusables.copilot.policies-for-dotcom %}
> [!TIP]
> If you choose to enable {% data variables.copilot.copilot_coding_agent %} for users, you also need to define which repositories the agent is available in, see [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/adding-copilot-coding-agent-to-organization).
## Setting a policy for {% data variables.product.prodname_copilot_extensions %} in your organization
{% data variables.product.prodname_copilot_extensions %} integrate external tools with {% data variables.product.prodname_copilot_chat %}. See [AUTOTITLE](/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat).
@@ -99,4 +102,6 @@ After you have installed a {% data variables.product.prodname_copilot_extension_
* [{% data variables.product.prodname_copilot %} Trust Center](https://copilot.github.trust.page)
* [AUTOTITLE](/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions){% ifversion ghec %}
* [AUTOTITLE](/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-enterprise){% endif %}
* [AUTOTITLE](/copilot/setting-up-github-copilot/setting-up-github-copilot-for-your-enterprise)
* [AUTOTITLE](/copilot/managing-copilot/managing-copilot-for-your-enterprise/making-copilot-coding-agent-available-to-enterprise){% else %}
* [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/adding-copilot-coding-agent-to-organization){% endif %}

View File

@@ -32,32 +32,35 @@ Some {% data variables.product.prodname_copilot_short %} features use more advan
The following {% data variables.product.prodname_copilot_short %} features can use premium requests:
* {% data variables.product.prodname_copilot_chat_short %}
* {% data variables.product.prodname_copilot_agent_short %} mode
* {% data variables.product.prodname_copilot_short %} code review
* {% data variables.product.prodname_copilot_extensions_short %}
* [{% data variables.product.prodname_copilot_chat_short %}](/copilot/using-github-copilot/copilot-chat)
* [{% data variables.copilot.copilot_coding_agent %}](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot) [^1]
* [{% data variables.product.prodname_copilot_agent_short %} mode](/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-your-ide#copilot-edits)
* [{% data variables.product.prodname_copilot_short %} code review](/copilot/using-github-copilot/code-review/using-copilot-code-review)
* [{% data variables.product.prodname_copilot_extensions_short %}](/copilot/building-copilot-extensions/about-building-copilot-extensions)
[^1]: {% data variables.copilot.copilot_coding_agent %} uses a fixed multiplier of 1 for the premium requests it uses, and may use multiple premium requests in response to one user prompt.
### Model multipliers
Each model has a premium request multiplier, based on its complexity and resource usage. Your premium request allowance is deducted according to this multiplier.
| Model | Premium requests |
|-------------------------------------------------------------------------|------------------------------------------------------------------------------|
| Base model (currently {% data variables.copilot.copilot_gpt_41 %}) [^1] | 0 (paid users), 1 ({% data variables.product.prodname_copilot_free_short %}) |
| Premium {% data variables.copilot.copilot_gpt_41 %} | 1 |
| {% data variables.copilot.copilot_gpt_4o %} | 1 |
| {% data variables.copilot.copilot_gpt_45 %} | 50 |
| {% data variables.copilot.copilot_claude_sonnet_35 %} | 1 |
| {% data variables.copilot.copilot_claude_sonnet_37 %} | 1 |
| {% data variables.copilot.copilot_claude_sonnet_37 %} Thinking | 1.25 |
| {% data variables.copilot.copilot_gemini_flash %} | 0.25 |
| {% data variables.copilot.copilot_gemini_25_pro %} | 1 |
| {% data variables.copilot.copilot_o1 %} | 10 |
| {% data variables.copilot.copilot_o3 %} | 5 |
| {% data variables.copilot.copilot_o3_mini %} | 0.33 |
| {% data variables.copilot.copilot_o4_mini %} | 0.33 |
| Model | Premium requests |
| ------- | ---------------- |
| Base model (currently {% data variables.copilot.copilot_gpt_41 %}) [^2] | 0 (paid users), 1 ({% data variables.product.prodname_copilot_free_short %}) |
| Premium {% data variables.copilot.copilot_gpt_41 %} | 1 |
| {% data variables.copilot.copilot_gpt_4o %} | 1 |
| {% data variables.copilot.copilot_gpt_45 %} | 50 |
| {% data variables.copilot.copilot_claude_sonnet_35 %} | 1 |
| {% data variables.copilot.copilot_claude_sonnet_37 %} | 1 |
| {% data variables.copilot.copilot_claude_sonnet_37 %} Thinking | 1.25 |
| {% data variables.copilot.copilot_gemini_flash %} | 0.25 |
| {% data variables.copilot.copilot_gemini_25_pro %} | 1 |
| {% data variables.copilot.copilot_o1 %} | 10 |
| {% data variables.copilot.copilot_o3 %} | 5 |
| {% data variables.copilot.copilot_o3_mini %} | 0.33 |
| {% data variables.copilot.copilot_o4_mini %} | 0.33 |
[^1]: The base model at the time of writing is powered by {% data variables.copilot.copilot_gpt_41 %}. This is subject to change. Response times for the base model may vary during periods of high usage. Requests to the base model may be subject to rate limiting.
[^2]: The base model at the time of writing is powered by {% data variables.copilot.copilot_gpt_41 %}. This is subject to change. Response times for the base model may vary during periods of high usage. Requests to the base model may be subject to rate limiting.
## Additional premium requests

View File

@@ -16,4 +16,5 @@ children:
- /responsible-use-of-github-copilot-pull-request-summaries
- /responsible-use-of-github-copilot-text-completion
- /responsible-use-of-github-copilot-code-review
- /responsible-use-of-copilot-coding-agent-on-githubcom
---

View File

@@ -0,0 +1,151 @@
---
title: Responsible use of Copilot coding agent on GitHub.com
shortTitle: Copilot coding agent
intro: 'Learn how to use {% data variables.copilot.copilot_coding_agent %} on {% data variables.product.prodname_dotcom_the_website %} responsibly by understanding its purposes, capabilities, and limitations.'
versions:
feature: copilot
topics:
- Copilot
type: rai
---
## About {% data variables.copilot.copilot_coding_agent %} on {% data variables.product.prodname_dotcom_the_website %}
{% data variables.copilot.copilot_coding_agent %} is an autonomous and asynchronous software development agent integrated into {% data variables.product.github %}. The agent can pick up a task from an issue or from {% data variables.product.prodname_copilot_chat_short %}, create a pull request, and then iterate on the pull request in response to comments.
{% data variables.copilot.copilot_coding_agent %} can generate tailored changes based on your description and configurations, including tasks like bug fixes, implementing incremental new features, prototyping, documentation, and codebase maintenance. After the initial pull request is created, the agent can iterate with you, based on your feedback and reviews.
While working on your task, the agent has access to its own ephemeral development environment where it can make changes to your code, execute automated tests, and run linters.
The agent has been evaluated across a variety of programming languages, with English as the primary supported language.
The agent works by using a combination of natural language processing and machine learning to understand your task and make changes in a codebase to complete your task. This process can be broken down into a number of steps.
### Prompt processing
The task provided to {% data variables.product.prodname_copilot_short %} through an issue, pull request comment or {% data variables.product.prodname_copilot_chat_short %} message is combined with other relevant, contextual information to form a prompt. That prompt is sent to a large language model for processing. Inputs can take the form of plain natural language, code snippets, or images.
### Language model analysis
The prompt is then passed through a large language model, which is a neural network that has been trained on a large body of data. The language model analyzes the input prompt to help the agent reason on the task and leverage necessary tools.
### Response generation
The language model generates a response based on its analysis of the prompt. This response can take the form of natural language suggestions and code suggestions.
### Output formatting
Once the agent completes its first run, it will update the pull request description with the changes it made. The agent may include supplemental information about resources it could not access and provide suggestions on the steps to resolve.
You may provide feedback to the agent by commenting within the pull request or explicitly mentioning the agent (`@copilot`). The agent will then resubmit that feedback to the language model for further analysis. Once the agent completes changes based on feedback, the agent will respond to your comment with updated changes.
Copilot is intended to provide you with the most relevant solution for task resolution. However, it may not always provide the answer you are looking for. You are responsible for reviewing and validating responses generated by {% data variables.product.prodname_copilot_short %} to ensure they are accurate and appropriate.
Additionally, as part of our product development process, {% data variables.product.github %} undertakes red teaming (testing) to understand and improve the safety of the agent.
For information on how to improve performance, see [Improving performance for {% data variables.copilot.copilot_coding_agent %}](#improving-performance-for-copilot-coding-agent) below.
## Use cases for {% data variables.copilot.copilot_coding_agent %}
You can delegate a task to {% data variables.product.prodname_copilot_short %} in a variety of scenarios, including, but not limited to:
* **Codebase maintenance:** Tackling Security related fixes, dependency upgrades, and targeted refactoring.
* **Documentation:** Updating and creating new documentation.
* **Feature development:** Implementing incremental feature requests.
* **Improving test coverage:** Developing additional test suites for quality management.
* **Prototyping new projects:** Greenfielding new concepts.
## Improving performance for {% data variables.copilot.copilot_coding_agent %}
{% data variables.copilot.copilot_coding_agent %} can support a wide range of tasks. To enhance the performance and address some of the limitations of the agent, there are various measures that you can adopt.
For more information about limitations, see [Limitations of {% data variables.copilot.copilot_coding_agent %}](#limitations-of-copilot-coding-agent) (below).
### Ensure your tasks are well-scoped
{% data variables.copilot.copilot_coding_agent %} leverages your prompt as key context when generating a pull request. The more clear and well-scoped the prompt you assign to the agent, the better the results you will get. An ideal issue includes:
* A clear description of the problem to be solved or the work required.
* Complete acceptance criteria on what a good solution looks like (for example, should there be unit tests?).
* Hints or pointers on what files need to be changed.
### Customize your experience with additional context
{% data variables.copilot.copilot_coding_agent %} leverages your prompt, comments and the repositorys code as context when generating suggested changes. To enhance Copilots performance, consider implementing custom Copilot instructions to help the agent better understand your project and how to build, test and validate its changes. For more information, see the "Add custom instructions to your repository" in [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks#adding-custom-instructions-to-your-repository).
For information about other customizations for {% data variables.copilot.copilot_coding_agent %}, see:
* [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent)
* [AUTOTITLE](/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent)
* [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp)
### Use {% data variables.copilot.copilot_coding_agent %} as a tool, not a replacement
While {% data variables.copilot.copilot_coding_agent %} can be a powerful tool for generating code and documentation, it is important to use it as a tool, rather than a replacement for human programming. You should always review and test the content generated by the agent to ensure that it meets your requirements and is free of errors or security concerns prior to merging.
### Use secure coding and code review practices
Although {% data variables.copilot.copilot_coding_agent %} can generate syntactically correct code, it may not always be secure. You should always follow best practices for secure coding, such as avoiding hard-coded passwords or SQL injection vulnerabilities, as well as following code review best practices, to address the agents limitations. You should always take the same precautions as you would with any code you write that uses material you did not independently originate, including precautions to ensure its suitability. These include rigorous testing, IP scanning, and checking for security vulnerabilities.
### Provide feedback
If you encounter any issues or limitations with {% data variables.copilot.copilot_coding_agent %} on {% data variables.product.prodname_dotcom_the_website %}, we recommend that you provide feedback by clicking the thumbs down icon below each agent response. This can help the developers to improve the tool and address any concerns or limitations. Additionally, you can provide feedback in the community discussion forum.
### Stay up to date
{% data variables.copilot.copilot_coding_agent %} is a new technology and is likely to evolve over time. You should stay up to date with any new security risks or best practices that may emerge.
## Security measures for {% data variables.copilot.copilot_coding_agent %}
By design, {% data variables.copilot.copilot_coding_agent %} is built with several mitigations to help ensure your data and codebase is secure. Although mitigations exist, be sure to continue implementing security best practices while understanding the agents limitations and how they may impact your code.
### Avoiding privileged escalation
{% data variables.copilot.copilot_coding_agent %} will only respond to interactions (for example, assigning the agent or commenting) from users with repository write access.
{% data variables.product.prodname_actions %} workflows triggered in response to pull requests raised by {% data variables.copilot.copilot_coding_agent %} require approval from a user with repository write access before they will run.
The agent filters hidden characters, that are not displayed on {% data variables.product.prodname_dotcom_the_website %}, which might otherwise allow users to hide harmful instructions in comments or issue body contents. This protects against risks like jailbreaks.
### Constraining Copilots permissions
Copilot only has access to the repository where it is creating a pull request, and cannot access other repositories.
Its permissions are limited, allowing it to push code and read other resources. Built-in protections mean that Copilot can only push to branches with names beginning with `copilot/`. This means that Copilot cannot push to your default branch (for example, `main`).
{% data variables.copilot.copilot_coding_agent %} does not have access to Actions organization or repository secrets or variables during runtime. Only secrets and variables specifically added to the `copilot` environment are passed to the agent.
### Preventing data exfiltration
By default, {% data variables.copilot.copilot_coding_agent %} has a firewall enabled to prevent exfiltration of code or other sensitive data, either accidentally or due to malicious user input.
For more information, see [AUTOTITLE](/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent).
## Limitations of {% data variables.copilot.copilot_coding_agent %}
Depending on factors such as your codebase and input data, you may experience different levels of performance when using {% data variables.copilot.copilot_coding_agent %}. The following information is designed to help you understand system limitations and key concepts about performance as they apply to {% data variables.copilot.copilot_coding_agent %}.
### Limited scope
The language model used by {% data variables.copilot.copilot_coding_agent %} has been trained on a large body of code but still has a limited scope and may not be able to handle certain code structures or obscure programming languages. For each language, the quality of suggestions you receive may depend on the volume and diversity of training data for that language.
### Potential biases
The language model used by {% data variables.copilot.copilot_coding_agent %}s training data and context gathered by the large language model may contain biases and errors that can be perpetuated by the tool. Additionally, {% data variables.copilot.copilot_coding_agent %} may be biased towards certain programming languages or coding styles, which can lead to suboptimal or incomplete suggestions.
### Security risks
{% data variables.copilot.copilot_coding_agent %} generates code and natural language based on the context of an issue or comment within a repository, which can potentially expose sensitive information or vulnerabilities if not used carefully. You should be careful to review all outputs generated by the agent thoroughly prior to merging.
### Inaccurate code
> [!Note]
> Allowing {% data variables.product.prodname_copilot %} to make suggestions that match publicly available code is not supported for {% data variables.copilot.copilot_coding_agent %} at this time. For more information, see [AUTOTITLE](/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions).
{% data variables.copilot.copilot_coding_agent %} may generate code that appears to be valid but may not actually be semantically or syntactically correct or may not accurately reflect the intent of the developer.
To mitigate the risk of inaccurate code, you should carefully review and test the generated code, particularly when dealing with critical or sensitive applications. You should also ensure that the generated code adheres to best practices and design patterns and fits within the overall architecture and style of the codebase.
### Legal and regulatory considerations
Users need to evaluate potential specific legal and regulatory obligations when using any AI services and solutions, which may not be appropriate for use in every industry or scenario. Additionally, AI services or solutions are not designed for and may not be used in ways prohibited in applicable terms of service and relevant codes of conduct.

View File

@@ -84,6 +84,8 @@ In addition to your onboarding resources, you may want to provide a library of l
If your organization has specific {% data variables.product.prodname_copilot_short %} usage guidelines, these should be clearly communicated in onboarding materials and anywhere else that teams might look for information. For example, if you plan to revoke access to {% data variables.product.prodname_copilot_short %} for users who have not used it in a certain period of time, ensure that your users are aware of this policy.
Many users may not be aware of all of {% data variables.product.prodname_copilot_short %}'s capabilities. You should offer guidance on how you expect the different features to fit into your organization's workflows, and provide training to support this. For an end-to-end example, see [AUTOTITLE](/copilot/rolling-out-github-copilot-at-scale/enabling-developers/integrating-agentic-ai).
### Ongoing analysis and optimization
Once you have implemented your {% data variables.product.prodname_copilot_short %} enablement process, you should regularly review and optimize it to ensure it continues to meet your organization's needs. Some ways you can do this are:

View File

@@ -8,5 +8,6 @@ topics:
- Copilot
children:
- /driving-copilot-adoption-in-your-company
- /integrating-agentic-ai
- /using-copilot-coding-agent-in-org
---

View File

@@ -0,0 +1,139 @@
---
title: Integrating agentic AI into your enterprise's software development lifecycle
shortTitle: Integrate AI agents
intro: See how agents can boost productivity across your enterprise.
versions:
feature: copilot
topics:
- Copilot
allowTitleToDifferFromFilename: true
---
## About AI agents on {% data variables.product.github %}
Developers in your enterprise may be used to using AI as a pair programming tool. In this model, developers work with AI assistants synchronously and receive code suggestions during the development phase of a project.
AI agents are more like peer programmers. Agents can:
* Perform asynchronous tasks, such as running tests or fixing issues in your backlog, with less need for human intervention.
* Contribute to workflows beyond the development phase, such as ideation or optimization after a release.
Collaborating with agents can give your employees more time to focus on other priorities, such as high-level planning, and bring the benefits of AI to non-developer roles by giving more power to natural language prompts.
{% data variables.product.prodname_copilot %}'s agentic AI features are integrated into {% data variables.product.github %}'s cohesive platform, providing a more streamlined user experience and simplified licensing and governance controls compared to adopting a range of third-party tools.
## Example scenario
You're an engineering manager at Mona's, a boutique umbrella retailer. Your team has been tasked with adding an **AI-powered widget** to the company's online store. The widget will help customers to choose the right umbrella by making tailored recommendations based on factors like the user's location and local weather trends.
To hit a tight deadline, you're aiming to speed up each stage of the process, for both developers and non-developers in your team. You also want to make sure the team is not overwhelmed with maintenance tasks once the new feature is rolled out.
>[!NOTE] {% data variables.product.github %} is continually expanding its AI-powered platform. Some of the features described in this article are in {% data variables.release-phases.public_preview %}, and may not be enabled for enterprises by default. You will find resources for each feature in the [Get started with agentic AI](#get-started-with-agentic-ai) section.
## 1. Plan with {% data variables.product.prodname_copilot_chat_short %}
1. To start planning, a product manager works with **{% data variables.product.prodname_copilot_chat_short %}** at `https://github.com/copilot`.
They ask {% data variables.product.prodname_copilot_short %} high-level questions to get a sense of the development work required for the new feature. To give {% data variables.product.prodname_copilot_short %} access to important context about the project, they upload mockup files and link to the repository where the codebase is stored.
1. When the PM has worked with {% data variables.product.prodname_copilot_short %} to get an overview of the tasks required, they ask {% data variables.product.prodname_copilot_short %} to **create issues** for each part of the work.
Copilot drafts the issues in immersive view, where the PM can refine them and publish them to the repository.
The PM marks some of the issues as nice-to-haves or maintenance. These may be good candidates for {% data variables.copilot.copilot_coding_agent %}.
![Screenshot of Copilot Chat in immersive mode. Copilot asks if the user would like to proceed with creating a set of prioritized issues.](/assets/images/help/copilot/sdlc-guide/issue-creation.png)
## 2. Create with {% data variables.product.prodname_github_models %} and agent mode
1. The PM shares the results with the developer and asks the developer to start by finding the best AI model to provide the tailored umbrella recommendations, based on the cost and effectiveness of the models.
1. The developer asks **{% data variables.product.prodname_copilot_chat_short %}** to recommend several AI models for the job and the pros and cons of each. To provide useful context, they ask Copilot to consider the information in the [AUTOTITLE](/copilot/using-github-copilot/ai-models/choosing-the-right-ai-model-for-your-task) {% data variables.product.prodname_docs %} article.
1. To settle on a model from the shortlist, the developer uses the **{% data variables.product.prodname_github_models %}** playground to compare results from the same prompt across models. They save time by testing models on a single platform, rather than needing to set up an API key for each model separately.
![Screenshot of the GitHub Models playground, with windows for sending prompts to two models side by side.](/assets/images/help/copilot/sdlc-guide/model-compare.png)
1. With the model decided, the developer opens the code in **{% data variables.product.prodname_vscode_shortname %}**.
1. The developer starts writing code for the new widget. To speed up their work, they use **{% data variables.product.prodname_copilot_chat_short %}** in "Ask" and "Edit" mode for syntax questions and high-level suggestions.
>[!TIP]
> The developer works with AI in the way that works best for them, but your organization has control over the experience. For example, you can:
> * **Control the models** that the developer can use for development work in order to meet compliance requirements and manage costs.
> * **Exclude certain files** from {% data variables.product.prodname_copilot_chat_short %}'s reach.
> * **Save effective prompts** that have been tested with {% data variables.product.prodname_github_models %}, so other users can benefit.
1. When the developer has written some code, they switch to **agent mode** to ask {% data variables.product.prodname_copilot_short %} to refactor the code into several different functions for better readability.
In agent mode, {% data variables.product.prodname_copilot_short %} works more autonomously and is able to update multiple files and, with the developer's authorization, run commands for actions like installing dependencies or running tests.
![Screenshot of the Copilot Chat pane in VS Code. Copilot asks the user for permission to run a linting command.](/assets/images/help/copilot/sdlc-guide/agent-mode.png)
>[!TIP] You can create a more consistent experience by adding a **custom instructions** file to the repository. For example, the file could help ensure that agent mode uses established naming conventions and runs the correct commands to build, test, and lint code according to your organization's standards.
1. The developer reviews the diff of the agent's work and chooses which code to keep.
## 3. Test with an MCP server
1. When the code is finished, the developer wants to run tests on their local build of the site using Playwright, an automated in-browser testing service.
* A repository administrator has added the **Model Context Protocol (MCP) server** for Playwright, which gives the {% data variables.product.prodname_copilot_short %} agent a predefined interface for integrating with Playwright.
* The developer asks {% data variables.product.prodname_copilot_short %} to outline test scenarios in a `.feature` file, then tells {% data variables.product.prodname_copilot_short %} to run the tests in the browser.
* In agent mode, {% data variables.product.prodname_copilot_short %} asks the developer to authorize its actions as it opens the browser and clicks different elements in the UI. As the developer watches the tests in the browser, {% data variables.product.prodname_copilot_short %} identifies a failing test and suggests a fix in the code.
1. When they're satisfied with the tests, the developer asks agent mode to open a pull request for the work on {% data variables.product.github %}.
>[!TIP] With the **{% data variables.product.github %} MCP server** enabled, {% data variables.product.prodname_copilot_short %} can run the command to open a pull request directly from {% data variables.product.prodname_vscode_shortname %}, with the title and description already filled in.
## 4. Review with {% data variables.copilot.copilot_code-review_short %}
1. A repository owner has configured automatic **code reviews** by {% data variables.product.prodname_copilot_short %} on the repository. {% data variables.product.prodname_copilot_short %} provides an initial review on the pull request, identifying bugs and potential performance issues that the developer can fix before a human reviewer gets to the pull request.
1. The developer's colleague reviews and approves the pull request. The work is ready to merge.
## 5. Optimize with {% data variables.copilot.copilot_coding_agent %}
1. After the release, the product manager collects customer feedback and identifies an opportunity to improve the widget's suggestions by switching to a more reliable API for weather data. They create an issue to implement this change, and **assign it to {% data variables.product.prodname_copilot_short %}** directly on {% data variables.product.github %}.
1. {% data variables.copilot.copilot_coding_agent %} works in the background and opens a pull request, which the product manager marks as ready for review.
![Screenshot a pull request created by the Copilot coding agent.](/assets/images/help/copilot/sdlc-guide/agent-pr.png)
1. A developer reviews {% data variables.product.prodname_copilot_short %}'s pull request and leaves feedback, which {% data variables.product.prodname_copilot_short %} incorporates. Finally, the developer merges the pull request.
>[!TIP] {% data variables.copilot.copilot_coding_agent %} comes with default guardrails. For example, {% data variables.product.prodname_copilot_short %} cannot merge pull requests by itself. You can define additional protections for target branches using repository rulesets.
1. Later, while working on a separate feature, the developer notices a small bug in the code for the AI widget. To avoid context switching, the developer instructs {% data variables.product.prodname_copilot_short %} to open a pull request directly from {% data variables.product.prodname_vscode_shortname %}.
`@github Create a PR for the widget function to correctly validate that the user's age is a positive integer.`
1. {% data variables.product.prodname_copilot_short %} works in the background and opens a pull request on {% data variables.product.github %}, ready for another developer to review.
## 6. Secure with {% data variables.product.prodname_copilot_autofix_short %}
1. An administrator has enabled {% data variables.product.prodname_code_scanning %} on the repository, and a {% data variables.product.prodname_code_scanning %} alert suggests a potential vulnerability in the code.
1. A security manager requests **{% data variables.product.prodname_copilot_autofix_short %}** to automatically suggest a fix for the vulnerability, which a developer reviews and approves.
![Screenshot of a code scanning alert on GitHub.com. A button labeled "Generate fix" is outlined in orange.](/assets/images/help/copilot/sdlc-guide/autofix.png)
## Get started with agentic AI
<a href="https://github.com/github-copilot/purchase?ref_cta=Copilot+Enterprise+trial&ref_cta=Copilot+Business+trial&ref_loc=integrating-agentic-ai" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>
To get started with the features mentioned in this article, use the links in the following table.
To integrate agentic AI features effectively into your workstreams, you'll need to invest in effective training, governance, and cultural shifts. We recommend experimenting with agentic features with a cross-functional cohort to gather feedback before a larger rollout.
> [!NOTE] Some of these features use **premium requests**. See [AUTOTITLE](/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests).
{% rowheaders %}
| Feature | More information |
| ------- | ---------------- |
| Immersive view of {% data variables.product.prodname_copilot_chat_short %} | [AUTOTITLE](/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github#submitting-a-question-to-copilot-chat) |
| {% data variables.product.prodname_copilot_chat_short %} agent mode | [Use agent mode in VS Code](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode) |
| Content exclusions | [AUTOTITLE](/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot) |
| MCP servers ({% data variables.release-phases.public_preview %}) | [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-chat-with-mcp#configuring-mcp-servers-in-visual-studio-code) |
| GitHub Models playground ({% data variables.release-phases.public_preview %}) | [AUTOTITLE](/github-models/prototyping-with-ai-models#experimenting-with-ai-models-in-the-playground) |
| Custom instructions | [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot?tool=vscode) |
| Copilot code review | [AUTOTITLE](/copilot/using-github-copilot/code-review/configuring-automatic-code-review-by-copilot) |
| {% data variables.copilot.copilot_coding_agent %} ({% data variables.release-phases.public_preview %}) | [AUTOTITLE](/copilot/rolling-out-github-copilot-at-scale/enabling-developers/using-copilot-coding-agent-in-org) |
| {% data variables.product.prodname_copilot_autofix_short %} | [AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning) |
{% endrowheaders %}

View File

@@ -0,0 +1,103 @@
---
title: 'Using {% data variables.copilot.copilot_coding_agent %} effectively in your organization'
shortTitle: 'Use {% data variables.copilot.copilot_coding_agent %}'
intro: 'Learn about adopting {% data variables.copilot.copilot_coding_agent %} in your organization.'
allowTitleToDifferFromFilename: true
versions:
feature: copilot
topics:
- Copilot
product: '{% data reusables.gated-features.copilot-coding-agent %}'
---
<!--JTBD: When evaluating {% data variables.copilot.copilot_coding_agent %}, I want to understand how it can help my team, so that I can make an informed decision about whether to enable it.-->
{% data reusables.copilot.coding-agent.preview-note %}
## Why {% data variables.copilot.copilot_coding_agent %}?
{% data variables.copilot.copilot_coding_agent %} is an autonomous, AI-powered agent that completes software development tasks on {% data variables.product.github %}. Adopting {% data variables.copilot.copilot_coding_agent %} in your organization frees your engineering teams to spend more time thinking strategically and less time making routine fixes and maintenance updates in a codebase.
{% data variables.copilot.copilot_coding_agent %}:
* **Joins your team**: Developers can delegate work to {% data variables.product.prodname_copilot_short %} unlike IDE-based coding agents that require synchronous pairing sessions.
* **Reduces context switching**: Developers working in JetBrains IDEs, {% data variables.product.prodname_vscode_shortname %}, {% data variables.product.prodname_vs %}, or {% data variables.product.prodname_dotcom_the_website %} can ask {% data variables.copilot.copilot_coding_agent %} to create a pull request to complete small tasks without stopping what they are currently doing.
* **Works on {% data variables.product.github %}**: {% data variables.product.prodname_copilot_short %} operates within your existing workflows on {% data variables.product.github %} alongside your developers.
* **Uses pull request review workflows**: {% data variables.product.prodname_copilot_short %} opens draft pull requests for team members to review and iterates based on feedback, as a developer would.
* **Executes tasks in parallel**: {% data variables.product.prodname_copilot_short %} can work on multiple issues simultaneously, handling tasks in the background while your team focuses on other priorities.
* **Provides decision transparency**: Developers can review {% data variables.product.prodname_copilot_short %}s logs on {% data variables.product.github %} to understand its reasoning and see the tools it used to complete tasks.
* **Ensures enterprise-grade security**: {% data variables.copilot.copilot_coding_agent %}'s security-first design keeps a human in the loop and enables governance via enterprise policies and settings.
## How {% data variables.copilot.copilot_coding_agent %} can contribute to your organization
{% data variables.product.prodname_copilot_short %} can help your organization address well-defined and scoped issues, such as increasing test coverage, fixing bugs or flaky tests, or updating config files or documentation. For more on the kinds of issues {% data variables.product.prodname_copilot_short %} works best on, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks).
Developers stay in the flow when they ask {% data variables.product.prodname_copilot_short %} to create pull requests directly from {% data variables.product.prodname_copilot_chat_short %} instead of opening issues that may sit in a backlog.
When used effectively, {% data variables.copilot.copilot_coding_agent %} offers productivity benefits over traditional AI assistants in IDEs:
* With **AI assistants in IDEs**, coding happens **locally**. Individual developers pair in **synchronous** sessions with the AI assistant. Decisions made during the session are **untracked** and lost to time unless committed. Although the assistant helps write code, the developer still has a lot of **manual steps** to do: create the branch, write commit messages, push the changes, open the PR, write the PR description, get a review, iterate in the IDE, and repeat. These steps take time and effort that may be hard to justify for simple or routine issues.
* With **{% data variables.copilot.copilot_coding_agent %}**, all coding and iterating happens **on {% data variables.product.github %}** as part of the pull request workflow. {% data variables.product.prodname_copilot_short %} **automates** branch creation, commit message writing and pushing, PR opening, and PR description writing. Developers let the agent **work in the background** and then steer {% data variables.product.prodname_copilot_short %} to a final solution using PR reviews. Working on {% data variables.product.github %} adds **transparency**, where every step happens in a commit and is viewable in logs. Working on {% data variables.product.github %} also opens up **collaboration** opportunities for the entire team.
Over time, your engineering teams can benefit from the increased automation, transparency, and collaboration {% data variables.copilot.copilot_coding_agent %} provides. For ideas on how to run a successful pilot, see [Piloting {% data variables.copilot.copilot_coding_agent %}](#piloting-copilot-coding-agent).
For an example scenario that walks through how to use {% data variables.copilot.copilot_coding_agent %} alongside other AI features on {% data variables.product.github %}, see [AUTOTITLE](/copilot/rolling-out-github-copilot-at-scale/enabling-developers/integrating-agentic-ai).
## Using MCP to enhance {% data variables.copilot.copilot_coding_agent %}
The Model Context Protocol (MCP) is an open standard that defines how applications share context with large language models (LLMs). MCP provides a standardized way to provide {% data variables.copilot.copilot_coding_agent %} with access to different data sources and tools.
{% data variables.copilot.copilot_coding_agent %} has access to the full {% data variables.product.github %} context of the repository it's working in, including issues and pull requests, using the built-in {% data variables.product.github %} MCP server. By default, it's restricted from accessing external data by authentication barriers and a firewall. You can extend the information available to {% data variables.copilot.copilot_coding_agent %} by giving it access to local MCP servers for the tools your organization uses. For example, you might want to provide access to local MCP servers for some of the following contexts:
* **Web browser**: Set up the Playwright MCP server to allow {% data variables.product.prodname_copilot_short %} to pull context directly from an external link in an issue.
* **Project planning tools**: Allow {% data variables.product.prodname_copilot_short %} direct access to private planning documents that are stored outside {% data variables.product.github %} in tools like Notion or Figma.
* **Augment training data**: Each LLM contains training data up to a specific cut-off date. If you're working with fast moving tools, {% data variables.product.prodname_copilot_short %} may not have access to information on new features. You can fill this knowledge gap by making the tool's MCP server available. For example, adding the Terraform MCP server will give {% data variables.product.prodname_copilot_short %} access to the most recently supported Terraform providers.
For more information, see [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp).
## Using {% data variables.copilot.copilot_coding_agent %} securely
Security is a fundamental consideration when you enable {% data variables.copilot.copilot_coding_agent %}, as with any other AI agent. {% data variables.product.prodname_copilot_short %} has a strong base of built-in security protections that you can supplement by following best practice guidance.
### Built-in protections
* **Subject to existing governance**: Organization settings and enterprise policies control availability. Any security policies and practices set up for the organization also apply to {% data variables.copilot.copilot_coding_agent %}.
* **Restricted development environment**: {% data variables.product.prodname_copilot_short %} works in a sandbox development environment with internet access controlled by a firewall. It has read-only access to the repository it's assigned to work in.
* **Limited access to branches**: {% data variables.product.prodname_copilot_short %} can only create and push to branches beginning with `copilot/`. It is subject to any branch protections and required checks for the working repository.
* **Responds only to users with write permissions**: {% data variables.product.prodname_copilot_short %} will not respond to feedback from users with lower levels of access.
* **Treated as an outside collaborator**: Draft pull requests proposed by {% data variables.product.prodname_copilot_short %} require approval by a user with write permissions before Actions workflows can run. {% data variables.product.prodname_copilot_short %} cannot mark its pull requests as "Ready for review" and cannot approve or merge a pull request.
* **Tracked for compliance**: {% data variables.product.prodname_copilot_short %}'s commits are co-authored by the developer who assigned the issue or requested the change to the pull request, allowing attribution of proposed changes. The developer who asked {% data variables.product.prodname_copilot_short %} to create a pull request cannot approve that pull request. In repositories where an approving review is required, this ensures that at least one independent developer reviews {% data variables.product.prodname_copilot_short %}'s work.
For more information, see:
* [AUTOTITLE](/copilot/responsible-use-of-github-copilot-features/responsible-use-of-copilot-coding-agent-on-githubcom)
* [{% data variables.product.prodname_copilot %} Trust Center](https://copilot.github.trust.page/)
### Security best practices
All AI models are trained to meet a request, even if they don't have all the information needed to provide a good answer, and this can lead them to make mistakes. By following best practices, you can reduce the risks of using {% data variables.product.prodname_copilot_short %} in your organization.
1. Give {% data variables.product.prodname_copilot_short %} the information it needs to work successfully in a repository using a `copilot-instructions.md` file. See [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot).
1. Set up the {% data variables.product.prodname_copilot_short %} development environment for a repository with access to the tools and package repositories approved by the organization using a `copilot-setup-steps.yml` file and local MCP servers. See [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent) and [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp).
1. Follow best practices for storing secrets securely. See [AUTOTITLE](/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions).
1. Enable code security features to further lower the risk of leaking secrets and introducing vulnerabilities into the code. See [AUTOTITLE](/code-security/securing-your-organization/enabling-security-features-in-your-organization/applying-the-github-recommended-security-configuration-in-your-organization).
1. Configure your branch rulesets to ensure that all pull requests raised by {% data variables.product.prodname_copilot_short %} are approved by a second user with write permissions (a sub-option of "Require a pull request before merging"). See {% ifversion ghec %}[AUTOTITLE](/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-code-governance), {% endif %}[AUTOTITLE](/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization) and [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-a-pull-request-before-merging).
## Piloting {% data variables.copilot.copilot_coding_agent %}
<a href="https://github.com/github-copilot/purchase?ref_cta=Copilot+Enterprise+trial&ref_cta=Copilot+Business+trial&ref_loc=using-cca-effectively" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>
> [!TIP] During the {% data variables.release-phases.public_preview %}, you need {% data variables.product.prodname_copilot_pro_plus %} or {% data variables.product.prodname_copilot_enterprise %} to use {% data variables.copilot.copilot_coding_agent %}.
As with any other change to working practices, it's important to run a trial to learn how to deploy {% data variables.copilot.copilot_coding_agent %} effectively in your organization or enterprise.
1. Gather a cross-functional team for the trial to bring different roles, backgrounds, and perspectives to the project. This will make it easier to ensure that you explore a broad range of ways to define issues, assign work to {% data variables.product.prodname_copilot_short %}, and give clear review feedback.
1. Choose an isolated or low-risk repository, for example, one that contains documentation or internal tools. You could create a fresh repository to use as a playground, but {% data variables.product.prodname_copilot_short %} needs context to be successful, so you would need to add a lot of context, including team processes, development environment, and common dependencies.
1. Enable {% data variables.copilot.copilot_coding_agent %} in the repository and optionally enable third-party MCP servers for enhanced context sharing. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/adding-copilot-coding-agent-to-organization).
1. Create repository instructions and pre-install any tools required in the development environment {% data variables.product.prodname_copilot_short %} uses. See [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent).
1. Identify a few compelling use cases for your organization, for example: test coverage or improving accessibility. See [Choose the right type of tasks to give to Copilot](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks#choosing-the-right-type-of-tasks-to-give-to-copilot) in the best practice guide.
1. Use best practice to create or refine issues for {% data variables.product.prodname_copilot_short %} in your pilot repository.
1. Assign issues to {% data variables.product.prodname_copilot_short %} and prepare team members to review its work.
1. Spend time looking at the codebase or documentation in {% data variables.product.prodname_vscode_shortname %} or {% data variables.product.prodname_dotcom_the_website %}, asking {% data variables.product.prodname_copilot_short %} to create a pull request to fix any bugs or small improvements that you identify.
Over the course of the trial, the team should iterate on the repository instructions, installed tools, access to MCP servers, and issue definition to identify how your organization can get the most from {% data variables.copilot.copilot_coding_agent %}. This process will help you identify your organization's best practices for working with {% data variables.product.prodname_copilot_short %} and plan an effective rollout strategy.
In addition to giving you insight into how to set up {% data variables.copilot.copilot_coding_agent %} for success, you'll learn how {% data variables.product.prodname_copilot_short %} uses premium requests and actions minutes. This will be valuable when you come to set and manage your budget for a broader trial or full rollout. See [AUTOTITLE](/copilot/rolling-out-github-copilot-at-scale/assigning-licenses/managing-your-companys-spending-on-github-copilot).

View File

@@ -52,3 +52,4 @@ Enhance the {% data variables.product.prodname_copilot_short %} experience for y
* **Setting up knowledge bases** for use with {% data variables.product.prodname_copilot_chat_short %} _({% data variables.product.prodname_copilot_enterprise_short %} only)_. See [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-github-copilot-features-in-your-organization/managing-copilot-knowledge-bases).
* **Fine tuning {% data variables.product.prodname_copilot_short %}** by creating a custom large language model. See [AUTOTITLE](/copilot/customizing-copilot/creating-a-custom-model-for-github-copilot).
* **Installing {% data variables.product.prodname_copilot_extensions_short %}** to integrate other tools with {% data variables.product.prodname_copilot_chat_short %}. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-github-copilot-features-in-your-organization/installing-github-copilot-extensions-for-your-organization).
* **Adding {% data variables.copilot.copilot_coding_agent %}** as a team member to work asynchronously on issues. See [AUTOTITLE](/copilot/rolling-out-github-copilot-at-scale/enabling-developers/using-copilot-coding-agent-in-org).

View File

@@ -43,7 +43,7 @@ Coding guidelines are configured at the repository level. You can create and ena
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. In the "Code & automation" section of the side bar, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**, then **Code review**.
1. In the "Code & automation" section of the sidebar, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**, then **Code review**.
1. Click **Create guideline**.
1. Under "Name," give the coding guideline a name.
1. Under "Description," provide a description of the coding guideline up to 600 characters long. This will be used by {% data variables.product.prodname_copilot_short %} to understand your coding style and to decide when to leave a comment.

View File

@@ -109,9 +109,16 @@ See [inline chat](https://code.visualstudio.com/docs/copilot/copilot-chat#_inlin
## {% data variables.product.prodname_copilot_edits_short %}
{% data reusables.copilot.copilot-edits.about-copilot-edits %}
Use {% data variables.product.prodname_copilot_edits_short %} to make changes across multiple files directly from a single {% data variables.product.prodname_copilot_chat_short %} prompt. {% data variables.product.prodname_copilot_edits_short %} has the following modes:
### Using edit mode
* [Edit mode](#edit-mode) lets {% data variables.product.prodname_copilot_short %} make controlled edits to multiple files.
* [Agent mode](#agent-mode) lets {% data variables.product.prodname_copilot_short %} autonomously accomplish a set task.
### Edit mode
{% data reusables.copilot.copilot-edits.edit-mode-description %}
#### Using edit mode
1. To start an edit session, select **Open Chat** from the {% data variables.product.prodname_copilot_chat_short %} menu.
1. At the bottom of the chat panel, select **Edit** from the mode dropdown.
@@ -124,7 +131,11 @@ See [inline chat](https://code.visualstudio.com/docs/copilot/copilot-chat#_inlin
For more detailed instructions, see [{% data variables.product.prodname_copilot_edits_short %}](https://code.visualstudio.com/docs/copilot/copilot-edits) in the {% data variables.product.prodname_vscode %} documentation.
### Using agent mode
### Agent mode
{% data reusables.copilot.copilot-edits.agent-mode-description %}
#### Using agent mode
1. To start an edit session, select **Open Chat** from the {% data variables.product.prodname_copilot_chat_short %} menu.
1. At the bottom of the chat panel, select **Agent** from the mode dropdown.
@@ -133,7 +144,7 @@ For more detailed instructions, see [{% data variables.product.prodname_copilot_
For more information, see [{% data variables.product.prodname_copilot_edits_short %}](https://aka.ms/vscode-copilot-agent) in the {% data variables.product.prodname_vscode %} documentation.
When you use {% data variables.product.prodname_copilot_agent_short %} mode, {% data variables.product.prodname_copilot_short %} may make multiple premium requests to complete a single task. This includes both user-initiated prompts and follow-up actions {% data variables.product.prodname_copilot_short %} takes on your behalf. The total premium requests used will depend on the complexity of the task, the number of steps involved, and the model selected. See [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/monitoring-usage-and-entitlements/avoiding-unexpected-copilot-costs).
{% data reusables.copilot.copilot-edits.agent-mode-requests %}
## Using images in {% data variables.product.prodname_copilot_chat_short %}
@@ -400,9 +411,16 @@ By default, {% data variables.product.prodname_copilot_chat_short %} will refere
## {% data variables.product.prodname_copilot_edits_short %}
{% data reusables.copilot.copilot-edits.about-copilot-edits-jetbrains %}
Use {% data variables.product.prodname_copilot_edits_short %} to make changes across multiple files directly from a single {% data variables.product.prodname_copilot_chat_short %} prompt. {% data variables.product.prodname_copilot_edits_short %} has the following modes:
### Using edit mode
* [Edit mode](#edit-mode-1) lets {% data variables.product.prodname_copilot_short %} make controlled edits to multiple files.
* [Agent mode](#agent-mode-1) lets {% data variables.product.prodname_copilot_short %} autonomously accomplish a set task.
### Edit mode
{% data reusables.copilot.copilot-edits.edit-mode-description %}
#### Using edit mode
1. To start an edit session, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}** in the menu bar, then select **Open {% data variables.product.prodname_copilot_chat %}**.
1. At the top of the chat panel, click **{% data variables.product.prodname_copilot_edits_short %}**.
@@ -410,6 +428,19 @@ By default, {% data variables.product.prodname_copilot_chat_short %} will refere
1. Submit a prompt. In response to your prompt, {% data variables.product.prodname_copilot_edits_short %} determines which files in your _working set_ to change and adds a short description of the change.
1. Review the changes and **Accept** or **Discard** the edits for each file.
### Agent mode
{% data reusables.copilot.copilot-edits.agent-mode-description %}
#### Using agent mode
1. To start an edit session using agent mode, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}** in the menu bar, then select **Open {% data variables.product.prodname_copilot_chat %}**.
1. At the top of the chat panel, click the **Agent** tab.
1. Submit a prompt. In response to your prompt, {% data variables.product.prodname_copilot_short %} streams the edits in the editor, updates the working set, and if necessary, suggests terminal commands to run.
1. Review the changes. If {% data variables.product.prodname_copilot_short %} suggested terminal commands, confirm whether or not {% data variables.product.prodname_copilot_short %} can run them. In response, {% data variables.product.prodname_copilot_short %} iterates and performs additional actions to complete the task in your original prompt.
{% data reusables.copilot.copilot-edits.agent-mode-requests %}
## Sharing feedback
To share feedback about {% data variables.product.prodname_copilot_chat_short %}, you can use the **share feedback** link in JetBrains.
@@ -468,6 +499,20 @@ Use slash commands to avoid writing complex prompts for common scenarios. To use
To see all available slash commands, type `/` in the chat prompt box. For more information, see [AUTOTITLE](/copilot/using-github-copilot/github-copilot-chat-cheat-sheet?tool=xcode#slash-commands).
## {% data variables.product.prodname_copilot_short %} agent mode
{% data reusables.copilot.copilot-edits.agent-mode-description %}
### Using agent mode
1. To open the chat view, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}** in the menu bar, then click **Open Chat**.
1. At the bottom of the chat panel, select **Agent** from the mode dropdown.
1. Optionally, add relevant files to the _working set_ view to indicate to {% data variables.product.prodname_copilot_short %} which files you want to work on.
1. Submit a prompt. In response to your prompt, {% data variables.product.prodname_copilot_short %} streams the edits in the editor, updates the working set, and if necessary, suggests terminal commands to run.
1. Review the changes. If {% data variables.product.prodname_copilot_short %} suggested terminal commands, confirm whether or not {% data variables.product.prodname_copilot_short %} can run them. In response, {% data variables.product.prodname_copilot_short %} iterates and performs additional actions to complete the task in your original prompt.
{% data reusables.copilot.copilot-edits.agent-mode-requests %}
## File references
By default, {% data variables.product.prodname_copilot_chat_short %} will reference the file that you have open or the code that you have selected. To attach a specific file as reference, click {% octicon "paperclip" aria-label="Add attachments" %} in the chat prompt box.
@@ -528,6 +573,19 @@ To see all available slash commands, type `/` in the chat prompt box.
{% data reusables.copilot.change-the-ai-model %}
## {% data variables.product.prodname_copilot_short %} agent mode
{% data reusables.copilot.copilot-edits.agent-mode-description %}
### Using agent mode
1. To open the {% data variables.product.prodname_copilot_chat_short %} panel, click the {% data variables.product.prodname_copilot_short %} icon ({% octicon "copilot" aria-hidden="true" %}) in the status bar at the bottom of Eclipse, then click **Open Chat**.
1. At the bottom of the chat panel, select **Agent** from the mode dropdown.
1. Submit a prompt. In response to your prompt, {% data variables.product.prodname_copilot_short %} streams the edits in the editor, updates the working set, and if necessary, suggests terminal commands to run.
1. Review the changes. If {% data variables.product.prodname_copilot_short %} suggested terminal commands, confirm whether or not {% data variables.product.prodname_copilot_short %} can run them. In response, {% data variables.product.prodname_copilot_short %} iterates and performs additional actions to complete the task in your original prompt.
{% data reusables.copilot.copilot-edits.agent-mode-requests %}
## Further reading
* [AUTOTITLE](/copilot/using-github-copilot/prompt-engineering-for-github-copilot)

View File

@@ -0,0 +1,140 @@
---
title: Choosing the right AI tool for your task
shortTitle: 'Choose the right AI tool'
intro: "Understand {% data variables.product.github %}'s AI tools and how they can be used to help develop software."
versions:
fpt: '*'
topics:
- Copilot
---
## Overview
The use of AI tools is increasingly becoming a standard part of a software developer's daily workflow. To be competitive in the job market, it's important to to know which AI tools to use for each task you face as a developer.
{% data variables.product.github %}'s AI tools assist with every phase of the software development lifecycle (SDLC):
* **Planning**:
* {% data variables.product.prodname_copilot_short %} can create issues to help track your ideas.
* {% data variables.product.prodname_copilot_chat_short %} can help you brainstorm and identify the best technologies for your project.
* **Code creation**:
* {% data variables.product.prodname_copilot_short %} code completions helps add code as you type.
* {% data variables.copilot.next_edit_suggestions_caps %} ({% data variables.release-phases.public_preview %}) predicts the next edit you are likely to make and suggests a completion for it.
* {% data variables.product.prodname_copilot_chat_short %} can answer questions and offer suggestions in a conversational environment.
* You can assign {% data variables.copilot.copilot_coding_agent %} to an open issue and it will automatically raise a pull request to address the necessary changes.
* **Reviews**:
* {% data variables.copilot.copilot_code-review_short %} gives you feedback in your favorite IDE, or as a pull request review on {% data variables.product.github %}.
* **Testing**:
* {% data variables.product.prodname_copilot_chat_short %} can help you write and debug tests.
* **Deployment**:
* {% data variables.product.prodname_copilot_chat_short %} can help you configure continuous integration and continuous deployment (CI/CD) pipelines.
* **Operation**:
* {% data variables.copilot.copilot_coding_agent %} ({% data variables.release-phases.public_preview %}) can raise pull requests for open issues.
* {% data variables.product.prodname_copilot_chat_short %} can help with tasks you're working on yourself.
## Planning
During the planning phase, you define the goals, scope, and requirements of your project, setting the direction for development by outlining what needs to be built and how it will be achieved.
On {% data variables.product.github %}, use **{% data variables.product.prodname_copilot_short %}-powered issue creation** ({% data variables.release-phases.public_preview %}) to streamline the tracking of your ideas. Provide a short natural language prompt (or upload an image), and {% data variables.product.prodname_copilot_short %} will generate a structured issue for you.
Once you've chosen an issue to address, **{% data variables.product.prodname_copilot_chat_short %}** can help you brainstorm ideas for your project and learn about the various tools, libraries, and resources you might need. You can ask {% data variables.product.prodname_copilot_chat_short %} generalized questions about the project you're envisioning to get suggestions on a path forward. For example:
> I'd like to build an web app that helps users track their daily habits and provides personalized recommendations. Can you suggest features and technologies I could use?
## Creation
During the creation phase, you'll write and refine the code for your application. This is where you can bring the project to life by implementing features, fixing bugs, and iterating on the codebase.
{% data variables.product.prodname_copilot_short %} provides auto-complete style **coding suggestions** as you code in your favorite IDE or on {% data variables.product.github %}, helping you draft and refine your code faster. You can write code directly or describe your intent in natural language using comments in your IDE, and {% data variables.product.prodname_copilot_short %} will generate relevant suggestions.
With **{% data variables.copilot.next_edit_suggestions %}** ({% data variables.release-phases.public_preview %}), {% data variables.product.prodname_copilot_short %} predicts related edits based on the changes youre actively making. For example, if you rename a variable or update a functions parameters, it suggests corresponding updates throughout your code. This helps maintain consistency and reduces the chance of errors.
### Using {% data variables.product.prodname_copilot_chat_short %} in ask mode
Use {% data variables.product.prodname_copilot_chat_short %} in **ask mode** as your pair programmer to get help with coding tasks, understand tricky concepts, and improve your code. You can ask it questions, get explanations, or request suggestions in real time.
> Can you explain what this JavaScript function does? I'm not sure why it uses a `forEach` loop instead of a `for` loop.
> Whats the difference between `let`, `const`, and `var` in JavaScript? When should I use each one?
### Using {% data variables.product.prodname_copilot_chat_short %} in edit mode
Use {% data variables.product.prodname_copilot_chat_short %} in **edit mode** when you want more granular control over the edits that {% data variables.product.prodname_copilot_short %} proposes. In edit mode, you choose which files {% data variables.product.prodname_copilot_short %} can make changes to, provide context to {% data variables.product.prodname_copilot_short %} with each iteration, and decide whether or not to accept the suggested edits.
> Refactor the `calculateTotal` function to improve readability and efficiency.
> The login function is not working as expected. Can you debug it?
> Format this code to follow Pythons PEP 8 style guide.
### Using {% data variables.product.prodname_copilot_chat_short %} in agent mode
In **agent mode**, {% data variables.product.prodname_copilot_chat_short %} can assist with automating repetitive tasks and managing your workflow directly within your project. Use it to create pull requests after you make code changes. You can also use it to run tests and linters in the background while you're working on your project.
> Create a pull request for the recent changes in the `user-auth` module and include a summary of the updates.
> Run all tests and linters for the `payment-processing` module and provide a summary of any issues or errors found.
## Reviews
The **review** phase ensures the quality and reliability of your code. It involves analyzing changes, identifying potential issues, and improving the overall structure and functionality of the codebase.
While you're coding in your IDE, ask {% data variables.product.prodname_copilot_short %} to:
* **Review a selection of changes:** Highlight specific parts of your code and ask {% data variables.product.prodname_copilot_short %} for an initial review. This is great for quick feedback on smaller edits.
* **Review all changes:** Request a deeper review of all your changes in a file or a project. {% data variables.product.prodname_copilot_short %} will analyze your work and provide suggestions for improvements.
When you're ready to get feedback from others on the {% data variables.product.github %} website, first **assign {% data variables.product.prodname_copilot_short %} as a reviewer** on your pull request. It will automatically add comments to highlight areas where you can improve code quality or identify potential bugs before human review.
## Testing
The testing phase validates that your application works as intended. This phase involves writing and running tests to catch bugs, ensure functionality, and maintain code quality before deployment.
**{% data variables.product.prodname_copilot_chat_short %}** can assist by generating unit and integration tests, debugging failures, and suggesting additional test cases to ensure comprehensive coverage. Here are some example prompts:
> Write unit tests for this function to calculate the factorial of a number. Include edge cases like 0 and negative numbers.
> How do I run these tests using Python's unittest framework?
> Write integration tests for the `deposit` function in the BankAccount class. Use mocks to simulate the NotificationSystem.
> What additional tests should I include to ensure full coverage for this module?
## Deployment
The deployment phase involves preparing your code for production and ensuring a smooth release.
**{% data variables.product.prodname_copilot_chat_short %}** can help you configure deployment scripts, set up CI/CD pipelines, and troubleshoot issues. Here are some example prompts:
> Write a deployment script for a Node.js application using GitHub Actions to deploy to an AWS EC2 instance.
> Set up a GitHub Actions workflow to build, test, and deploy a Python application to Heroku.
> Analyze this deployment log and suggest why the deployment failed.
## Operation
During the operation phase, the focus is on maintaining and monitoring your application in production to ensure it runs smoothly and meets user expectations. This phase often involves tasks like debugging production issues, optimizing performance, and ensuring system reliability.
You can use the **{% data variables.copilot.copilot_coding_agent %}** ({% data variables.release-phases.public_preview %}) as an autonomous agent that can help maintain and improve your application in production. Assign a {% data variables.product.github %} issue to {% data variables.product.prodname_copilot_short %}, and it will autonomously explore the repository, identify potential fixes, and create a pull request with the proposed changes. Then it will automatically request a review from you.
For issues you're tackling yourself, use **{% data variables.product.prodname_copilot_chat_short %}** for help analyzing logs, debugging issues, and suggesting optimizations. For example:
> Analyze this error log and suggest possible causes for the issue.
> Write a script to monitor the memory usage of this application and alert when it exceeds a threshold.
> How can I optimize the database queries in this code to improve performance?
## Next steps
Before you start your next task, take a moment to identify the right tool to make your work faster and more efficient.
{% note %}
Do you feel prepared to identify the right AI tool for your next task?
<a href="https://docs.github.io/success-test/yes.html" target="_blank" class="btn btn-outline mt-3 mr-3 no-underline"><span>Yes</span></a> <a href="https://docs.github.io/success-test/no.html" target="_blank" class="btn btn-outline mt-3 mr-3 no-underline"><span>No</span></a>
{% endnote %}

View File

@@ -13,4 +13,6 @@ children:
- /using-copilot-to-migrate-a-project
- /writing-tests-with-github-copilot
- /modernizing-legacy-code-with-github-copilot
- /upgrading-java-projects-with-github-copilot
- /choosing-the-right-ai-tool-for-your-task
---

View File

@@ -0,0 +1,103 @@
---
title: Upgrading Java projects with GitHub Copilot
shortTitle: Upgrading Java projects
intro: 'You can use {% data variables.product.prodname_copilot %} to upgrade your Maven and Gradle Java applications.'
versions:
feature: copilot
topics:
- Copilot
---
> [!NOTE]
> GitHub Copilot app modernization upgrade for Java is currently in {% data variables.release-phases.public_preview %} and subject to change.
## Introduction
{% data variables.product.prodname_copilot %} can help streamline the process of upgrading Java applications. The "GitHub Copilot app modernization upgrade for Java" {% data variables.product.prodname_vscode %} extension assists with every step of upgrading your Java project's runtime and/or framework version.
* Analyzing the project and dependencies to generate an upgrade plan.
* Executing code transformations based on the plan.
* Automatically fixing issues during the upgrade.
* Providing detailed logs, commit history, and output.
* Performing security scans (CVE) and behavioral consistency checks post-upgrade.
* Summarizing key changes including updated dependencies and resolved issues.
* Generating unit tests independently of the upgrade process.
This solution supports both Maven and Gradle build tools and facilitates upgrades between Java versions 8, 11, 17, and 21.
## Prerequisites
Before getting started you must have the following:
* Either a **{% data variables.product.prodname_copilot_for_business %}** or **{% data variables.product.prodname_copilot_enterprise %}** [subscription plan](/copilot/about-github-copilot/subscription-plans-for-github-copilot).
* The latest version of [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/).
* The "GitHub Copilot app modernization upgrade for Java (preview)" extension installed in {% data variables.product.prodname_vscode %}.
* Installed versions of both the source and target JDKs.
* A Git-based Java project using Maven or Gradle.
* For Maven-based projects, access to the public Maven Central repository.
>[!NOTE] For Gradle projects, only wrapper-based builds (Gradle v5+) are supported. Projects using Kotlin DSL are not currently supported.
## Upgrading a Java project
### 1. Install the required extension
To get started, you'll need to install the “GitHub Copilot app modernization upgrade for Java (preview)” extension for {% data variables.product.prodname_vscode %}.
1. Open {% data variables.product.prodname_vscode %}.
1. Click on “Extensions”.
1. Search for “GitHub Copilot app modernization upgrade for Java (preview)” and click “Download”.
1. Restart {% data variables.product.prodname_vscode %}.
### 2. Use {% data variables.product.prodname_copilot_chat %} in agent mode and generate the upgrade plan
Now you have the extension, you can continue to use {% data variables.product.prodname_copilot %} in agent mode and create a plan for your upgrade.
1. In {% data variables.product.prodname_vscode %}, open the {% data variables.product.prodname_copilot_chat %} panel.
1. At the bottom of the chat panel, select **Agent** from the mode dropdown.
1. Enter a prompt describing the upgrade path you need. For example:
> "Upgrade project to Java 21 and Spring Boot 3.2"
1. When prompted, click **Continue** to generate an upgrade plan
### 3. Review and edit the upgrade plan
{% data variables.product.prodname_copilot %} will analyze your project's structure, JDK, dependencies, and build tool before generating a `plan.md` upgrade plan for your specific circumstances that outlines source and target JDK versions and upgrade paths for frameworks and libraries.
1. Click on the new `plan.md` tab in {% data variables.product.prodname_vscode %}.
1. Review, and edit if necessary, the plan. Make sure the versions in the plan align with your goals and what you've already specified.
1. When you're ready, click **Continue** to proceed.
### 4. Apply code changes and fix build issues
Next, {% data variables.product.prodname_copilot %} will begin transforming your project. This involves using OpenRewrite to apply code changes via predefined recipes and iteratively fixing remaining issues with {% data variables.product.prodname_copilot_short %} through a build/fix loop.
1. When prompted to "Run Upgrade Java code using OpenRewrite", click **Continue**. Note that this step may take some time.
1. When prompted to "Run Build project and fix errors", click **Continue**.
You can track the progress of this phase by viewing the `progress.md` file in {% data variables.product.prodname_vscode %}.
### 5. Check for security vulnerabilities (CVE) and code behavior changes
To ensure reliability and security, {% data variables.product.prodname_copilot %} performs additional checks.
1. When prompted to "Run Validate if any modified dependencies have known CVEs", click **Continue**.
If CVEs are detected, {% data variables.product.prodname_copilot_short %} will try to resolve them. You can review and accept or reject the changes.
1. When prompted to "Run Validate code behavior consistency", click **Continue**.
If inconsistencies are found, {% data variables.product.prodname_copilot_short %} will again attempt fixes and you can decide which to keep.
At the end of this process, the tool rebuilds the project and runs one final validation. The process concludes if only minor issues that dont block the upgrade may remain. Otherwise, it loops back to address outstanding problems.
### 6. View the Upgrade Summary
Once completed, {% data variables.product.prodname_copilot_short %} generates a `summary.md` file in your project directory containing:
* Project metadata.
* Lines of code modified.
* Updated dependencies.
* Description of code changes.
* CVEs and inconsistencies resolved.
* Remaining minor CVE issues (if any).

View File

@@ -10,6 +10,7 @@ children:
- /best-practices-for-using-github-copilot
- /getting-code-suggestions-in-your-ide-with-github-copilot
- /copilot-chat
- /using-copilot-coding-agent-to-work-on-tasks
- /asking-github-copilot-questions-in-windows-terminal
- /using-copilot-text-completion
- /code-review
@@ -18,6 +19,7 @@ children:
- /ai-models
- /finding-public-code-that-matches-github-copilot-suggestions
- /using-github-copilot-for-pull-requests
- /using-github-copilot-to-create-issues
- /guides-on-using-github-copilot
redirect_from:
- /copilot/github-copilot-chat

View File

@@ -0,0 +1,112 @@
---
title: About assigning tasks to Copilot
intro: 'You can assign {% data variables.product.github %} issues to {% data variables.product.prodname_copilot_short %}, or ask {% data variables.product.prodname_copilot_short %} to create a pull request.'
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=about+assigning+issues+to+copilot&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot
topics:
- Copilot
type: overview
redirect_from:
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/about-assigning-issues-to-copilot
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/about-assigning-tasks-to-copilot
---
{% data reusables.copilot.coding-agent.preview-note %}
## Overview of {% data variables.copilot.copilot_coding_agent %}
With {% data variables.copilot.copilot_coding_agent %}, {% data variables.product.prodname_copilot %} can work independently in the background to complete tasks, just like a human developer.
{% data variables.product.prodname_copilot_short %} can:
* Fix bugs
* Implement incremental new features
* Improve test coverage
* Update documentation
* Address technical debt
To delegate development tasks to {% data variables.product.prodname_copilot_short %}, you can:
* Assign an issue to {% data variables.product.prodname_copilot_short %}
* Use {% data variables.product.prodname_copilot_chat %} to ask {% data variables.product.prodname_copilot_short %} to create a pull request
{% data variables.product.prodname_copilot_short %} will evaluate the task it has been assigned based on the prompt you give it—whether that's from the issue description or a chat message. Then {% data variables.product.prodname_copilot_short %} will make the required changes and open a pull request. When {% data variables.product.prodname_copilot_short %} finishes, it will request a review from you, and you can leave pull request comments to ask {% data variables.product.prodname_copilot_short %} to iterate.
While working on a coding task, {% data variables.product.prodname_copilot_short %} has access to its own ephemeral development environment, powered by {% data variables.product.prodname_actions %}, where it can explore your code, make changes, execute automated tests and linters and more.
### Streamlining software development with {% data variables.copilot.copilot_coding_agent %}
Assigning tasks to {% data variables.product.prodname_copilot_short %} can enhance your software development workflow.
For example, you can assign {% data variables.product.prodname_copilot_short %} to straightforward issues on your backlog. This allows you to spend less time on these and more time on more complex or interesting work, or work that requires a high degree of creative thinking. {% data variables.product.prodname_copilot_short %} can work on "nice to have" issues that improve the quality of your codebase or product, but often remain on the backlog while you focus on more urgent work.
Having {% data variables.product.prodname_copilot_short %} as an additional coding resource also allows you to start tasks that you might not have otherwise due to lack of resources. For example, you might delegate {% data variables.product.prodname_copilot_short %} tasks to refactor code or add more logging, then immediately assign these to {% data variables.product.prodname_copilot_short %}.
{% data variables.product.prodname_copilot_short %} can start a task, which you then pick up and continue working on yourself. By assigning the initial work to {% data variables.product.prodname_copilot_short %}, you free up time that you would otherwise have spent doing repetitive tasks, such as setting up the scaffolding for a new project.
### Making {% data variables.copilot.copilot_coding_agent %} available
Before you can assign tasks to {% data variables.product.prodname_copilot_short %}, it must be enabled. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/enabling-copilot-coding-agent).
## {% data variables.copilot.copilot_coding_agent %} usage costs
{% data reusables.copilot.coding-agent.premium-requests-start-date %}
{% data variables.copilot.copilot_coding_agent %} uses {% data variables.product.prodname_actions %} minutes and {% data variables.product.prodname_copilot_short %} premium requests.
Within your monthly usage allowance for {% data variables.product.prodname_actions %} and premium requests, you can ask {% data variables.product.prodname_copilot_short %} to work on coding tasks without incurring any additional costs.
For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-copilot/about-billing-for-github-copilot#allowance-usage-for-copilot-coding-agent).
## Risks and mitigations
{% data variables.copilot.copilot_coding_agent %} is an autonomous agent that has access to your code and can push changes to your repository. This entails certain risks. Where possible, {% data variables.product.github %} has applied appropriate mitigations.
### Risk: {% data variables.product.prodname_copilot_short %} can push code changes to your repository
To mitigate this risk, {% data variables.product.github %}:
* **Limits who can assign tasks to {% data variables.product.prodname_copilot_short %}.** Only users with write access to the repository can trigger {% data variables.product.prodname_copilot_short %} to work. Comments from users without write access are never presented to the agent.
* **Limits the permissions in access tokens used by Copilot.** Pushes are only allowed to branches beginning with `copilot/`. {% data variables.product.prodname_copilot_short %} cannot push to the `main` or `master` branches.
* **Limits {% data variables.product.prodname_copilot_short %}'s credentials.** {% data variables.product.prodname_copilot_short %} can only perform simple push operations. It cannot directly run `git push` or other Git commands.
* **Restricts {% data variables.product.prodname_actions %} workflow runs.** Workflows are not triggered until {% data variables.product.prodname_copilot_short %}'s code is reviewed and a user with write access to the repo clicks the **Approve and run workflows** button. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/using-copilot-to-work-on-an-issue#allowing-github-actions-workflows-to-run-when-copilot-pushes-changes).
* **Prevents the user who asked {% data variables.product.prodname_copilot_short %} to create a pull request from approving it.** This maintains the expected controls in the "Required reviews" rule and branch protection. See [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets).
### Risk: {% data variables.product.prodname_copilot_short %} has access to sensitive information
{% data variables.product.prodname_copilot_short %} has access to code and other sensitive information, and could leak it, either accidentally or due to malicious user input. To mitigate this risk, {% data variables.product.github %}:
* **Restricts {% data variables.product.prodname_copilot_short %}'s access to the internet.** See [AUTOTITLE](/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent).
### Risk: Prompt injection vulnerabilities
Users can include hidden messages in issues assigned to {% data variables.product.prodname_copilot_short %} or comments left for {% data variables.product.prodname_copilot_short %} as a form of [prompt injection](https://genai.owasp.org/llmrisk/llm01-prompt-injection/). To mitigate this risk, {% data variables.product.github %}:
* **Filters hidden characters before passing user input to {% data variables.product.prodname_copilot_short %}**: For example, text entered as an HTML comment in an issue or pull request comment is not passed to {% data variables.product.prodname_copilot_short %}.
## Limitations of {% data variables.copilot.copilot_coding_agent %}
{% data variables.copilot.copilot_coding_agent %} has certain limitations in its software development workflow and compatibility with other features.
### Limitations in {% data variables.product.prodname_copilot_short %}'s software development workflow
* **{% data variables.product.prodname_copilot_short %} can only make changes in the same repository where it is creating its pull request**. When {% data variables.product.prodname_copilot_short %} is assigned an issue, it can only make changes in the repository where that issue is located. In addition, {% data variables.product.prodname_copilot_short %} cannot make changes across multiple repositories in one run.
* **{% data variables.product.prodname_copilot_short %} can only access context in the same repository as the assigned issue**. By default, an integration with the {% data variables.product.prodname_copilot_short %} MCP server provides {% data variables.product.prodname_copilot_short %} access to one repository at a time. You can, however, configure broader access. See [AUTOTITLE](/enterprise-cloud@latest/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp).
* **{% data variables.product.prodname_copilot_short %} can only open one pull request at a time**. {% data variables.product.prodname_copilot_short %} will open exactly one pull request to address each task it is assigned.
* **{% data variables.product.prodname_copilot_short %} cannot work on an existing pull request that it didn't create**. If you would like {% data variables.product.prodname_copilot_short %} to provide feedback on an existing pull request, you can add it as a reviewer. See [AUTOTITLE](/copilot/using-github-copilot/code-review/using-copilot-code-review).
* **{% data variables.product.prodname_copilot_short %} will always start its changes from the repository's default branch**. {% data variables.product.prodname_copilot_short %} cannot branch off from any other branch—for example, a feature branch or a release branch.
### Limitations in Copilot's compatibility with other features
* **{% data variables.product.prodname_copilot_short %} does not sign its commits**. If you have the "Require signed commits" rule or branch protection enabled, you must rewrite the commit history in order to merge {% data variables.product.prodname_copilot_short %}'s pull requests. See [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-signed-commits).
* **{% data variables.product.prodname_copilot_short %} does not work with self-hosted {% data variables.product.prodname_actions %} runners**. {% data variables.product.prodname_copilot_short %} has access to its own development environment, running in {% data variables.product.prodname_actions %}, and must use {% data variables.product.prodname_dotcom %}-hosted runners. See [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent#upgrading-to-larger-github-hosted-github-actions-runners).
* **{% data variables.product.prodname_copilot_short %} doesn't account for content exclusions**. Content exclusions allow administrators to configure {% data variables.product.prodname_copilot_short %} to ignore certain files. When using {% data variables.copilot.copilot_coding_agent %}, {% data variables.product.prodname_copilot_short %} will not ignore these files, and will be able to see and update them. See [AUTOTITLE](/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot).
## Further reading
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks)
* [AUTOTITLE](/copilot/responsible-use-of-github-copilot-features/responsible-use-of-copilot-coding-agent-on-githubcom)
* [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent)
* [AUTOTITLE](/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent)
* [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp)

View File

@@ -0,0 +1,54 @@
---
title: Asking Copilot to create a pull request
shortTitle: Creating a PR from chat
intro: 'You can use a {% data variables.product.prodname_copilot_chat_short %} prompt to ask {% data variables.product.prodname_copilot_short %} to create a pull request.'
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=asking+copilot+to+create+a+pull+request&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot
topics:
- Copilot
type: how_to
redirect_from:
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/asking-copilot-to-create-a-pull-request
---
> [!NOTE]
> * If you have access to {% data variables.copilot.copilot_coding_agent %}, you can create a pull request from {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, and on {% data variables.product.prodname_dotcom_the_website %}.
> * {% data reusables.copilot.coding-agent.preview-note-text %}
## Introduction
Often, when you are working on a project, you might notice a change you want to make, but the change doesn't directly relate to your current task. You might raise a {% data variables.product.github %} issue to record that a change needs to be made—or perhaps, forget the change and move on.
Instead—if {% data variables.copilot.copilot_coding_agent %} is available—you can ask {% data variables.product.prodname_copilot_short %} to make the change for you. {% data variables.product.prodname_copilot_short %} will start working on the change in the background and, when it's done, request you to review the pull request it raises.
For information on making {% data variables.copilot.copilot_coding_agent %} available, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/enabling-copilot-coding-agent).
## Creating a pull request from {% data variables.product.prodname_copilot_chat_short %}
1. Open {% data variables.product.prodname_copilot_chat %}, in your IDE, or while viewing a file on {% data variables.product.prodname_dotcom_the_website %}.
1. Type a prompt asking {% data variables.product.prodname_copilot_short %} to create a pull request, and giving details of what you want {% data variables.product.prodname_copilot_short %} to change.
For example, `@github Create a PR to put backticks around file names and variables in output.`
> [!IMPORTANT]
> {% data reusables.copilot.coding-agent.use-chat-participant-in-vsc %}
> [!TIP]
> To help {% data variables.product.prodname_copilot_short %}, you can select the relevant line(s) of code before submitting your prompt.
1. Submit your prompt.
{% data variables.product.prodname_copilot_short %} will respond with a link to the pull request it creates. It will work on the task and push changes to the pull request, and then add you as a reviewer when it has finished, triggering a notification.
## Monitoring progress
You can see what {% data variables.product.prodname_copilot_short %} is doing while it is working on a task by viewing the session logs. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/using-the-copilot-coding-agent-logs).
You can also stop {% data variables.product.prodname_copilot_short %} from working on a task by clicking **Stop session** in the session logs.
## Further reading
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot)
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks)
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/troubleshooting-copilot-coding-agent#copilot-cant-create-a-pull-request-from-copilot-chat)

View File

@@ -0,0 +1,113 @@
---
title: Best practices for using Copilot to work on tasks
shortTitle: Best practices
intro: 'Learn how to get the best results from {% data variables.copilot.copilot_coding_agent %}.'
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=best+practices+for+using+copilot+to+work+on+tasks&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot
topics:
- Copilot
type: reference
redirect_from:
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/best-practices-for-using-copilot-to-work-on-issues
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/best-practices-for-using-copilot-to-work-on-tasks
---
{% data reusables.copilot.coding-agent.preview-note %}
## Making sure your issues are well-scoped
{% data variables.product.prodname_copilot %} provides better results when assigned clear, well-scoped tasks. An ideal task includes:
* A clear description of the problem to be solved or the work required.
* Complete acceptance criteria on what a good solution looks like (for example, should there be unit tests?).
* Directions about which files need to be changed.
If you pass a task to {% data variables.product.prodname_copilot_short %} by assigning an issue, it's useful to think of the issue you assign to {% data variables.product.prodname_copilot_short %} as a prompt. Consider whether the issue description is likely to work as an AI prompt, and will enable {% data variables.product.prodname_copilot_short %} to make the required code changes.
## Choosing the right type of tasks to give to {% data variables.product.prodname_copilot_short %}
As you work with {% data variables.product.prodname_copilot_short %}, you'll get a sense of the types of tasks it's best suited to work on. Initially, you might want to start by giving {% data variables.product.prodname_copilot_short %} simpler tasks, to see how it works as a coding agent. For example, you could start by asking {% data variables.product.prodname_copilot_short %} to fix bugs, alter user interface features, improve test coverage, update documentation, improve accessibility, or address technical debt.
Issues that you may choose to work on yourself, rather than assigning to {% data variables.product.prodname_copilot_short %}, include:
* **Complex and broadly scoped tasks**
* Broad-scoped, context-rich refactoring problems requiring cross-repository knowledge and testing
* Complex issues requiring understanding dependencies and legacy code
* Tasks that require deep domain knowledge
* Tasks that involve substantial business logic
* Large changes to a codebase requiring design consistency
* **Sensitive and critical tasks**
* Production-critical issues
* Tasks involving security, personally identifiable information, authentication repercussions
* Incident response
* **Ambiguous tasks**
* Tasks lacking clear definition: tasks with ambiguous requirements, open-ended tasks, tasks that require working through uncertainty to find a solution
* **Learning tasks**
* Tasks where the developer wants to learn to achieve a deeper understanding
## Using comments to iterate on a pull request
Working with {% data variables.product.prodname_copilot_short %} on a pull request is just like working with a human developer: it's common for the pull request to need further work before it can be merged. The process for getting the pull request to a mergeable state is exactly the same when the pull request is created by {% data variables.product.prodname_copilot_short %} as when it's created by a human. If you want, you can work on the feature branch yourself and push changes to the pull request. However, you can also just add comments to the pull request—explaining what you think is incorrect, or could be improved—and leave {% data variables.product.prodname_copilot_short %} to make the required changes.
{% data variables.product.prodname_copilot_short %} will read all comments as soon as they are submitted, and will decide whether they require action. It will then start to make any required changes, and will update the pull request when it's done. Because {% data variables.product.prodname_copilot_short %} starts looking at comments as soon as they are submitted, if you are likely to make multiple comments on a pull request it's best to batch them by clicking **Start a review**, rather than clicking **Add single comment**. You can then submit all of your comments at once, triggering {% data variables.product.prodname_copilot_short %} to work on your entire review, rather than working on individual comments separately.
## Adding custom instructions to your repository
By adding custom instructions to your repository, you can guide {% data variables.product.prodname_copilot_short %} on how to understand your project and how to build, test and validate its changes.
If {% data variables.product.prodname_copilot_short %} is able to build, test and validate its changes in its own development environment, it is more likely to produce good pull requests which can be merged quickly.
Add instructions to a `.github/copilot-instructions.md` file in the repository. For more information, see [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot?tool=webui).
Here is an example of an effective `copilot-instructions.md` file:
```markdown
This is a Go based repository with a Ruby client for certain API endpoints. It is primarily responsible for ingesting metered usage for GitHub and recording that usage. Please follow these guidelines when contributing:
## Code Standards
### Required Before Each Commit
- Run `make fmt` before committing any changes to ensure proper code formatting
- This will run gofmt on all Go files to maintain consistent style
### Development Flow
- Build: `make build`
- Test: `make test`
- Full CI check: `make ci` (includes build, fmt, lint, test)
## Repository Structure
- `cmd/`: Main service entry points and executables
- `internal/`: Logic related to interactions with other {% data variables.product.github %} services
- `lib/`: Core Go packages for billing logic
- `admin/`: Admin interface components
- `config/`: Configuration files and templates
- `docs/`: Documentation
- `proto/`: Protocol buffer definitions. Run `make proto` after making updates here.
- `ruby/`: Ruby implementation components. Updates to this folder should include incrementing this version file using semantic versioning: `ruby/lib/billing-platform/version.rb`
- `testing/`: Test helpers and fixtures
## Key Guidelines
1. Follow Go best practices and idiomatic patterns
2. Maintain existing code structure and organization
3. Use dependency injection patterns where appropriate
4. Write unit tests for new functionality. Use table-driven unit tests when possible.
5. Document public APIs and complex logic. Suggest changes to the `docs/` folder when appropriate
```
## Using the Model Context Protocol (MCP)
You can extend the capabilities of {% data variables.copilot.copilot_coding_agent %} by using MCP. This allows {% data variables.copilot.copilot_coding_agent %} use tools provided by local MCP servers. For more information, see [AUTOTITLE](/enterprise-cloud@latest/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp).
## Pre-installing dependencies in {% data variables.product.prodname_copilot %}'s environment
While working on a task, {% data variables.product.prodname_copilot_short %} has access to its own ephemeral development environment, powered by {% data variables.product.prodname_actions %}, where it can explore your code, make changes, execute automated tests and linters and more.
If {% data variables.product.prodname_copilot_short %} is able to build, test and validate its changes in its own development environment, it is more likely to produce good pull requests which can be merged quickly.
To do that, it will need your project's dependencies. {% data variables.product.prodname_copilot_short %} can discover and install these dependencies itself via a process of trial and error - but this can be slow and unreliable, given the non-deterministic nature of large language models (LLMs).
You can configure a `copilot-setup-steps.yml` file to pre-install these dependencies before the agent starts working so it can hit the ground running. For more information, see [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent#preinstalling-tools-or-dependencies-in-copilots-environment).

View File

@@ -0,0 +1,37 @@
---
title: Enabling Copilot coding agent
intro: 'You can allow {% data variables.product.prodname_copilot_short %} to work on code and raise pull requests.'
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=enabling+copilot+coding+agent&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot
topics:
- Copilot
type: how_to
redirect_from:
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/enabling-copilot-coding-agent-for-your-personal-repositories
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/enabling-copilot-coding-agent-for-your-personal-repositories
---
{% data reusables.copilot.coding-agent.preview-note %}
## Overview
{% data reusables.copilot.coding-agent.what-is %}
{% data variables.copilot.copilot_coding_agent %} is off by default and must be enabled before it is available for use.
## Enabling {% data variables.copilot.copilot_coding_agent %} for organizations
{% data reusables.copilot.coding-agent.enabling-for-orgs-and-enterprises %}
## Enabling {% data variables.copilot.copilot_coding_agent %} for your personal repositories
If you want {% data variables.copilot.copilot_coding_agent %} to be available in repositories owned by your own personal account, you must enable it in your account settings. See [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/managing-your-copilot-plan/managing-copilot-policies-as-an-individual-subscriber#enabling-or-disabling-copilot-coding-agent).
## Further reading
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks)
* [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent)
* [AUTOTITLE](/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent)
* [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp)
* [AUTOTITLE](/copilot/rolling-out-github-copilot-at-scale/enabling-developers/using-copilot-coding-agent-in-org)

View File

@@ -0,0 +1,19 @@
---
title: Using Copilot to work on tasks
intro: 'Find out how {% data variables.product.prodname_copilot_short %} can work on {% data variables.product.github %} issues and raise pull requests for your to review.'
versions:
feature: copilot
topics:
- Copilot
children:
- /about-assigning-tasks-to-copilot
- /best-practices-for-using-copilot-to-work-on-tasks
- /enabling-copilot-coding-agent
- /using-copilot-to-work-on-an-issue
- /asking-copilot-to-create-a-pull-request
- /reviewing-a-pull-request-created-by-copilot
- /using-the-copilot-coding-agent-logs
- /troubleshooting-copilot-coding-agent
redirect_from:
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues
---

View File

@@ -0,0 +1,61 @@
---
title: Reviewing a pull request created by Copilot
shortTitle: Reviewing Copilot PRs
intro: 'After {% data variables.product.prodname_copilot_short %} creates a pull request you should review it and comment on anything that needs changes.'
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=reviewing+a+pull+request+created+by+copilot&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot
topics:
- Copilot
type: how_to
---
{% data reusables.copilot.coding-agent.preview-note %}
## Reviewing {% data variables.product.prodname_copilot_short %}'s changes
After {% data variables.product.prodname_copilot_short %} has finished working on a coding task, and has requested a pull request review from you, you should review {% data variables.product.prodname_copilot_short %}'s work thoroughly before merging the pull request.
> [!IMPORTANT]
> If you have the "Required reviews" rule or branch protection enabled, you won't be able to approve pull requests that you initiated by assigning the related issue to {% data variables.product.prodname_copilot_short %}. Someone else must approve the pull request before it can be merged.
You can ask {% data variables.product.prodname_copilot_short %} to make changes using pull request comments, or you can check out {% data variables.product.prodname_copilot_short %}'s branch and make changes yourself.
> [!TIP]
> We recommend you batch your review comments instead of submitting them individually.
When you leave a comment on {% data variables.product.prodname_copilot_short %}'s pull request, {% data variables.product.prodname_copilot_short %} will consider your comment, and decide whether to start a new agent session to respond.
If {% data variables.product.prodname_copilot_short %} starts a new agent session in response to your comment, {% data variables.product.prodname_copilot_short %} will react with 👀, and a "Copilot has started work" event will appear in the pull request timeline.
![Screenshot of a pull request timeline with a review comment with the eyes reaction and a "Copilot started work" timeline event.](/assets/images/help/copilot/coding-agent/comment-to-agent-on-pr.png)
{% data variables.product.prodname_copilot_short %} may ignore a comment if it considers that the comment was not intended for it. If you are sure that you want {% data variables.product.prodname_copilot_short %} to respond to your comment, you can @mention {% data variables.product.prodname_copilot_short %} by including `@copilot` in your comment.
> [!TIP]
> If you don't want {% data variables.product.prodname_copilot_short %} to respond to comments on a pull request, you can unassign {% data variables.product.prodname_copilot_short %} from the pull request. If you later reassign {% data variables.product.prodname_copilot_short %} to the same pull request it will respond to new comments and push more changes. It will not respond to comment that were added while it was not assigned.
For more information, see the section "Use comments to iterate on a pull request" in [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks#using-comments-to-iterate-on-a-pull-request).
## Managing {% data variables.product.prodname_actions %} workflow runs
{% data variables.product.prodname_actions %} workflows will not run automatically when {% data variables.product.prodname_copilot_short %} pushes changes to a pull request.
{% data variables.product.prodname_actions %} workflows can be privileged and have access to sensitive secrets, so you should review code written by {% data variables.product.prodname_copilot_short %} before allowing workflows to run.
To allow {% data variables.product.prodname_actions %} workflows to run, click the **Approve and run workflows** button in the pull request's merge box.
![Screenshot of the merge box on a pull request from Copilot with the "Approve and run workflows" button.](/assets/images/help/copilot/coding-agent/approve-and-run-workflows.png)
## Giving feedback on {% data variables.product.prodname_copilot_short %}'s work
You can provide feedback on {% data variables.product.prodname_copilot_short %}'s work using the feedback buttons on {% data variables.product.prodname_copilot_short %}'s pull requests and comments. We use your feedback to improve the product and the quality of {% data variables.product.prodname_copilot_short %}'s solutions.
1. On a pull request or comment from {% data variables.product.prodname_copilot_short %}, click the thumbs up (:+1:) or thumbs down (:-1:) button.
1. If you click the thumbs down button, you're asked to provide additional information. You can, optionally, pick the reason for your negative feedback and leave a comment before clicking **Submit feedback**.
## Further reading
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks)
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/using-the-copilot-coding-agent-logs)
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/troubleshooting-copilot-coding-agent)

View File

@@ -0,0 +1,99 @@
---
title: Troubleshooting Copilot coding agent
shortTitle: Troubleshooting
intro: 'Learn how to resolve problems that may occur when you assign tasks to {% data variables.product.prodname_copilot_short %}.'
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=troubleshooting+copilot+coding+agent&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot
topics:
- Copilot
type: reference
redirect_from:
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/troubleshooting-copilot-coding-agent
---
{% data reusables.copilot.coding-agent.preview-note %}
## {% data variables.product.prodname_copilot_short %} is not available in the "Assignees" list on my issue
You can only assign issues to {% data variables.product.prodname_copilot_short %} if you have access to {% data variables.product.prodname_copilot_short %} through either the **{% data variables.product.prodname_copilot_pro_plus %}** plan or the **{% data variables.product.prodname_copilot_enterprise %}** plan.
If you do not already have a subscription for one of these plans, click this button for more information:<br>
<a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=troubleshooting+copilot+coding+agent&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>
If you _do_ have either {% data variables.product.prodname_copilot_pro_plus %} or {% data variables.product.prodname_copilot_enterprise %}, check that {% data variables.copilot.copilot_coding_agent %} {% ifversion ghec %}is enabled and{% endif %} has been made available for the repository:
{% ifversion ghec %}
* If you are on the {% data variables.product.prodname_copilot_enterprise_short %} plan, your ability to use {% data variables.copilot.copilot_coding_agent %} is controlled at the enterprise level. See [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/adding-copilot-coding-agent-to-enterprise).
{% endif %}
* For organization-owned repositories, the availability of {% data variables.copilot.copilot_coding_agent %} in the repository is configured in the settings for the organization. See [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/adding-copilot-coding-agent-to-organization).
* For personal repositories, the availability of {% data variables.copilot.copilot_coding_agent %} in the repository is configured in your account settings. See [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/managing-your-copilot-plan/managing-copilot-policies-as-an-individual-subscriber#enabling-or-disabling-copilot-coding-agent).
> [!NOTE]
> You can check whether {% data variables.copilot.copilot_coding_agent %} has been enabled for you in the features page of your {% data variables.product.prodname_copilot_short %} settings: [github.com/settings/copilot/features](https://github.com/settings/copilot/features).
## {% data variables.product.prodname_copilot_short %} can't create a pull request from {% data variables.product.prodname_copilot_chat_short %}
If you asked {% data variables.product.prodname_copilot_short %} to create a pull request and it responds that it cannot directly create a pull request, check that {% data variables.copilot.copilot_coding_agent %} is available.
> [!IMPORTANT]
> {% data reusables.copilot.coding-agent.use-chat-participant-in-vsc %}
## I assigned an issue to {% data variables.product.prodname_copilot_short %}, but nothing is happening
Wait a while, then refresh the page. You should see {% data variables.product.prodname_copilot_short %} leave an 👀 reaction on the issue. Shortly after this, {% data variables.product.prodname_copilot_short %} will open a draft pull request linked to the issue, which will be shown in the issue timeline.
## {% data variables.product.prodname_copilot_short %} has opened a pull request, but nothing is happening
If there is a "{% data variables.product.prodname_copilot_short %} started work" event in the pull request timeline, click **View session** to see the session logs. These will stream live, and you will be able to see what {% data variables.product.prodname_copilot_short %} is doing.
## {% data variables.product.prodname_copilot_short %} won't respond to my pull request comments
When you leave a pull request comment on a pull request that is assigned to {% data variables.product.prodname_copilot_short %}, {% data variables.product.prodname_copilot_short %} will consider your comment, and decide whether to start a new agent session to respond.
If {% data variables.product.prodname_copilot_short %} decides to take action and start a new agent session in response to your comment, it will leave an 👀 reaction on the comment, and then a "{% data variables.product.prodname_copilot_short %} started work" event will appear in the pull request timeline.
If this doesn't happen, you may have unassigned {% data variables.product.prodname_copilot_short %} from the pull request, or {% data variables.product.prodname_copilot_short %} may have decided that your comment is not actionable.
Check that {% data variables.product.prodname_copilot_short %} is assigned to the pull request. If it is, you can force {% data variables.product.prodname_copilot_short %} to respond to your comment by @mentioning {% data variables.product.prodname_copilot_short %} in the comment with `@copilot`.
## Based on the agent session logs, {% data variables.product.prodname_copilot_short %} appears to be stuck
{% data variables.product.prodname_copilot_short %} can appear to be stuck for a while, and then get moving again.
If the session remains stuck, it will time out after an hour. You can retry by unassigning the issue and then reassigning it to {% data variables.product.prodname_copilot_short %}.
If {% data variables.product.prodname_copilot_short %} got stuck while responding to a comment, try adding the same comment to the pull request again.
## My {% data variables.product.prodname_actions %} workflows are not running when Copilot pushes
{% data variables.product.prodname_actions %} workflows will not run automatically when {% data variables.product.prodname_copilot_short %} pushes changes to a pull request.
To allow {% data variables.product.prodname_actions %} workflows to run, click the **Approve and run workflows** button in the pull request's merge box. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/using-copilot-to-work-on-an-issue#allowing-github-actions-workflows-to-run-when-copilot-pushes-changes).
## {% data variables.product.prodname_copilot_short %} is pushing changes which don't pass my CI checks
While working on an issue, {% data variables.product.prodname_copilot_short %} has access to its own ephemeral development environment, powered by {% data variables.product.prodname_actions %}, where it can execute automated tests and linters to validate its work before it pushes.
It is most likely to do this if given clear instructions on what to do. The best way to do this is with a `.github/copilot-instructions.md` file. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks#adding-custom-instructions-to-your-repository).
## There is a warning from {% data variables.product.prodname_copilot %} about the firewall
By default, {% data variables.product.prodname_copilot_short %}'s access to the internet is limited by a firewall.
Limiting access to the internet helps to manage data exfiltration risks, where surprising behavior from {% data variables.product.prodname_copilot_short %} or malicious instructions given to it could lead to code or other sensitive information being leaked to remote locations.
If {% data variables.product.prodname_copilot_short %} tries to make a request which is blocked by the firewall, a warning is added to the pull request body (if {% data variables.product.prodname_copilot_short %} is responding to an issue assignment) or to a comment (if {% data variables.product.prodname_copilot_short %} is responding to a comment). The warning shows the blocked address and the command that tried to make the request.
![Screenshot of a warning from {% data variables.product.prodname_copilot_short %} about being blocked by the firewall.](/assets/images/help/copilot/coding-agent/firewall-warning.png)
For more information, see [AUTOTITLE](/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent).
## Further reading
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks)
* [AUTOTITLE](/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent)

View File

@@ -0,0 +1,147 @@
---
title: Using Copilot to work on an issue
intro: 'Learn how to assign issues to {% data variables.product.prodname_copilot %}, monitor progress as {% data variables.product.prodname_copilot_short %} works on the issue, and then use pull request review comments to prompt {% data variables.product.prodname_copilot_short %} to iterate on its work.'
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=using+copilot+to+work+on+an+issue&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot
topics:
- Copilot
type: how_to
redirect_from:
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/using-copilot-to-work-on-an-issue
---
{% data reusables.copilot.coding-agent.preview-note %}
## Introduction
You can assign a {% data variables.product.github %} issue to {% data variables.product.prodname_copilot_short %}, just like you would with a human software developer. {% data variables.product.prodname_copilot_short %} will start working on the issue, raise a pull request and when it's finished working, request a review from you. For more information, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
If you haven't used {% data variables.product.prodname_copilot_short %} to work on an issue before, you can find some useful advice for getting good results in [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks).
## Assigning an issue to {% data variables.product.prodname_copilot_short %}
You can ask {% data variables.product.prodname_copilot_short %} to start working on an issue by assigning the issue to {% data variables.product.prodname_copilot_short %}.
You can assign an issue to {% data variables.product.prodname_copilot_short %}:
* On {% data variables.product.prodname_dotcom_the_website %} (see the [next section](#assigning-an-issue-to-copilot-on-githubcom))
* Via the {% data variables.product.github %} API (see [later in this article](#assigning-an-issue-to-copilot-via-the-github-api))
* From the beta version of {% data variables.product.prodname_mobile %} ([Join iOS TestFlight](https://testflight.apple.com/join/NLskzwi5) or [Join Google Play Beta](https://play.google.com/apps/testing/com.github.android))
* Using {% data variables.product.prodname_cli %} (see [`gh issue edit`](https://cli.github.com/manual/gh_issue_edit))
### Assigning an issue to {% data variables.product.prodname_copilot_short %} on {% data variables.product.prodname_dotcom_the_website %}
You can assign an issue to {% data variables.product.prodname_copilot_short %} on {% data variables.product.prodname_dotcom_the_website %} in exactly the same way as you assign another user.
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-issues %}
1. Open the issue that you want to assign to {% data variables.product.prodname_copilot_short %}.
1. In the right side menu, click **Assignees**.
![Screenshot of the right sidebar of an issue. A header, labeled "Assignees", is outlined in dark orange.](/assets/images/help/issues/assignee-menu.png)
1. Click **Copilot** from assignees list.
![Screenshot of "Assignees" window on an issue. Copilot is available in the list.](/assets/images/help/copilot/coding-agent/assign-to-copilot.png)
> [!TIP]
> When you assign an issue to {% data variables.product.prodname_copilot_short %}, it gets sent the issue title, description, and any comments that currently exist. After assigning the issue, {% data variables.product.prodname_copilot_short %} will not be aware of, and therefore won't react to, any further comments that are added to the issue. If you have more information, or changes to the original requirement, add this as a comment in the pull request that {% data variables.product.prodname_copilot_short %} raises.
You can also assign issues to {% data variables.product.prodname_copilot_short %} from other places on {% data variables.product.prodname_dotcom_the_website %}:
* From the list of issues on a repository's **{% octicon "issue-opened" aria-hidden="true" %} Issues** page.
* When viewing an issue in {% data variables.product.github %} {% data variables.projects.projects_v2_caps %}.
### Assigning an issue to {% data variables.product.prodname_copilot_short %} via the {% data variables.product.github %} API
You can assign an issue to {% data variables.product.prodname_copilot_short %} by making a request to the GraphQL API.
1. Make sure you're authenticating with the API using a user token, for example a {% data variables.product.pat_generic %} or a {% data variables.product.prodname_github_app %} user-to-server token.
1. Verify that {% data variables.copilot.copilot_coding_agent %} is enabled in the repository by checking if the repository's `suggestedActors` in the GraphQL API includes {% data variables.product.prodname_copilot_short %}. Replace `monalisa` with the repository owner, and `octocat` with the name.
```graphql copy
query {
repository(owner: "monalisa", name: "octocat") {
suggestedActors(capabilities: [CAN_BE_ASSIGNED], first: 100) {
nodes {
login
__typename
... on Bot {
id
}
... on User {
id
}
}
}
}
}
```
If {% data variables.copilot.copilot_coding_agent %} is enabled for the user and in the repository, the first node returned from the query will have the `login` value `copilot-swe-agent`.
1. Fetch the GraphQL global ID of the issue you want to assign to {% data variables.product.prodname_copilot_short %}, replacing `monalisa` with the repository owner, `octocat` with the name and `9000` with the issue number.
```graphql copy
query {
repository(owner: "monalisa", name: "octocat") {
issue(number: 9000) {
id
title
}
}
}
```
1. Assign the issue to {% data variables.product.prodname_copilot_short %} using the `replaceActorsForAssignable` GraphQL mutation. Replace `ISSUE_ID` with the ID returned from the previous step, and `BOT_ID` with the ID returned from the step before that.
```graphql copy
mutation {
replaceActorsForAssignable(input: {assignableId: "ISSUE_ID", assigneeIds: ["BOT_ID"]}) {
assignable {
... on Issue {
id
title
assignees(first: 10) {
nodes {
login
}
}
}
}
}
}
```
## Tracking {% data variables.product.prodname_copilot_short %}'s progress on your issue
Shortly after you assign an issue to {% data variables.product.prodname_copilot_short %}, {% data variables.product.prodname_copilot_short %} will leave an 👀 reaction on the issue.
![Screenshot of an issue assigned to {% data variables.product.prodname_copilot_short %}. {% data variables.product.prodname_copilot_short %} has left an eyes icon reaction.](/assets/images/help/copilot/coding-agent/issue-assigned-to-copilot.png)
A few seconds later, {% data variables.product.prodname_copilot_short %} will open a draft pull request, linked to your original issue. An event will appear in the issue's timeline, linking to the pull request.
![Screenshot of an issue with a timeline event showing that a linked pull request has been opened.](/assets/images/help/copilot/coding-agent/issue-link-to-pr.png)
{% data variables.product.prodname_copilot_short %} will start an **agent session** to work on your issue. A "{% data variables.product.prodname_copilot_short %} started work" event will appear in the pull request timeline, and as {% data variables.product.prodname_copilot_short %} works, it will update the pull request body with regular status updates, and push commits to the branch.
![Screenshot of a pull request with a series of timeline events, including "Copilot started work."](/assets/images/help/copilot/coding-agent/copilot-started-work.png)
If you want to check what {% data variables.product.prodname_copilot_short %} is doing, click **View session**. The session log viewer is displayed, showing you a live log as {% data variables.product.prodname_copilot_short %} works on the issue. If you want to stop {% data variables.product.prodname_copilot_short %} from working on the issue, click **Stop session**. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/using-the-copilot-coding-agent-logs).
Once {% data variables.product.prodname_copilot_short %} has finished, the agent session will end, and {% data variables.product.prodname_copilot_short %} will request a review from you, triggering a notification. In addition, a "{% data variables.product.prodname_copilot_short %} finished work" event will appear in the pull request timeline.
![Screenshot of a pull request timeline with "Copilot requested review" and "Copilot finished work" events.](/assets/images/help/copilot/coding-agent/copilot-finished-work.png)
## Working with {% data variables.product.prodname_copilot_short %} on a pull request
After {% data variables.product.prodname_copilot_short %} has finished working on the issue, you should review the pull request thoroughly and comment on anything that needs changed. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/reviewing-a-pull-request-created-by-copilot).
## Further reading
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks)
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/troubleshooting-copilot-coding-agent)

View File

@@ -0,0 +1,47 @@
---
title: Using the Copilot coding agent logs
shortTitle: Using the Copilot logs
intro: "You can use the session logs to understand {% data variables.product.prodname_copilot_short %}'s approach"
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=using+the+copilot+coding+agent+logs&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
versions:
feature: copilot
topics:
- Copilot
type: how_to
---
{% data reusables.copilot.coding-agent.preview-note %}
## Introduction
After you assign an issue to {% data variables.product.prodname_copilot_short %}, or use {% data variables.product.prodname_copilot_chat_short %} to ask {% data variables.product.prodname_copilot_short %} to create a pull request, {% data variables.product.prodname_copilot_short %} works autonomously to complete the task. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
During or after an agent session, you can inspect the session logs to understand {% data variables.product.prodname_copilot_short %}'s approach to your problem.
## Using the session logs to understand {% data variables.product.prodname_copilot_short %}'s approach
To view the session logs, click **View session** in the pull request timeline.
![Screenshot of a section of a pull request with the 'View session' button highlighted.](/assets/images/help/copilot/coding-agent/log-view-session.png)
In the session logs, you can see {% data variables.product.prodname_copilot_short %}'s internal monologue and the tools it used to understand your repository, make changes and validate its work.
> [!NOTE]
> {% data variables.product.prodname_copilot_short %} has its own development environment, including the ability to run automated tests and linters, to validate its changes before it pushes.
## Stopping a {% data variables.product.prodname_copilot_short %} session
You can stop {% data variables.product.prodname_copilot_short %} from continuing to work on a task by clicking **Stop session** in the session log viewer.
![Screenshot of the log viewer with the 'Stop session' button highlighted.](/assets/images/help/copilot/coding-agent/log-stop-session.png)
Reasons you might want to stop a session include:
* {% data variables.product.prodname_copilot_short %} appears to be going in a wrong direction, and you want to stop it and give it more clarity.
* You made a mistake in your description of the required work, and you've decided to start over.
* You've realized that the change you asked for doesn't need to be made, so you want to stop {% data variables.product.prodname_copilot_short %} from doing any more work on it.
## Further reading
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks)
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/troubleshooting-copilot-coding-agent)

View File

@@ -0,0 +1,73 @@
---
title: Using GitHub Copilot to create issues
shortTitle: Use Copilot to create issues
intro: 'Use {% data variables.product.prodname_copilot_short %} to quickly generate structured, high-quality issues from natural language or images, without filling out every field manually.'
versions:
feature: copilot
topics:
- Copilot
- Issues
- Project management
---
> [!NOTE]
> This feature is in {% data variables.release-phases.public_preview %} and subject to change.
Creating issues manually can be repetitive and time-consuming. With {% data variables.product.prodname_copilot_short %}, you can create issues faster by prompting in natural language, or even by uploading a screenshot. {% data variables.product.prodname_copilot_short %} fills out the title, body, labels, assignees, and more, using your repositorys templates and structure.
You stay in control: review and refine what {% data variables.product.prodname_copilot_short %} suggests, or make changes directly in the issue form.
## Creating an issue with {% data variables.product.prodname_copilot_short %}
You can create issues from {% data variables.product.prodname_copilot_chat_short %}'s immersive view.
1. Go to the immersive view of {% data variables.product.prodname_copilot_chat_short %} ([https://github.com/copilot](https://github.com/copilot)).
1. At the bottom of the page, in the "Ask {% data variables.product.prodname_copilot_short %}" box, describe what you want to file. Specify the repository you would like to create your issue in using the org/repository format. If you do not specify a repository, {% data variables.product.prodname_copilot_short %} will infer the repository based on the repository you last created an issue in. You can try:
* "Create a feature request to add fuzzy matching to search."
* "Log a bug for a 500 error when submitting the login form."
* "Create a task and add a label for needs design review."
> [!NOTE] You can only use {% data variables.product.prodname_copilot_short %} to create issues in repositories where you already have permission to create issues. This feature doesn't change your access or bypass repository permissions.
1. Or, you can use one of the following methods to include an image in your prompt:
* Copy an image and paste it into the prompt box at the bottom of the page.
* Click {% octicon "paperclip" aria-label="Add attachment" %} in the prompt box, then click **Image**. Browse to the image file you want to attach, select it and click **Open**.
* Drag and drop an image file from your operating system's file explorer into the prompt box.
After you paste or upload the image, you can add text to your prompt, for example: "Create an issue because this error appears when trying to reset a password."
1. {% data variables.product.prodname_copilot_short %} will draft an issue that includes:
* A suggested title.
* A formatted body (based on your repositorys template)
Based on your prompt, {% data variables.product.prodname_copilot_short %} will also suggest metadata such as labels, assignee, and issue type.
1. Review the draft. You can:
* Edit any part of the issue manually.
* Ask {% data variables.product.prodname_copilot_short %} to make changes with a follow-up prompt.
* Switch templates without losing your input.
1. Once the issue looks good, click **Create**.
{% data variables.product.prodname_copilot_short %} tailors its suggestions based on the repository where you're creating the issue. It selects the most relevant template for your prompt and applies associated metadata, like labels or issue type. If you choose a different template, {% data variables.product.prodname_copilot_short %} automatically reformats the content to match the new structure.
## Creating multiple issues at once
If your prompt includes multiple tasks or bugs, {% data variables.product.prodname_copilot_short %} can draft more than one issue at a time.
Each draft appears separately, and you can review and edit them individually. To publish the issues, click **Create** on each one you want to submit.
## Assigning issues to {% data variables.product.prodname_copilot_short %}
If the {% data variables.copilot.copilot_coding_agent %} is enabled for the repository, you can assign the issue to {% data variables.product.prodname_copilot_short %}, and it will get to work on it right away.
You can assign the issue during creation in one of two ways:
* **Natural language:** Prompt {% data variables.product.prodname_copilot_short %} with something like “Assign this issue to {% data variables.product.prodname_copilot_short %}."
* **Manually:** Select "{% data variables.product.prodname_copilot_short %}" from the assignee list.
Once the issue is assigned and created, {% data variables.product.prodname_copilot_short %} will start working on it automatically. Youll see a 👀 emoji reaction on the issue to indicate that {% data variables.product.prodname_copilot_short %} is working on it.

View File

@@ -0,0 +1,64 @@
---
title: About GitHub Models
intro: '{% data variables.product.prodname_github_models %} is a suite of developer tools that take you from AI idea to ship, including a model catalog, prompt management, and quantitative evaluations.'
versions:
feature: github-models
shortTitle: About GitHub Models
topics:
- GitHub Models
---
{% data reusables.models.models-preview-note %}
## Overview
{% data variables.product.prodname_github_models %} is a workspace lowering the barrier to enterprise-grade AI adoption. It helps you move beyond isolated experimentation by embedding AI development directly into familiar GitHub workflows. {% data variables.product.prodname_github_models %} provides tools to test large language models (LLMs), refine prompts, evaluate outputs, and make informed decisions based on structured metrics. To get started, see [AUTOTITLE](/github-models/use-github-models/optimizing-your-ai-powered-app-with-github-models).
## Capabilities
GitHub Models offers a set of features to support prompt iteration, evaluation, and integration for AI development.
* **Prompt development**: Start AI development directly in a structured editor that supports system instructions, test inputs, and variable configuration.
* **Model comparison**: Test multiple models side by side with identical prompts and inputs to experiment with different outputs.
* **Evaluators**: Use scoring metrics such as similarity, relevance, and groundedness to analyze outputs and track performance.
* **Prompt configurations**: Save prompt, model, and parameter settings as `.prompt.yml` files in your repository. This enables review, collaboration, and reproducibility.
* **Production integration**: Use your saved configuration to build AI features or connect through SDKs and{% ifversion fpt %} the [{% data variables.product.prodname_github_models %} REST API](/rest/models?apiVersion=2022-11-28). {% else %} APIs. {% endif %}
## Enabling GitHub Models
There are a few ways you can start using {% data variables.product.prodname_github_models %}, depending on your role and needs.
To use the {% data variables.product.prodname_github_models %} API, see [Experimenting with AI models using the API](/github-models/use-github-models/prototyping-with-ai-models#experimenting-with-ai-models-using-the-api).
### For individuals
To use {% data variables.product.prodname_github_models %}, create a new GitHub repository or open an existing one. In the repository settings, click **Models** in the sidebar and enable the feature.
### For organizations and enterprises
To use {% data variables.product.prodname_github_models %} in your organization, an enterprise owner must first enable the feature. Organization owners can then configure which models are allowed.
See [AUTOTITLE](/github-models/github-models-at-scale/manage-models-at-scale).
## Prompts
Manage your prompt configurations stored in the repository. Each prompt is saved as a `.prompt.yml` file, which defines the model, parameters, and test inputs. From here, you can create, edit, and organize prompts to support experimentation or production use.
## Comparisons
Use the Comparisons view to evaluate the outputs of multiple prompt configurations in a consistent, test-driven workflow. Run tests across rows of input data and view evaluator scores for each configuration, such as similarity, relevance, and groundedness. This view is ideal for refining prompts, validating changes, and avoiding regressions.
## Playground
Use the Playground to quickly explore models and test prompt ideas in real time. The Playground is ideal for early experimentation, helping you understand a models behavior, capabilities, and response style. You can interactively select models, adjust parameters, and compare responses side by side.
## Join the community
To ask questions and share feedback, see this [GitHub Models discussion post](https://github.com/orgs/community/discussions/159087).
To learn how others are using {% data variables.product.prodname_github_models %}, visit the [GitHub Community discussions for Models](https://github.com/orgs/community/discussions/categories/models).
## Further reading
* [AUTOTITLE](/github-models/use-github-models/prototyping-with-ai-models)
* [AUTOTITLE](/github-models/use-github-models/optimizing-your-ai-powered-app-with-github-models)
* [AUTOTITLE](/github-models/use-github-models/evaluating-ai-models)

View File

@@ -0,0 +1,9 @@
---
title: GitHub Models at scale
intro: 'Manage {% data variables.product.prodname_github_models %} in your enterprise and organizations.'
versions:
feature: github-models
children:
- /use-models-at-scale
- /manage-models-at-scale
---

View File

@@ -0,0 +1,50 @@
---
title: Managing your team's model usage
shortTitle: Manage Models at scale
intro: Control and secure AI models in your organization with {% data variables.product.prodname_github_models %}.
versions:
feature: github-models
permissions: Organization owners can manage the models used in an organization
topics:
- Enterprise
allowTitleToDifferFromFilename: true
---
{% data reusables.models.models-preview-note %}
## Why restrict model usage in your organization?
Limiting the models available to your developers can help **control spend on models and meet your governance, data security, and compliance requirements**.
If you don't manage access, your teams may inadvertently use models that do not meet your organizations standards, leading to potential risks such as:
* Unexpected costs from high-priced models
* Security or compliance issues caused by unauthorized AI services
* Time wasted integrating unapproved or suboptimal models
For more information about using models at scale, see [AUTOTITLE](/github-models/github-models-at-scale/use-models-at-scale).
## Exceptions to your organization's model settings
While {% data variables.product.prodname_github_models %} for organizations and repositories is in public preview, some of your organization's model settings are not applied in certain circumstances. Your teams will be able to use AI models without limitation in the following places:
* {% data variables.product.prodname_emus %} organizations
* {% data variables.product.prodname_github_models %} extension for {% data variables.product.prodname_cli %}
* {% data variables.product.prodname_github_models %} extension for {% data variables.product.prodname_copilot_chat %}
* {% data variables.product.prodname_github_models %} VS Code extension
* Playground for {% data variables.product.prodname_github_models %} in the {% data variables.product.prodname_marketplace %} at https://github.com/marketplace/models.
## Enabling {% data variables.product.prodname_github_models %} for an enterprise
{% data reusables.models.prereq-enable-models-in-enterprise %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.models-policies %}
1. Under "Models", in the "Models in your enterprise" section, click {% octicon "chevron-down" aria-label="the down arrow" %} beside **Disabled** and select **Enabled** from the dropdown.
## Controlling model usage in your organization
{% data reusables.models.enterprise-change-models-settings %}
{% data reusables.models.enable-select-models-in-org %}

View File

@@ -0,0 +1,179 @@
---
title: Using {% data variables.product.prodname_github_models %} to develop AI-powered applications in your enterprise
shortTitle: Use Models at scale
intro: Streamline AI development in your enterprise.
versions:
feature: github-models
permissions: 'Organization owners and enterprise owners'
topics:
- Enterprise
- AI
- GitHub Models
allowTitleToDifferFromFilename: true
---
{% data reusables.models.models-preview-note %}
{% data variables.product.prodname_github_models %} allows your developers to build AI-powered applications at scale while your enterprise maintains control, compliance, and cost efficiency.
## Why {% data variables.product.prodname_github_models %}?
* **Centralized model management:** Control which AI models and providers are available to developers across your organization.
* **AI development at speed:** Quickly prototype, evaluate, and optimize prompts and models.
* **Governance and compliance controls:** Enforce your organization's standards and monitor model usage.
* **Cost optimization:** Avoid unexpected costs from high-priced models.
* **Collaboration:** Share prompts and results using standard {% data variables.product.github %} development practices.
* **Security-focused architecture:** Rest assured that your data remains within {% data variables.product.github %} and Azure and is not shared with model providers.
* **Visual interface:** Allow non-technical team members to contribute alongside developers.
* **API access:** Use the {% data variables.product.prodname_github_models %} REST API to automate and integrate with enterprise workflows.
* **Version control:** All prompt and model changes go through a standard {% data variables.product.github %} commit and pull request flow so you know when and why a prompt changed.
See [AUTOTITLE](/github-models/about-github-models).
## Best practices for using {% data variables.product.prodname_github_models %} at scale
### Compare and evaluate AI models for governance and compliance
Review and compare available AI models against your companys governance, data security, and compliance requirements. You can do this in any Models-enabled {% data variables.product.github %} repository or in the {% data variables.product.prodname_github_models %} catalog from the {% data variables.product.prodname_marketplace %} at https://github.com/marketplace?type=models. Your considerations may include:
* **Governance and security:** Examine each model's compliance with standards and regulations such as GDPR, SOC 2, and ISO 27001, and ensure data is not persisted outside of your organization unless explicitly logged with consent.
* **Model performance:** Run benchmark evaluations on your internal datasets to assess reasoning, context retention, and hallucination rates.
* **API control and visibility:** Require fine-grained controls over usage quotas, prompt inspection, and rate limits at a team or organization level.
* **Cost optimization:** Include token pricing, inference speed, and the availability of model variants for tiered use. For example, you can use cheaper models for test case generation compared to advanced models for architecture discussions.
Once you have decided which models you want to use, you can limit access in your organization to only those models, see [AUTOTITLE](/github-models/github-models-at-scale/manage-models-at-scale).
### Optimize and share prompts across teams
Your developers can use the prompt editor in {% data variables.product.prodname_github_models %} to create and refine prompts. Teams can experiment with different prompt variations and models in a stable, non-production environment that integrates with {% data variables.product.github %} development workflows. The visual interface allows non-technical stakeholders to contribute alongside developers. See [Using the prompt editor](/github-models/use-github-models/prototyping-with-ai-models#using-the-prompt-editor).
The lightweight evaluation tooling allows your team to compare results across common metrics like latency, relevance, and groundedness, or you can create custom evaluators. Compare prompt and model performance for your specific generative AI use cases, such as creating code, tests, documentation, or code review suggestions.
As your team creates effective prompts, they can save them as YAML files and share them for review using {% data variables.product.github %} pull requests. Committed prompts are accessible to other teams and workflows and can be kept consistent with your company's standards. This centralized and collaborative approach to prompt management accelerates development and can help you enforce best practices across your organization.
### Evaluate and optimize model usage costs
As adoption of your AI-powered application grows and AI models improve, use {% data variables.product.prodname_github_models %} to evaluate the cost and performance of different models and model updates. Select the most cost-effective options for your organization's needs and manage expenses as usage scales across multiple teams.
### Use the {% data variables.product.prodname_github_models %} REST API or extensions for programmatic management
To more efficiently manage resources across all teams, you can leverage the {% data variables.product.prodname_github_models %} REST API to:
* **Manage and update organization settings:** Programmatically update model access permissions and governance settings across multiple teams at once, to ensure consistency and compliance.
* **List and retrieve prompts:** List, retrieve, and audit prompts used by different teams, to monitor usage, share successful prompts, and maintain a central repository of best practices.
* **Run model inference requests:** Run inference requests for specific models and parameters such as frequency penalty, maximum tokens, response format, and presence penalty.
You can also use these extensions to run inference requests and manage prompts:
* {% data variables.product.prodname_github_models %} extension for {% data variables.product.prodname_cli %}
* {% data variables.product.prodname_github_models %} extension for {% data variables.product.prodname_copilot_chat %}
* {% data variables.product.prodname_github_models %} VS Code extension
### Monitor, iterate, and integrate
With built-in governance features, you can monitor model usage and ensure ongoing compliance with company policies. Audit logs provide visibility into who accessed or modified models and prompts. The {% data variables.product.prodname_github_models %} repository integration allows all stakeholders to collaborate and continuously iterate on AI-powered applications.
## Example: Use {% data variables.product.prodname_github_models %} with {% data variables.product.prodname_actions %} to summarize issues
Large software development projects often contain issues full of technical details. You can roll out AI-powered issue summaries using {% data variables.product.prodname_github_models %} and {% data variables.product.prodname_actions %}.
**Prerequisite:** Enable {% data variables.product.prodname_github_models %} in your organization, and set the models and publishers you want to make available to individual repositories.
1. **Create a prompt in a repository**
In the "Models" tab of a repository, create a prompt using the prompt editor.
Example system prompt:
> You are a summarizer of GitHub issues. Emphasize key technical points or important questions.
Example user prompt:
> Summarize this issue - {% raw %}{{input}}{% endraw %}
1. **Run and iterate on your prompt**
Run your prompt. Provide some sample issue content in the "Variables" pane as the value of `{% raw %}{{input}}{% endraw %}`.
Try different models (for example, OpenAI GPT-4o) and compare results. Adjust parameters such as max tokens and temperature. Iterate until you are satisfied with the results.
1. **Optionally, run more extensive tests**
The "Compare" view allows you to run multiple of your prompt against different models simultaneously and see how the results compare in a grid view. You can also define and use evaluators to ensure that the results contain certain keywords or meet other standards.
1. **Commit your prompt**
Name your prompt and commit changes to go through the pull request flow. For example, if you name your prompt `summarize`, you'll get a `summarize.prompt.yaml` file at the root level of your repository that looks something like this:
```yaml
messages:
- role: system
content: >-
You are a summarizer of GitHub issues. Emphasize key technical points or
important questions.
- role: user
content: 'Summarize this issue, please - {% raw %}{{input}}{% endraw %}'
model: gpt-4o
modelParameters:
max_tokens: 4096
```
Once your pull request is reviewed and merged, your prompt will be available for anyone to use in the repository.
1. **Call your prompt in a workflow**
For information on creating workflows, see [AUTOTITLE](/actions/writing-workflows).
You need to set `models: read` permission to allow a prompt to be called in a workflow.
Here's an example workflow that adds an AI-generated summary as a comment on any newly created issue:
```yaml copy
name: Summarize New Issue
on:
issues:
types: [opened]
permissions:
issues: write
contents: read
models: read
jobs:
summarize_issue:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: {% data reusables.actions.action-checkout %}
- name: Install gh-models extension
run: gh extension install https://github.com/github/gh-models
env:
GH_TOKEN: ${% raw %}{{ github.token }}{% endraw %}
- name: Create issue body file
run: |
cat > issue_body.txt << 'EOT'
${% raw %}{{ github.event.issue.body }}{% endraw %}
EOT
- name: Summarize new issue
run: |
cat issue_body.txt | gh models run --file summarize.prompt.yml > summary.txt
env:
GH_TOKEN: ${% raw %}{{ github.token }}{% endraw %}
- name: Update issue with summary
run: |
SUMMARY=$(cat summary.txt)
gh issue comment ${% raw %}{{ github.event.issue.number }}{% endraw %} --body "### Issue Summary
${SUMMARY}"
env:
GH_TOKEN: ${% raw %}{{ github.token }}{% endraw %}
```
1. **Monitor and iterate**
You can monitor the performance of the action and iterate on the prompt and model selection using the {% data variables.product.prodname_github_models %} prompt editor. You can also use the [CLI extension](https://github.com/github/gh-models) to test locally, or use the {% ifversion fpt %} [{% data variables.product.prodname_github_models %} REST API](/rest/models?apiVersion=2022-11-28) {% else %} API {% endif %}to programmatically update the prompt and model settings.
You may also want to consider saving the model response as a file in your repository, so that you can review and iterate on the model's performance over time. This allows you to continuously improve the quality of the summaries and ensure they meet your team's needs.

View File

@@ -6,7 +6,8 @@ versions:
ghes: '*'
ghec: '*'
children:
- /prototyping-with-ai-models
- /integrating-ai-models-into-your-development-workflow
- /about-github-models
- /use-github-models
- /github-models-at-scale
- /responsible-use-of-github-models
---

View File

@@ -0,0 +1,264 @@
---
title: Evaluating AI models
intro: 'Test and compare AI model outputs using evaluators and scoring metrics in GitHub Models.'
versions:
feature: github-models
shortTitle: Evaluate AI models
topics:
- GitHub Models
---
## Overview
{% data variables.product.prodname_github_models %} provides a simple evaluation workflow that helps developers compare large language models (LLMs), refine prompts, and make data-driven decisions within the GitHub platform. You can use {% data variables.product.prodname_github_models %} to experiment with new features or validate model changes by analyzing performance, accuracy, and cost through structured evaluation tools.
## Use cases for {% data variables.product.prodname_github_models %}
Model behavior can vary widely based on the prompt, input, or configuration. {% data variables.product.prodname_github_models %} helps you:
* Test and compare multiple LLMs across realistic use cases.
* Optimize prompt phrasing, temperature, and other parameters.
* Evaluate model outputs using structured, repeatable metrics.
* Make AI development integrated into your development workflow.
## Example scenario
Consider a scenario where you're building a feature to summarize customer feedback submitted through support tickets. These summaries will be used to generate internal reports and tickets, so the output needs to be clear, relevant, and concise.
You want to:
* Experiment with different models and prompt configurations.
* Evaluate the best-performing configuration based on quality, consistency, and efficiency.
* Save the configuration to your repository for reuse and collaboration.
## Prompt testing in the Playground
To familiarize yourself with how to create and manage prompts in {% data variables.product.prodname_github_models %}, see [Testing a prompt in the Playground](/github-models/use-github-models/optimizing-your-ai-powered-app-with-github-models#testing-a-prompt-in-the-playground).
The Playground lets you compare models side by side, adjust their parameters, and test prompt variations.
In this step, you'll configure a model to generate summaries for customer support feedback. You'll define a system prompt, test it with a sample input, and refine it to ensure the output is concise and relevant.
### Defining the system prompt
Define the model's behavior for your current goal. In this case, the goal is to summarize customer feedback. Under **Parameters**, enter the following System prompt:
You are a helpful assistant that summarizes support ticket responses into concise summaries.
Leave the remaining settings set to their defaults.
![Screenshot of the system prompt. The system prompt input is highlighted.](/assets/images/help/models/github-models-system-prompt.png)
### Writing a user prompt
Now that the model is set up, enter the following customer feedback into the **Prompt** dialog:
The app crashes every time I try to upload a PDF from my phone. It works on desktop but not on mobile.
The model may generate a response like the following:
The user experiences consistent app crashes when attempting to upload a PDF from their phone. Uploading PDFs works normally on desktop. They request an investigation into the issue.
### Defining the input variable
At this point, the configuration generates a clear and concise summary. At the bottom of the **Parameters** settings, click **Create prompt.yml file** to open the Prompt view. Your system prompt will be prefilled automatically.
In the **User prompt** field, enter the following prompt:
```text
Summarize the following: {% raw %}{{input}}{% endraw %}
```
The {% raw %}`{{input}}`{% endraw %} variable acts as a placeholder that lets you test different inputs (customer feedback) without modifying the prompt each time. Each test input you add will replace {% raw %}`{{input}}`{% endraw %} when the comparison runs.
## Adding test inputs
At the top of the Prompts view, select **Compare** to toggle the Comparisons view. This view allows you to run structured comparisons across multiple prompts or models and apply evaluators to measure performance.
![Screenshot of the compare toggle. The compare toggle is highlighted.](/assets/images/help/models/github-models-compare-toggle.png)
In the Comparisons view, each row in the table represents a single test case, with a specific input and an expected output. Each column presents a different prompt configuration to compare how various models or prompt styles perform using evaluators.
Click **Add rows** to enter your test data. The input simulates a real support message, and the expected output represents the ideal summary the model should return. The table below provides sample test inputs and their corresponding expected outputs for evaluation.
| Row | **Input** | **Expected output** |
|-----|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| 1 | The app crashes every time I try to upload a PDF from my phone. It works on desktop but not on mobile. | User reports that the mobile app crashes every time they try to upload a PDF, while the desktop version works without issues. |
| 2 | I contacted support two days ago and haven't heard back. I need help recovering my account ASAP. | User is awaiting support response and urgently needs account recovery assistance. |
| 3 | Please add dark mode. It's very hard to use at night. My eyes hurt after prolonged use. | User requests dark mode due to eye strain during nighttime use. |
### Adjusting model parameters
To the right of the table, click {% octicon "plus" aria-label="Add prompt configuration" %} to add a new prompt configuration.
Within the new prompt configuration, you can update the model and fine-tune its behavior using the available parameters settings. These settings control how the model generates text, including its length, randomness, and repetition.
### Configuring the model
From the Model dropdown, choose PHI-4 to create a distinct configuration for comparison.
You can adjust the following parameters to influence the models output:
* **Max Tokens**: Sets the maximum number of tokens the model can return. Higher values allow longer outputs.
* **Temperature**: Controls randomness in the response. Lower values (0.20.4) produce more focused, deterministic outputs. Higher values (0.81.0) introduce more variation and creativity.
* **Top P**: Controls output diversity by selecting from a pool of the most probable next words. Lower values reduce variability, similar to lowering temperature.
* **Presence Penalty**: Discourages the model from introducing new topics. Higher values apply a stronger penalty. A value of 0 is typically suitable for summarization.
* **Frequency Penalty**: Reduces the likelihood of repeating words. Higher values apply a stronger penalty. A value between 0 and 0.5 helps keep summaries clear and free of redundancy.
* **Stop**: Specifies one or more strings that, when generated, will cut off the model's response. Use this to prevent overly long outputs or enforce formatting rules.
The table below provides a parameter configuration for generating concise summaries during model comparison.
| Parameter | Value | Reason |
|-------------------|------------|-------------------------------------------------------------|
| Max Tokens | 128 | Keeps responses short and on-topic |
| Temperature | 0.3 | Ensures deterministic, focused outputs |
| Top P | 1.0 | Allows full vocabulary but keeps selection guided |
| Presence Penalty | 0 | No penalty—summaries dont need topic variation |
| Frequency Penalty | 0.3 | Reduces repeated phrasing in compact summaries |
| Stop | (optional) | Use if you want to end output after a keyword or symbol |
After applying the parameters, you can add additional columns to compare more models or prompt configurations side by side.
## Evaluating outputs
Once the prompt is configured, run a structured evaluation to compare model outputs using real data and repeatable metrics.
Model evaluation helps you understand how different models and prompt configurations perform across real inputs. In the Prompt view, you can apply evaluators to multiple models side by side and review metrics such as similarity, relevance, and groundedness.
The following evaluators are available:
* **Similarity**: Measures how closely a model's output matches an expected or reference answer. This is useful when you want to confirm that the model returns consistent and accurate responses aligned with a known result. The score ranges from 0 to 1, with higher values indicating greater similarity.
* **Relevance**: Refers to how effectively a response addresses a question. It assesses the accuracy, completeness, and direct relevance of the response based solely on the given information. The score ranges from 0 to 1, with higher values indicating stronger alignment with the input's intent.
* **Groundedness**: Measures how well an answer is anchored in the provided context, evaluating its relevance, accuracy, and completeness based exclusively on that context. It assesses the extent to which the answer fully addresses the question without introducing unrelated or incorrect information. The score ranges from 0 to 1, with higher values indicating higher accuracy.
* **Custom prompt**: Lets you define your own evaluation criteria for one LLM to assess the output of another. This allows you to score model outputs based on your own guidelines. You can choose between pass/fail or scored evaluations, making it ideal for scenarios where standard metrics do not capture testing expectations.
When youre ready to evaluate, click **Run** to generate and compare the outputs across all prompt configurations. After the run completes, {% data variables.product.prodname_github_models %} displays the output from each prompt configuration, along with evaluator scores.
![Screenshot of the dataset after the evaluator has run.](/assets/images/help/models/github-models-datasets.png)
## Test case: PDF upload crash
**Input**: `The app crashes every time I try to upload a PDF from my phone. It works on desktop but not on mobile.`
The following tables display each model's output and its evaluator scores:
| Model | Output |
|-------|--------------------------------------------------------------------------------------------------------------------------------------------|
| GPT-4.1 | User reports that the app crashes when uploading a PDF from mobile, though uploading works on desktop. |
| DeepSeek-R1 | <think> Okay, the user is having trouble with the app crashing when they try to upload a PDF from their phone. It works on the desktop but not mobile. Let me break this down. First, the main issue is the app crashing specifically during PDF uploads on mobile. The fact that it works on desktop suggests it's a mobile-specific problem. Possible causes could be related to the mobile app version, the phone's OS, file size limits on mobile, or compatibility issues with certain PDF formats on mobile devices. I need to make sure the summary mentions the crash during PDF uploads on mobile, note that desktop works, and |
| Phi-4 | The app crashes when attempting to upload a PDF from the mobile device, though it functions correctly on the desktop version. |
| Model | Similarity | Relevance | Groundedness | Input tokens | Output tokens | Latency |
|---------------|------------|-----------|--------------|--------------|---------------|---------|
| GPT-4.1 | 100% | 50% | 100% | 61 | 20 | 918ms |
| DeepSeek-R1 | 50% | 50% | 75% | 52 | 128 | 2285ms |
| Phi-4 | 75% | 100% | 100% | 61 | 66 | 1117ms |
Use the evaluator scores to assess and compare responses beyond surface-level phrasing.
### Similarity
Evaluate how closely each models output aligns with the expected summary. The table below shows the relevance scores for each model.
| Model | Similarity score |
|---------------|------------------|
| GPT-4.1 | 100% |
| DeepSeek-R1 | 50% |
| Phi-4 | 75% |
While all models included the key content from the input, DeepSeek-R1s similarity score is significantly lower due to its verbose internal commentary, which deviate from the expected concise summary format. In contrast, GPT-4.1s response matches the phrasing and structure of the reference output.
### Relevance
Evaluate how well each model captures the core intent of the input. The table below shows the relevance scores for each model.
| Model | Relevance score |
|---------------|-----------------|
| GPT-4.1 | 50% |
| DeepSeek-R1 | 50% |
| Phi-4 | 100% |
All three models recognized the key issue of the app crashing during PDF uploads on mobile. Phi-4 earned a higher relevance score for reflecting the user's perspective more completely. DeepSeek-R1 lost points for introducing speculative technical causes not mentioned in the original input.
### Groundedness
Evaluate whether each models output stays true to the input without introducing unsupported information.
The table below shows the relevance scores for each model.
| Model | Groundedness score |
|---------------|--------------------|
| GPT-4.1 | 100% |
| DeepSeek-R1 | 75% |
| Phi-4 | 100% |
Even though DeepSeek-R1 adds internal commentary, it does not introduce hallucinated facts. Its final summary sentence correctly reflects the original input.
## Test case: Dark mode request
**Input**: `Please add dark mode. It's very hard to use at night. My eyes hurt after prolonged use.`
The following tables display each model's output and its evaluator scores:
| Model | Output |
|-------|---------------------------------------------------------------------------------------------------------------------------------------------|
| GPT-4.1 | User requests the addition of a dark mode feature due to discomfort and eye strain when using the app at night. |
| DeepSeek-R1 | <think> Okay, the user wants dark mode added because it's hard to use at night and their eyes hurt. I need to make a concise summary. Let me start with the main request: adding dark mode. Then mention the reason: eye strain from prolonged use at night. Keep it to one sentence. Maybe structure it as "Request to implement dark mode to reduce eye strain during nighttime use." That covers the key points without extra details. Check if that's under the character limit. Yep, looks good. </think> Summary: Request to implement dark mode to reduce eye strain caused by prolonged nighttime use. |
| Phi-4 | The customer is requesting the addition of a dark mode feature to reduce eye strain when using the product at night. |
| Model | Similarity | Relevance | Groundedness | Input Tokens | Output Tokens | Latency |
|---------------|------------|-----------|--------------|---------------|----------------|---------|
| GPT-4.1 | 100% | 75% | 100% | 57 | 18 | 1286ms |
| DeepSeek-R1 | 50% | 0% | 25% | 49 | 128 | 1946ms |
| Phi-4 | 100% | 75% | 100% | 58 | 20 | 899ms |
### Similarity
Evaluate how closely each models output aligns with the expected summary. The table below shows the relevance scores for each model.
| Model | Similarity score |
|---------------|------------------|
| GPT-4.1 | 100% |
| DeepSeek-R1 | 50% |
| Phi-4 | 100% |
While all models included the key content from the input, DeepSeek-R1s similarity score is again, significantly lower due to its verbose internal commentary.
### Relevance
Evaluate how well each model captures the core intent of the input. The table below shows the relevance scores for each model.
| Model | Relevance score |
|---------------|-----------------|
| GPT-4.1 | 75% |
| DeepSeek-R1 | 0% |
| Phi-4 | 75% |
GPT-4.1 and Phi-4 both captured the main intent of the users request: the need for dark mode to reduce eye strain and improve usability at night. DeepSeek-R1 scored 0% in relevance due to its verbose internal commentary that distracted from the actual output.
### Groundedness
Evaluate whether each models output stays true to the input without introducing unsupported information.
The table below shows the relevance scores for each model.
| Model | Groundedness score |
|---------------|--------------------|
| GPT-4.1 | 100% |
| DeepSeek-R1 | 25% |
| Phi-4 | 100% |
DeepSeek-R1 scored lower due to its verbose `<think>` block, which included speculative reasoning not present in the original input.
## Save the configuration
After completing your evaluations, the final step is to choose the model that performs best for your specific use case. In the examples above, Phi-4 and GPT-4.1 delivered strong, consistent results across all evaluators. DeepSeek-R1 scored lower due to its verbose reasoning and less focused outputs.
Once you've selected your preferred model and prompt configuration, add a descriptive name to the prompt file, then click **Commit changes**. This will save the model, prompt, parameter settings, and associated dataset as a reusable configuration file in your repository.
![Screenshot of the commit changes button. The commit changes button is highlighted.](/assets/images/help/models/github-models-commit-changes.png)
Committing your prompt configuration makes it easy to reuse, collaborate, and iterate across model setups. It makes it easier to rerun evaluations and track the performance of the prompt configuration over time.
## Further reading
* [AUTOTITLE](/github-models/use-github-models/storing-prompts-in-github-repositories)
* [AUTOTITLE](/github-models/use-github-models/integrating-ai-models-into-your-development-workflow)

View File

@@ -0,0 +1,12 @@
---
title: Use GitHub Models
intro: '{% data variables.product.prodname_github_models %} helps you go from prompt to production by testing, comparing, evaluating, and integrating AI directly in your repository.'
versions:
feature: github-models
children:
- /prototyping-with-ai-models
- /optimizing-your-ai-powered-app-with-github-models
- /evaluating-ai-models
- /storing-prompts-in-github-repositories
- /integrating-ai-models-into-your-development-workflow
---

View File

@@ -36,7 +36,7 @@ You can use the {% data variables.product.prodname_actions %} token (`GITHUB_TOK
### Setting permissions
To use AI models in your workflows, you need to ensure that the `models` permission is enabled in your workflow configuration. This permission allows workflows to access the {% data variables.product.prodname_github_models %} inference API. You can either set this permission itself or use the general `read-all` or `write-all` permissions. See [AUTOTITLE](/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#repository-permissions-for-actions).
To use AI models in your workflows, ensure that the `models` permission is enabled in your workflow configuration. This permission allows workflows to access the {% data variables.product.prodname_github_models %} inference API. You can either set this permission itself or use the general `read-all` or `write-all` permissions. See [AUTOTITLE](/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#repository-permissions-for-actions).
### Writing your workflow file
@@ -81,7 +81,7 @@ You can use the {% data variables.product.prodname_github_models %} extension fo
### Prerequisites
To use the {% data variables.product.prodname_github_models %} CLI extension, you need to have {% data variables.product.prodname_cli %} installed. {% data reusables.cli.cli-installation %}
To use the {% data variables.product.prodname_github_models %} CLI extension, you must install {% data variables.product.prodname_cli %}. {% data reusables.cli.cli-installation %}
### Installing the extension

View File

@@ -0,0 +1,173 @@
---
title: Optimizing your AI-powered app with Models
shortTitle: Optimize your AI-powered app
intro: 'Learn how to test models and refine prompts for your AI-powered application.'
versions:
feature: github-models
allowTitleToDifferFromFilename: true
---
With new AI models being released regularly, choosing the right one for your application can be challenging. {% data variables.product.prodname_github_models %} helps you optimize your AI-powered application by letting you **compare different models and prompt variations** against sample inputs, while using **built-in evaluators** to validate model output.
Through an example scenario, we'll build an AI-powered assistant that helps users learn how to use Git from the command line. We'll walk through comparing different models, and you'll learn how to refine prompt variations to enhance output quality.
>[!NOTE]
>
> * {% data variables.product.prodname_github_models %} is in {% data variables.release-phases.public_preview %} and subject to change.
> * Usage is rate limited. See [AUTOTITLE](/github-models/use-github-models/prototyping-with-ai-models#rate-limits).
## Testing a prompt
The {% data variables.product.prodname_github_models %} **Comparisons** view allows you to adjust model parameters and prompts to test model output.
### 1. Creating a sample repository
You can access the **Comparisons** view directly from the **Models** tab in any repository, but in this guide we'll create a new repository to use as a test environment.
1. Navigate to the [new repository](https://github.com/new) page.
1. Under "Owner", make sure your user account is selected.
1. In the "Repository name" field, type `models-playground`.
1. Beneath the description field, select **Private** to set the repository visibility.
1. Click **Create repository**.
### 2. Creating a new prompt
1. On the main page of your new repository, click the **Models** tab.
1. In the "Prompts" section, click **{% octicon "plus" aria-hidden="true" %} New Prompt**.
1. In the upper-left corner, choose a model from the dropdown menu.
### 3. Writing a system prompt
A system prompt is a set of instructions that defines the role, behavior, and limitations of an AI model before it interacts with users. In this example, we'll be working on an AI-powered application that explains how to use Git from the command line.
In the **System prompt** field, copy and paste the following text:
```text copy
You are an expert at using the Git version control system. I will ask questions looking for guidance on the best way to perform tasks using Git, and you will give clear, step-by-step answers that explain each step you are recommending.
```
> [!NOTE] If the **System** text field is not editable, try choosing a different model in the model dropdown above. Not all models allow the system prompt to be modified.
### 4. Writing a user prompt
The user prompt is the direct question or instruction to an AI system during their conversation, which the AI system responds to.
In the **User prompt** field, copy and paste the following text:
```text copy
I want to learn how to use Git from the command line. {{input}}
```
### 5. Entering sample input
The {% raw %}`{{input}}`{% endraw %} variable in the **User prompt** functions as a placeholder for sample input. To manage this placeholder, click the **Variables** button and enter the following text:
```text copy
When should I use rebase or merge?
```
### 6. Running the sample prompt
1. In the upper-right corner, click **{% octicon "play" aria-hidden="true" %} Play**.
1. Make a change to the model or prompt, then run the prompt again to see what results you get.
## Testing different models against a prompt
Now, let's determine which model will work best for our application, using the **Comparisons** view. This view allows you to test different models on the same input, revealing differences in accuracy, creativity, tone, reasoning, and reliability. That will help us choose the model that best fits our needs in terms of quality, speed, cost, and consistency.
1. In the upper-left corner, click **Comparisons**.
1. To compare different models, click **{% octicon "plus" aria-hidden="true" %} Add prompt** and select **{% octicon "repo-forked" aria-hidden="true" %} Copy original prompt** to duplicate your existing system and user prompts. Create at least two copies of the original prompt to evaluate three different models.
1. Next to each prompt, click {% octicon "pencil" aria-hidden="Edit prompt" %}. From the **Model** dropdown, choose a different model for each prompt you created.
1. Click **{% octicon "plus" aria-hidden="true" %} Add inputs** to create new rows for sample inputs.
* Click **{% octicon "plus" aria-hidden="true" %} Add inputs**. Then, in the "Input" field, copy and paste the following text:
```text copy
How do I modify the most recent commit message in my current branch?
```
* Click **{% octicon "plus" aria-hidden="true" %} Add inputs** again, then paste the following input:
```text copy
How do I move a specific commit from one branch to a different branch?
```
* Click **{% octicon "plus" aria-hidden="true" %} Add inputs** one more time, and paste this input:
```text copy
How do I find the author of a specific commit in a repository's history?
```
1. To run the prompts, in the upper-right corner, click **{% octicon "play" aria-hidden="true" %} Run**.
1. Try out different models against your prompt, making note of the **Latency** and the **Input** and **Output** token usage of the different models.
## Testing prompt variations with a specific model
If youre building an application with a specific AI model, you need responses to be predictable and reliable. Testing prompt variations helps you to:
* **Optimize performance and quality**: Slight changes in phrasing can affect the response quality. By testing variations you can find the wording that gets the best response.
* **Clarify instructions**: By varying the phrasing of your prompt, you can identify which version the model understands most clearly.
* **Adapt to specific model behavior**: You can tailor your input to how a specific model interprets language.
* **Verify the format of the output**: You may want a list, a paragraph, a code block, or a specific tone. Testing prompt variation helps you enforce a specific structure or style.
Now, let's use {% data variables.product.prodname_github_models %} to test prompt variations against user input for your specific model.
### 1. Adding prompt variations
For this example scenario, select the **same model for each column**, but provide a different prompt variation by editing the "User prompt" field of our existing prompts. Next to each prompt, click {% octicon "pencil" aria-hidden="Edit prompt" %}.
1. Click **{% octicon "pencil" aria-hidden="Edit prompt" %}** in "Prompt 2." Then, in the "User prompt" field, copy and paste the following text:
```text copy
I want to learn how to use Git from the command line, but explain it to me like I am five years old. {{input}}
```
1. Click **{% octicon "pencil" aria-hidden="Edit prompt" %}** in "Prompt 3", then paste the following input:
```text copy
I want to learn how to use Git from the command line. Give me instructions in the form of a haiku. {{input}}
```
### 2. Running prompt variations
1. To run the prompts, in the upper-right corner, click **{% octicon "play" aria-hidden="true" %} Run**.
1. Try out different prompt variations, and compare the types of output the model gives you.
## Evaluating model output
Weve tested different models and prompt variations in {% data variables.product.prodname_github_models %}, and the next step is interpreting and comparing the results to make informed decisions for our AI-powered application.
As you ran the models in the example scenarios, the **Input** and **Output** token usage and **Latency** were displayed after each run. Token usage matters because it directly affects **cost, performance, and model limitations.**
* Since most models charge per token both for input and output, using more tokens increases your cost.
* Each model also has a maximum token limit (called a context window), and exceeding it can result in errors or truncated responses.
* Longer prompts can slow down response time or reduce clarity, while concise prompts often lead to better, more efficient outputs.
Using {% data variables.product.prodname_github_models %} to test token usage and latency helps you stay within limits, manage costs, and improve overall effectiveness of your AI-powered application.
### Using evaluators to judge output
Depending on the number of prompts and models you are evaluating, the model output can be overwhelming to sort through manually. To help assess the quality of each model's output, you can use **Evaluators** to score results across key dimensions like clarity, accuracy, and relevance. You can define your own evaluation criteria, or use built-in evaluators to automatically rate outputs, making it easier to identify the best-performing model and prompt variation.
For this example scenario, let's use the **String check** evaluator to check for a string in the output.
1. In the lower-right corner of the **Prompts** field, click **{% octicon "plus" aria-hidden="true" %} Add evaluator** and select **{% octicon "note" aria-hidden="true" %} String check**.
1. In the **Name** field, enter "Amend check", then copy and paste the following input for the **Value** field:
```text copy
git commit --amend
```
1. To run the prompts, in the upper-right corner, click **{% octicon "play" aria-hidden="true" %} Run**.
1. The prompt output will now show a **Pass** or **Fail** label, letting you know which model contained the required string.
To learn more about the pre-built evaluators like similarity, groundedness, and relevance, see [AUTOTITLE](/github-models/use-github-models/evaluating-ai-models#evaluating-outputs).
## Next steps
Now that you've explored how to test models, refine prompts, and evaluate outputs using {% data variables.product.prodname_github_models %}, you're ready to start building prompts for your AI-powered application. After creating a prompt, you can store, version, and share it by committing a `.prompt.yml` file to your repository. This keeps your prompts under version control, and enables easy collaboration on prompt and model refinement. For more information, see [AUTOTITLE](/github-models/use-github-models/storing-prompts-in-github-repositories).
## Join the community
To ask questions and share feedback, see this [GitHub Models discussion post](https://github.com/orgs/community/discussions/159087).
To learn how others are using {% data variables.product.prodname_github_models %}, visit the [GitHub Community discussions for Models](https://github.com/orgs/community/discussions/categories/models).

View File

@@ -4,6 +4,8 @@ shortTitle: Prototype with AI models
intro: 'Find and experiment with AI models for free.'
versions:
feature: github-models
redirect_from:
- /github-models/prototyping-with-ai-models
---
If you want to develop a generative AI application, you can use {% data variables.product.prodname_github_models %} to find and experiment with AI models for free. Once you are ready to bring your application to production, you can switch to a token from a paid Azure account. See the [Azure AI](https://aka.ms/azureai/github-models) documentation.
@@ -43,6 +45,14 @@ With one model open in the playground, click **Compare**, then, in the dropdown
Any parameters you set are used for both models.
## Evaluating AI models
Once you've started testing prompts in the playground, you can evaluate model performance using structured metrics. Evaluations help you compare multiple prompt configurations across different models and determine which setup performs best.
In the Comparisons view, you can apply evaluators like similarity, relevance, and groundedness to measure how well each output meets your expectations. You can also define your own evaluation criteria with a custom prompt evaluator.
For step-by-step instructions, see [Evaluating outputs](/github-models/use-github-models/evaluating-ai-models#evaluating-outputs).
## Experimenting with AI models using the API
>[!NOTE]
@@ -61,7 +71,7 @@ The steps to use each model are similar. In general, you will need to:
1. Optionally, use the language dropdown to select the programming language.
1. Optionally, use the SDK dropdown to select which SDK to use.
All models can be used with the Azure AI Inference SDK, and some models support additional SDKs. If you want to easily switch between models, you should select "Azure AI Inference SDK". If you selected "REST" as the language, you won't use an SDK. Instead, you will use the API endpoint directly.
All models can be used with the Azure AI Inference SDK, and some models support additional SDKs. If you want to easily switch between models, you should select "Azure AI Inference SDK". If you selected "REST" as the language, you won't use an SDK. Instead, you will use the API endpoint directly. {% ifversion fpt %} See [{% data variables.product.prodname_github_models %} REST API](/rest/models?apiVersion=2022-11-28). {% endif %}
1. Either open a codespace, or set up your local environment:
* To run in a codespace, click **{% octicon "codespaces" aria-hidden="true" %} Run codespace**, then click **Create new codespace**.
* To run locally:
@@ -347,4 +357,5 @@ These limits are subject to change without notice.
## Leaving feedback
To leave feedback about {% data variables.product.prodname_github_models %}, start a new discussion or comment on an existing discussion in the [GitHub Community](https://github.com/orgs/community/discussions/categories/models).
To ask questions and share feedback, see this [GitHub Models discussion post](https://github.com/orgs/community/discussions/159087).
To learn how others are using {% data variables.product.prodname_github_models %}, visit the [GitHub Community discussions for Models](https://github.com/orgs/community/discussions/categories/models).

View File

@@ -0,0 +1,60 @@
---
title: Storing prompts in GitHub repositories
shortTitle: Store prompts
intro: 'Store prompts directly in your GitHub repositories to leverage automated text summarization and other AI-driven functionalities.'
allowTitleToDifferFromFilename: true
versions:
fpt: '*'
ghec: '*'
---
Prompts can be stored as files directly within GitHub repositories. This unlocks the ability to view your prompts in an organized UI, share them with non-technical stakeholders, and run seamless iterations and comparisons on adjustments to models and prompts.
## Benefits
* Easy integration with the new suite of AI development tools directly on GitHub.
* Simple and scalable from simple to complex use cases.
* Uses a widely supported format, compatible with existing tools.
## Supported file format
Store prompts in markdown files with optional YAML front matter.
The file can be located anywhere in your repository, but it **must have the extension `.prompt.md`**.
Example:
```yaml
---
name: Summarizer
description: Summarizes a given text
model: openai/gpt-4o
model_parameters:
temperature: 0.5
---
system:
You are a text summarizer. Your only job is to summarize a given text to you.
user:
Summarize the given text:
<text>
{% raw %}{{text}}{% endraw %}
</text>
```
## Prompt structure
Prompts have two key parts:
* **Runtime information** (required)
* Prompt templates (system, user, etc.) using simple {{variable}} placeholders
* **Development information** (optional)
* Human-readable name and description
* Model identifier and parameters
* Sample data for testing and evaluations
## Limitations
You cannot store prompts for:
* Complex templating languages
* Proprietary or complex file formats (such as `.ghprompt`, or `.prompty`)

View File

@@ -19,7 +19,13 @@ shortTitle: Assign issues & PRs
## About issue and pull request assignees
You can assign multiple people to each issue or pull request, including yourself, anyone who has commented on the issue or pull request, anyone with write permissions to the repository, and organization members with read permissions to the repository. For more information, see [AUTOTITLE](/get-started/learning-about-github/access-permissions-on-github).
You can assign multiple people to each issue or pull request, including: yourself, anyone who has commented on the issue or pull request, anyone with write permissions to the repository, and organization members with read permissions to the repository. For more information, see [AUTOTITLE](/get-started/learning-about-github/access-permissions-on-github).
{% ifversion copilot %}
You may also be able to assign {% data variables.product.prodname_copilot_short %} to an issue, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/using-copilot-to-work-on-an-issue).
{% endif %}
Issues and pull requests in public repositories, and in private repositories for a paid account, can have up to 10 people assigned. Private repositories on the free plan are limited to one person per issue or pull request.
@@ -43,6 +49,14 @@ Issues and pull requests in public repositories, and in private repositories for
1. In the upper-right corner, click **Assign**.
1. To assign the items to a user, start typing their username, then click their name when it appears. You can select and add up to ten assignees to an issue or pull request.
{% ifversion copilot %}
## Assigning an issue to {% data variables.product.prodname_copilot_short %}
If you assign an issue to {% data variables.product.prodname_copilot_short %}, {% data variables.product.prodname_copilot_short %} will work autonomously on the issue, creating a pull request and, when it has finished, requesting that you review the pull request. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
{% endif %}
## Further reading
* [AUTOTITLE](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests)

View File

@@ -163,9 +163,16 @@ You can also use URL query parameters to fill custom text fields that you have d
{% ifversion copilot %}
## Creating an issue from {% data variables.product.prodname_copilot_chat_short %}
## Creating an issue with {% data variables.product.prodname_copilot_chat_short %} on {% data variables.product.github %}
You can create an issue from {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_vscode %} with the Model Context Protocol (MCP). For more information, see [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-chat-with-mcp).
> [!NOTE]
> This feature is in {% data variables.release-phases.public_preview %} and subject to change.
Creating issues manually can be repetitive and time-consuming. With {% data variables.product.prodname_copilot_short %}, you can create issues faster by prompting in natural language, or even by uploading a screenshot. {% data variables.product.prodname_copilot_short %} fills out the title, body, labels, assignees, and more, using your repositorys templates and structure. See [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-to-create-issues).
## Creating an issue from {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_vscode_shortname %}
You can also create an issue directly from {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_vscode_shortname %}, using the Model Context Protocol (MCP). See [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-chat-with-mcp).
{% endif %}

View File

@@ -54,7 +54,6 @@ children:
- /creating-rulesets-for-repositories-in-your-organization
- /managing-rulesets-for-repositories-in-your-organization
- /managing-custom-properties-for-repositories-in-your-organization
- /managing-or-restricting-github-models-for-your-organization
shortTitle: Manage organization settings
---
{% ifversion fpt or ghec %}
{% endif %}

View File

@@ -0,0 +1,27 @@
---
title: Managing or restricting {% data variables.product.prodname_github_models %} in your organization
shortTitle: Manage or restrict models
intro: You can enable, disable, and restrict the use of {% data variables.product.prodname_github_models %} for an organization.
versions:
feature: github-models
permissions: 'Organization owners'
topics:
- Organizations
- AI
- GitHub Models
allowTitleToDifferFromFilename: true
---
{% data reusables.models.models-preview-note %}
## About {% data variables.product.prodname_github_models %}
{% data reusables.models.feature-overview %}
## Prerequisites
{% data reusables.models.prereq-enable-models-in-enterprise %} See [Enabling {% data variables.product.prodname_github_models %} for an enterprise](/github-models/github-models-at-scale/manage-models-at-scale#enabling-github-models-for-an-enterprise).
## Enabling or restricting models in your organization
{% data reusables.models.enable-select-models-in-org %}

View File

@@ -58,4 +58,6 @@ You can view all of the reviews a pull request has received in the Conversation
* [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)
* [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/viewing-a-pull-request-review)
* [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors)
* [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors){% ifversion copilot %}
* [AUTOTITLE](/copilot/using-github-copilot/code-review/using-copilot-code-review)
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/using-copilot-to-work-on-an-issue){% endif %}

View File

@@ -44,9 +44,15 @@ To reply to an existing line or file comment, you'll need to navigate to the com
{% data reusables.repositories.type-line-comment %}
{% data reusables.repositories.suggest-changes %}
{% data reusables.repositories.start-file-comment %}
1. When you're done, click **Add single comment**.
1. When you're done:
Anyone watching the pull request or repository will receive a notification of your comment.
* If you only want to add this **one comment**, click **Add single comment**.
* If you want to add **multiple comments**, click **Start a review**, then continue adding comments.
When you have finished, click **Finish your review** at the top right of the page, leave a summary of your review, and click **Submit review**.
Anyone watching the pull request or repository will receive a notification of your comments. Batching your comments avoids multiple notifications being sent. {% ifversion copilot %}If you are commenting on a pull request created by {% data variables.product.prodname_copilot_short %}, batching your comments prevents {% data variables.product.prodname_copilot_short %} from starting to work on individual comments before you have completed your review. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/using-copilot-to-work-on-an-issue).{% endif %}
{% data reusables.pull_requests.resolving-conversations %}

View File

@@ -18,12 +18,18 @@ shortTitle: Review proposed changes
You can review changes in a pull request one file at a time. While reviewing the files in a pull request, you can leave individual comments on specific changes. After you finish reviewing each file, you can mark the file as viewed. This collapses the file, helping you identify the files you still need to review. A progress bar in the pull request header shows the number of files you've viewed. After reviewing as many files as you want, you can approve the pull request or request additional changes by submitting your review with a summary comment.
{% ifversion copilot %}
If the pull request was raised by {% data variables.product.prodname_copilot %} then, when you submit your comments, {% data variables.product.prodname_copilot_short %} will carry out more work to respond to your comments and will push a new commit to the pull request with further changes. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
{% endif %}
{% data reusables.search.requested_reviews_search_tip %}
## Starting a review
{% webui %}
## Starting a review
{% data reusables.repositories.sidebar-pr %}
{% data reusables.repositories.choose-pr-review %}
{% data reusables.repositories.changed-files %}
@@ -52,6 +58,8 @@ Before you submit your review, your line comments are _pending_ and only visible
{% codespaces %}
## Reviewing a pull request
You can use [{% data variables.product.prodname_github_codespaces %}](/codespaces/quickstart) to test, run, and review pull requests.
1. Open the pull request in a codespace, as described in [AUTOTITLE](/codespaces/developing-in-codespaces/using-github-codespaces-for-pull-requests#opening-a-pull-request-in-codespaces).
@@ -103,7 +111,6 @@ For more information on reviewing pull requests in {% data variables.product.pro
{% data reusables.copilot.stop-response-generation %}
{% endif %}
{% endwebui %}
## Reviewing dependency changes
@@ -142,6 +149,8 @@ After you've finished reviewing all the files you want in the pull request, subm
{% data reusables.repositories.request-changes-tips %}
{% endwebui %}
## Further reading
* [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-pull-request-reviews-before-merging)

View File

@@ -20,5 +20,6 @@ children:
- /configuring-autolinks-to-reference-external-resources
- /configuring-tag-protection-rules
- /managing-auto-closing-issues
- /managing-github-models-in-your-repository
shortTitle: Manage repository settings
---

View File

@@ -0,0 +1,36 @@
---
title: Managing {% data variables.product.prodname_github_models %} in your repository
shortTitle: Manage models
intro: You can enable or disable {% data variables.product.prodname_github_models %} in your repository.
versions:
feature: github-models
permissions: 'Repository administrators'
topics:
- Repositories
- AI
- GitHub Models
allowTitleToDifferFromFilename: true
---
{% data reusables.models.models-preview-note %}
## About {% data variables.product.prodname_github_models %}
{% data reusables.models.feature-overview %}
## Prerequisites
If your repository is organization-owned, an organization owner must first enable {% data variables.product.prodname_github_models %} in your organization.
If your organization owner has restricted access to certain models, you will only see a subset of the total available models.
If the repository is owned by a user, that user has access to all the available models for that repository.
## Enabling or disabling models in your repository
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. Under "Code and automation, select **Models**.
1. In the "Models in this repository" section, click {% octicon "chevron-down" aria-label="the down arrow" %} beside **Disabled** and select **Enabled** from the dropdown.
{% data reusables.repositories.navigate-to-models %}
1. You can choose a model, create and test prompts, compare prompts and models, as well as experiment in the playgound. See [AUTOTITLE](/github-models/use-github-models/prototyping-with-ai-models).

View File

@@ -75,6 +75,7 @@ export default [
'Git',
'GitHub Apps',
'GitHub Connect',
'GitHub Models',
'GitHub search',
'GitHub',
'GitLab',

View File

@@ -1,4 +1,4 @@
# GitHub Models (AI models on GitHub Marketplace)
# GitHub Models (AI models on GitHub Models)
versions:
fpt: '*'
ghec: '*'

View File

@@ -0,0 +1 @@
1. In the sidebar, under "Code, planning, and automation", click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**, and then click **{% data variables.copilot.coding_agent_UI %}**.

View File

@@ -0,0 +1 @@
For information on making {% data variables.copilot.copilot_coding_agent %} available, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/enabling-copilot-coding-agent).

View File

@@ -0,0 +1,3 @@
For organizations, the ability to use {% data variables.copilot.copilot_coding_agent %} is controlled by policy settings for the organization. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/adding-copilot-coding-agent-to-organization).
If the organization is owned by an enterprise, enablement may be controlled at the enterprise level. See [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/adding-copilot-coding-agent-to-enterprise).

View File

@@ -0,0 +1,3 @@
The Model Context Protocol (MCP) is an open standard that defines how applications share context with large language models (LLMs). MCP provides a standardized way to connect AI models to different data sources and tools, enabling them to work together more effectively.
You can use MCP to extend the capabilities of {% data variables.copilot.copilot_coding_agent %} by connecting it to other tools and services.

View File

@@ -0,0 +1 @@
>[!NOTE] Starting June 4th, 2025, {% data variables.copilot.copilot_coding_agent %} will use one premium request per model request the agent makes. This is a preview feature and may be changed in the future.

View File

@@ -0,0 +1 @@
{% data variables.copilot.copilot_coding_agent %} is in {% data variables.release-phases.public_preview %} and subject to change.

View File

@@ -0,0 +1 @@
> [!NOTE] {% data reusables.copilot.coding-agent.preview-note-text %}

View File

@@ -0,0 +1 @@
In {% data variables.product.prodname_vscode_shortname %}, {% data variables.product.prodname_vs %}, and JetBrains IDEs, you must mention the `@github` chat participant in your prompt. You can omit this in {% data variables.product.prodname_copilot_chat_short %} on {% data variables.product.prodname_dotcom_the_website %}.

View File

@@ -0,0 +1 @@
{% data variables.copilot.copilot_coding_agent %} is an AI-powered software development agent that can work autonomously on issues or developer requests. It raises draft pull requests to propose a fix and iterates on the changes in response to feedback.

View File

@@ -1 +1,6 @@
**Agent mode**: Use agent mode when you have a specific task in mind and want to enable {% data variables.product.prodname_copilot_short %} to autonomously edit your code. In agent mode, {% data variables.product.prodname_copilot_short %} determines which files to make changes to, offers code changes and terminal commands to complete the task, and iterates to remediate issues until the original task is complete.
Use agent mode when you have a specific task in mind and want to enable {% data variables.product.prodname_copilot_short %} to autonomously edit your code. In agent mode, {% data variables.product.prodname_copilot_short %} determines which files to make changes to, offers code changes and terminal commands to complete the task, and iterates to remediate issues until the original task is complete.
Agent mode is best suited to use cases where:
* Your task is complex, and involves multiple steps, iterations, and error handling.
* You want {% data variables.product.prodname_copilot_short %} to determine the necessary steps to take to complete the task.
* The task requires {% data variables.product.prodname_copilot_short %} to integrate with external applications, such as an MCP server.

View File

@@ -0,0 +1 @@
When you use {% data variables.product.prodname_copilot_agent_short %} mode, {% data variables.product.prodname_copilot_short %} may make multiple premium requests to complete a single task. This includes both user-initiated prompts and follow-up actions {% data variables.product.prodname_copilot_short %} takes on your behalf. The total premium requests used will depend on the complexity of the task, the number of steps involved, and the model selected. See [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/monitoring-usage-and-entitlements/avoiding-unexpected-copilot-costs).

View File

@@ -1 +1,5 @@
**Edit mode**: Use edit mode when you want more granular control over the edits that {% data variables.product.prodname_copilot_short %} proposes. In edit mode, you choose which files {% data variables.product.prodname_copilot_short %} can make changes to, provide context to {% data variables.product.prodname_copilot_short %} with each iteration, and decide whether or not to accept the suggested edits after each turn.
Use edit mode when you want more granular control over the edits that {% data variables.product.prodname_copilot_short %} proposes. In edit mode, you choose which files {% data variables.product.prodname_copilot_short %} can make changes to, provide context to {% data variables.product.prodname_copilot_short %} with each iteration, and decide whether or not to accept the suggested edits after each turn.
Edit mode is best suited to use cases where:
* You want to make a quick, specific update to a defined set of files.
* You want full control over the number of LLM requests {% data variables.product.prodname_copilot_short %} uses.

View File

@@ -0,0 +1,13 @@
```json copy
{
"servers": {
"memory": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
]
}
}
}
```

View File

@@ -0,0 +1,5 @@
The Model Context Protocol (MCP) is an open standard that defines how applications share context with large language models (LLMs). MCP provides a standardized way to connect AI models to different data sources and tools, enabling them to work together more effectively.
You can use MCP to extend the capabilities of {% data variables.product.prodname_copilot_chat_short %} by integrating it with a wide range of existing tools and services. You can also use MCP to create new tools and services that work with {% data variables.product.prodname_copilot_chat_short %}, allowing you to customize and enhance your experience.
For more information on MCP, see [the official MCP documentation](https://modelcontextprotocol.io/introduction).

View File

@@ -3,4 +3,7 @@ Each {% data variables.product.prodname_copilot_short %} plan includes a per-use
* 300 requests per user per month for {% data variables.product.prodname_copilot_business_short %}
* 1000 requests per user per month for {% data variables.product.prodname_copilot_enterprise_short %}
{% data variables.product.prodname_copilot_chat_short %}, {% data variables.product.prodname_copilot_agent_short %} mode, {% data variables.product.prodname_copilot_short %} code review, and {% data variables.product.prodname_copilot_extensions_short %} use premium requests, with usage varying by model.
{% data variables.product.prodname_copilot_chat_short %}, {% data variables.product.prodname_copilot_agent_short %} mode, {% data variables.copilot.copilot_coding_agent %}, {% data variables.product.prodname_copilot_short %} code review, and {% data variables.product.prodname_copilot_extensions_short %} use premium requests, with usage varying by model.
> [!TIP]
> {% data variables.copilot.copilot_coding_agent %} uses {% data variables.product.prodname_actions %} in addition to premium requests. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-actions/managing-your-spending-limit-for-github-actions).

View File

@@ -0,0 +1 @@
1. On the "{% data variables.product.prodname_copilot %}" page, click the **{% data variables.copilot.copilot_coding_agent %}** tab.

View File

@@ -0,0 +1 @@
1. Under {% octicon "law" aria-hidden="true" %} "Policies", click **{% octicon "ai-model" aria-hidden="true" %} Models**.

Some files were not shown because too many files have changed in this diff Show More