Skip to content

Commit 29f7384

Browse files
jc-clarkCopilot
andauthored
Create "Use Copilot agents" category under copilot-on-github (#60721)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b086cde commit 29f7384

File tree

15 files changed

+409
-329
lines changed

15 files changed

+409
-329
lines changed

content/copilot/how-tos/copilot-on-github/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ children:
88
- /set-up-copilot
99
- /chat-with-copilot
1010
- /copilot-for-github-tasks
11+
- /use-copilot-agents
1112
contentType: how-tos
1213
---
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: Using {% data variables.copilot.copilot_code-review %} on {% data variables.product.github %}
3+
shortTitle: '{% data variables.copilot.copilot_code-review_short %}'
4+
allowTitleToDifferFromFilename: true
5+
intro: '{% data variables.product.prodname_copilot %} reviews your pull requests and suggests ready-to-apply changes, so you get fast, actionable feedback on every commit.'
6+
versions:
7+
feature: copilot
8+
contentType: how-tos
9+
category:
10+
- Author and optimize with Copilot
11+
---
12+
13+
{% data variables.copilot.copilot_code-review_short %} is also available for organization members without a {% data variables.product.prodname_copilot_short %} license, when enabled by an enterprise administrator or organization owner. See [{% data variables.copilot.copilot_code-review_short %} for organization members without a {% data variables.product.prodname_copilot_short %} license](/copilot/concepts/agents/code-review#copilot-code-review-for-organization-members-without-a-copilot-license).
14+
15+
## Request a review from {% data variables.product.prodname_copilot_short %}
16+
17+
1. On {% data variables.product.prodname_dotcom_the_website %}, create or open a pull request.
18+
1. Open the **Reviewers** menu, then select **{% data variables.product.prodname_copilot_short %}**.
19+
20+
![Screenshot of selecting '{% data variables.product.prodname_copilot_short %}' from the 'Reviewers' menu.](/assets/images/help/copilot/code-review/request-review@2x.png)
21+
22+
1. Wait for {% data variables.product.prodname_copilot_short %} to finish reviewing. This usually takes less than 30 seconds.
23+
24+
1. Read through {% data variables.product.prodname_copilot_short %}'s comments on the pull request.
25+
26+
![Screenshot of a code review left by {% data variables.product.prodname_copilot_short %}.](/assets/images/help/copilot/code-review/review-comment@2x.png)
27+
28+
{% data variables.product.prodname_copilot_short %} always leaves a "Comment" review, not an "Approve" or "Request changes" review. Its reviews do not count toward required approvals and will not block merging.
29+
30+
{% data variables.product.prodname_copilot_short %}'s review comments work like comments from human reviewers. Add reactions, reply, resolve, or hide them. Any replies you add are visible to other people but not to {% data variables.product.prodname_copilot_short %}.
31+
32+
## Work with suggested changes
33+
34+
{% data variables.product.prodname_copilot_short %}'s feedback often includes suggested changes you can apply in a few clicks. Accept a single suggestion or group multiple suggestions into one commit. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request).
35+
36+
To have {% data variables.copilot.copilot_cloud_agent %} implement suggested changes directly:
37+
38+
1. Opt into the {% data variables.release-phases.public_preview %} for {% data variables.copilot.copilot_code-review-tools_short %} and enable {% data variables.copilot.copilot_cloud_agent %}.
39+
1. On a review comment from {% data variables.copilot.copilot_code-review %}, click **Implement suggestion**. This creates a draft comment where you instruct {% data variables.product.prodname_copilot_short %} to address specific feedback. {% data variables.product.prodname_copilot_short %} then creates a new pull request against your branch with the suggestions applied.
40+
41+
## Provide feedback on reviews
42+
43+
Rate {% data variables.product.prodname_copilot_short %}'s comments to help improve future suggestions.
44+
45+
1. On a review comment from {% data variables.product.prodname_copilot_short %}, click the thumbs up (:+1:) or thumbs down (:-1:) button.
46+
47+
![Screenshot showing a {% data variables.copilot.copilot_code-review_short %} comment with the thumbs up and thumbs down buttons.](/assets/images/help/copilot/code-review/feedback-controls@2x.png)
48+
49+
1. If you click thumbs down, optionally pick a reason and leave a comment, then click **Submit feedback**.
50+
51+
![Screenshot of the form for providing additional information when you give negative feedback on a comment from {% data variables.product.prodname_copilot_short %}.](/assets/images/help/copilot/code-review/feedback-modal@2x.png)
52+
53+
## Request a re-review
54+
55+
{% data variables.product.prodname_copilot_short %} does not automatically re-review when you push new changes. To request a re-review, click the {% octicon "sync" aria-label="Re-request review" %} button next to {% data variables.product.prodname_copilot_short %}'s name in the **Reviewers** menu.
56+
57+
When re-reviewing, {% data variables.product.prodname_copilot_short %} may repeat previous comments, even if you resolved or downvoted them.
58+
59+
## Enable automatic reviews
60+
61+
By default, you request reviews from {% data variables.product.prodname_copilot_short %} manually on each pull request. To enable automatic reviews for all pull requests, see [AUTOTITLE](/copilot/how-tos/agents/copilot-code-review/automatic-code-review).
62+
63+
## Customize reviews with custom instructions
64+
65+
{% data reusables.copilot.code-review.custom-instructions-information %}
66+
67+
## Further reading
68+
69+
* [AUTOTITLE](/copilot/concepts/code-review)
70+
* [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: 'Use {% data variables.product.prodname_copilot_short %} agents'
3+
shortTitle: 'Use {% data variables.product.prodname_copilot_short %} agents'
4+
intro: 'Delegate tasks to {% data variables.product.prodname_copilot %} agents on {% data variables.product.github %}, track their progress, and review the results.'
5+
versions:
6+
feature: copilot
7+
children:
8+
- /overview
9+
- /kick-off-a-task
10+
- /research-plan-iterate
11+
- /manage-and-track-agents
12+
- /copilot-code-review
13+
- /review-copilot-output
14+
contentType: how-tos
15+
---
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Kick off a task with {% data variables.product.prodname_copilot_short %} agents on {% data variables.product.github %}
3+
shortTitle: Kick off a task
4+
intro: 'Decide whether {% data variables.copilot.copilot_cloud_agent %} creates a pull request immediately or works on a branch you review and iterate on first.'
5+
product: '{% data reusables.gated-features.copilot-cloud-agent %}<br><a href="https://github.com/features/copilot/plans?ref_product=copilot&ref_type=purchase&ref_style=button" 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>'
6+
versions:
7+
feature: copilot
8+
contentType: how-tos
9+
category:
10+
- Author and optimize with Copilot
11+
---
12+
13+
You can start a {% data variables.copilot.copilot_cloud_agent %} task in several ways. **Assigning an issue** always creates a pull request. **Starting with a prompt** works on a branch by default, giving you a chance to review, steer, and iterate before you open a pull request. **Seeding a repository** creates a draft pull request with scaffolded code.
14+
15+
## Assign an issue to {% data variables.product.prodname_copilot_short %}
16+
17+
Assigning an issue always creates a pull request. {% data variables.product.prodname_copilot_short %} works on the task and requests your review when it finishes.
18+
19+
1. In the right sidebar of the issue, click **Assignees**.
20+
1. Click **Copilot** from the assignees list.
21+
1. Optionally, add context in the **Optional prompt** field—for example, coding patterns, files to modify, or testing requirements.
22+
1. Optionally, change the target repository or base branch using the dropdown menus.
23+
24+
{% data reusables.copilot.optional-select-custom-agent-dotcom %}
25+
{% data reusables.copilot.optional-select-copilot-cloud-agent-model %}
26+
27+
{% data variables.product.prodname_copilot_short %} receives the issue title, description, and existing comments at assignment time. It does not see comments added after assignment, so post follow-up information on the pull request instead.
28+
29+
## Start a task with a prompt
30+
31+
{% data variables.copilot.copilot_cloud_agent_short_cap_c %} works on a branch by default. You can review the diff, iterate with follow-up prompts, and create a pull request when you're ready.
32+
33+
{% data reusables.copilot.open-agents-panel-or-page %}
34+
{% data reusables.copilot.cloud-agent.new-agent-task-form-instructions %}
35+
36+
The same prompt box is available on your [dashboard](https://github.com) and in {% data variables.copilot.copilot_chat_short %} (type `/task`).
37+
38+
For the full workflow of researching, planning, and iterating before creating a pull request, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/research-plan-iterate).
39+
40+
## Seed a new repository
41+
42+
When you create a new repository, you can have {% data variables.product.prodname_copilot_short %} generate starter code.
43+
44+
{% data reusables.repositories.create_new %}
45+
1. In the **Prompt** field, describe what you want {% data variables.product.prodname_copilot_short %} to build — for example, `Create a Rust CLI for converting CSV spreadsheets to Markdown`.
46+
{% data reusables.repositories.create-repo %}
47+
48+
{% data variables.product.prodname_copilot_short %} opens a draft pull request with the scaffolded code.
49+
50+
## Further reading
51+
52+
* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results)
53+
* [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents)
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: Manage and track {% data variables.copilot.copilot_cloud_agent %} sessions
3+
shortTitle: Manage and track agents
4+
intro: 'Monitor your agent''s progress in real time, steer it with follow-up prompts, and stop or archive sessions.'
5+
product: '{% data reusables.gated-features.copilot-cloud-agent %}<br><a href="https://github.com/features/copilot/plans?ref_product=copilot&ref_type=purchase&ref_style=button" 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>'
6+
versions:
7+
feature: copilot
8+
contentType: how-tos
9+
category:
10+
- Author and optimize with Copilot
11+
redirect_from:
12+
- /copilot/how-tos/use-copilot-agents/manage-agents
13+
---
14+
15+
Use the agents panel on {% data variables.product.github %} to start, monitor, and manage agent sessions across your repositories.
16+
17+
## Monitor agent activity
18+
19+
Track sessions from the agents panel (available from any page on {% data variables.product.github %}) or from the [agents page](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text). Sessions that you started, or that another user prompted {% data variables.product.prodname_copilot_short %} to work on, appear in your sessions list.
20+
21+
Click a session to open the session log and overview, where you can monitor the agent's progress, token usage, and session length.
22+
23+
## Review session logs
24+
25+
Session logs show {% data variables.product.prodname_copilot_short %}'s internal reasoning and the tools it used to understand your repository, make changes, and validate its work. {% data variables.product.prodname_copilot_short %} has its own ephemeral development environment, so it can run automated tests and linters to validate changes before pushing.
26+
27+
## Trace commits to session logs
28+
29+
Commits from {% data variables.copilot.copilot_cloud_agent %} are authored by {% data variables.product.prodname_copilot_short %}, with the person who started the task listed as co-author. Each commit message includes a link to the session logs, so you can trace why a change was made during code review or an audit. Commits are signed and appear as "Verified" on {% data variables.product.github %}.
30+
31+
## Steer an agent session
32+
33+
If {% data variables.product.prodname_copilot_short %} is heading in the wrong direction, or you realize your original prompt needs adjusting, you can redirect it without stopping the session.
34+
35+
1. Open the [agents page](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text) and select the session.
36+
1. In the prompt box below the session log, type your follow-up. For example:
37+
38+
```text
39+
Use our existing ErrorHandler utility class instead of writing custom try-catch blocks for each endpoint.
40+
```
41+
42+
1. Press <kbd>Enter</kbd>. {% data variables.product.prodname_copilot_short %} implements your input after it finishes its current tool call.
43+
44+
Each steering message uses **one premium request**. Steering is not available for third-party coding agents.
45+
46+
## Stop a session
47+
48+
If the task no longer needs to be done, or you want to start over with a new prompt, click **Stop session** in the session log viewer. Stopping a session ends the {% data variables.product.prodname_actions %} run and preserves any commits already pushed.
49+
50+
## Archive sessions
51+
52+
Archive stopped sessions to remove them from your sessions list.
53+
54+
1. Open the stopped session.
55+
1. Click **{% octicon "kebab-horizontal" aria-label="More actions" %}**, then click **{% octicon "inbox" aria-hidden="true" aria-label="inbox" %} Archive session**.
56+
1. In the dialog, click **Yes, archive**.
57+
58+
## Further reading
59+
60+
* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results)
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Get started with {% data variables.product.prodname_copilot_short %} agents on {% data variables.product.github %}
3+
shortTitle: Get started
4+
intro: Try {% data variables.copilot.copilot_cloud_agent %} end-to-end in about ten minutes.
5+
product: '{% data reusables.gated-features.copilot-cloud-agent %}<br><a href="https://github.com/features/copilot/plans?ref_product=copilot&ref_type=purchase&ref_style=button" 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>'
6+
allowTitleToDifferFromFilename: true
7+
versions:
8+
feature: copilot
9+
contentType: how-tos
10+
---
11+
12+
## Prerequisite
13+
14+
You need a repository where {% data variables.copilot.copilot_cloud_agent %} is enabled. For {% data variables.copilot.copilot_business_short %} and {% data variables.copilot.copilot_enterprise_short %} subscribers, an administrator must enable the agent before you can use it. See [AUTOTITLE](/copilot/concepts/agents/cloud-agent/access-management).
15+
16+
## Step 1: Assign an issue to {% data variables.product.prodname_copilot_short %}
17+
18+
Pick a repository where {% data variables.copilot.copilot_cloud_agent %} is enabled and find an open issue—or create a small one, such as "Add a CONTRIBUTING.md file."
19+
20+
1. In the right sidebar, click **Assignees**, then select **Copilot**.
21+
1. Optionally, add instructions in the **Optional prompt** field.
22+
23+
For example: `Keep the file short and include a code of conduct section.`
24+
1. Click **Assign**.
25+
26+
{% data variables.product.prodname_copilot_short %} starts a session and begins working on a pull request.
27+
28+
## Step 2: Start a research task at the same time
29+
30+
While {% data variables.product.prodname_copilot_short %} works on the issue, start a second, non-coding task to see two sessions running in parallel.
31+
32+
1. In the same repository, click the **{% octicon "agent" aria-hidden="true" aria-label="agent" %} Agents** tab.
33+
1. Type a research prompt.
34+
35+
For example: `Investigate which dependencies in this repo are outdated and summarize what upgrading would involve.`
36+
1. Click **{% octicon "paper-airplane" aria-label="Start task" %}** or press <kbd>Enter</kbd>.
37+
38+
A second session appears in the panel alongside the first.
39+
40+
## Step 3: Watch both sessions
41+
42+
Both sessions update in real time. Click either session to view the agent's reasoning, the files it reads, and the changes it makes.
43+
44+
While a session is running, type in the prompt box below the log to steer the agent.
45+
46+
For example: `Focus on security-related dependencies first.`
47+
48+
For more details on monitoring, steering, and stopping sessions, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents).
49+
50+
## Step 4: Request a {% data variables.copilot.copilot_code-review_short %} on the pull request
51+
52+
When the coding task finishes, {% data variables.product.prodname_copilot_short %} opens a pull request and adds you as a reviewer.
53+
54+
1. Open the pull request from the notification or from the session log.
55+
1. In the right sidebar, click **Reviewers**, then select **{% data variables.product.prodname_copilot_short %}**.
56+
1. Wait for {% data variables.copilot.copilot_code-review_short %} to leave comments—usually under 30 seconds.
57+
58+
Read through the review comments. {% data variables.product.prodname_copilot_short %} may suggest changes you can apply directly with a click.
59+
60+
For the full set of code-review options, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/copilot-code-review).
61+
62+
## Step 5: Review the output and iterate
63+
64+
Now review the code changes yourself, just as you would for any contributor's pull request.
65+
66+
* **Request changes from {% data variables.product.prodname_copilot_short %}** — mention `@copilot` in a comment describing what to fix. {% data variables.product.prodname_copilot_short %} pushes new commits to the same branch.
67+
* **Make changes yourself** — check out the branch and push your own commits.
68+
* **Approve and merge** — when you're satisfied, merge the pull request.
69+
70+
For more on reviewing {% data variables.product.prodname_copilot_short %}'s work, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output).
71+
72+
## Next steps
73+
74+
* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results) — Write effective prompts and get the most out of agents.

0 commit comments

Comments
 (0)