Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions content/copilot/concepts/agents/code-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,24 @@ Premium requests generated by users without a license are not attributed to any

{% data reusables.copilot.ccr-model-settings %}

## Providing instructions for {% data variables.product.prodname_copilot_short %} code reviews

You can tailor the reviews that {% data variables.product.prodname_copilot_short %} generates by providing custom instructions. This helps {% data variables.product.prodname_copilot_short %} to review the code in a way that matches your team's coding standards, tools, and practices. See [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions?tool=webui) and [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-organization-instructions).

## Validating {% data variables.product.prodname_copilot_short %} code reviews

{% data variables.product.prodname_copilot_short %} isn't guaranteed to spot all problems or issues in a pull request, and sometimes it will make mistakes. Always validate {% data variables.product.prodname_copilot_short %}'s feedback carefully, and supplement {% data variables.product.prodname_copilot_short %}'s feedback with a human review.

For more information, see [AUTOTITLE](/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review).

## Enhancing {% data variables.product.prodname_copilot_short %}'s knowledge of a repository

The more {% data variables.product.prodname_copilot_short %} knows about the code in your repository, the tools you use, and your coding standards and practices, the more accurate and useful its reviews will become. There are two ways you can enhance {% data variables.product.prodname_copilot_short %}'s knowledge of your repositories.

* **Custom instructions**

These are short, natural‑language statements that you write and store as one or more files in a repository. If you are the owner of an organization on {% data variables.product.github %} you can also define custom instructions in the settings for your organization. For more information, see [AUTOTITLE](/copilot/concepts/prompting/response-customization?tool=webui#about-repository-custom-instructions).

* **{% data variables.copilot.copilot_memory %}** ({% data variables.release-phases.public_preview %})

If you have a {% data variables.copilot.copilot_pro_short %} or {% data variables.copilot.copilot_pro_plus_short %} plan, you can enable {% data variables.copilot.copilot_memory %}. This allows {% data variables.product.prodname_copilot_short %} to store useful details it has worked out for itself about a repository. {% data variables.product.prodname_copilot_short %} can then use this information when it is reviewing pull requests in that repository. For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-memory).

## About automatic pull request reviews

By default, {% data variables.product.prodname_copilot_short %} will only review a pull request if it's assigned to the pull request in the same way you would assign a human reviewer. However:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ redirect_from:
- /copilot/concepts/coding-agent/about-copilot-coding-agent
- /copilot/concepts/coding-agent/coding-agent
contentType: concepts
category:
category:
- Learn about Copilot
---

Expand Down Expand Up @@ -91,6 +91,18 @@ Support for selecting a model is coming soon for {% data variables.copilot.copil

For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/changing-the-ai-model).

## Enhancing {% data variables.copilot.copilot_coding_agent %}'s knowledge of a repository

The more {% data variables.copilot.copilot_coding_agent %} knows about the code in your repository, the tools you use, and your coding standards and practices, the more effective it will become. There are two ways you can enhance {% data variables.copilot.copilot_coding_agent %}'s knowledge of a repository.

* **Custom instructions**

These are short, natural‑language statements that you write and store as one or more files in a repository. If you are the owner of an organization on {% data variables.product.github %} you can also define custom instructions in the settings for your organization. For more information, see [AUTOTITLE](/copilot/concepts/prompting/response-customization?tool=webui#about-repository-custom-instructions).

* **{% data variables.copilot.copilot_memory %}** ({% data variables.release-phases.public_preview %})

If you have a {% data variables.copilot.copilot_pro_short %} or {% data variables.copilot.copilot_pro_plus_short %} plan, you can enable {% data variables.copilot.copilot_memory %}. This allows {% data variables.product.prodname_copilot_short %} to store useful details it has worked out for itself about a repository. {% data variables.copilot.copilot_coding_agent %} can then use this information when it is working in that repository. For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-memory).

## {% data variables.copilot.copilot_coding_agent %} usage costs

{% data variables.copilot.copilot_coding_agent %} uses {% data variables.product.prodname_actions %} minutes and {% data variables.product.prodname_copilot_short %} premium requests.
Expand Down
73 changes: 73 additions & 0 deletions content/copilot/concepts/agents/copilot-memory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: About agentic memory for GitHub Copilot
shortTitle: Copilot Memory
allowTitleToDifferFromFilename: true
intro: 'Find out how {% data variables.product.prodname_copilot_short %} can store details it has learned about a codebase and use that knowledge for future work in a repository.'
product: '{% data reusables.gated-features.copilot-memory %}<br><a href="https://github.com/features/copilot/plans?ref_product=copilot&ref_type=engagement&ref_style=button&utm_source=docs-web-copilot-memory-concept&utm_medium=docs&utm_campaign=dec25postuniverse" 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
contentType: concepts
category:
- Learn about Copilot
---

> [!NOTE]
> This feature is currently in {% data variables.release-phases.public_preview %} and is subject to change.
## Introduction

As a developer, when you start working on an existing codebase—perhaps as a new member of the development team—you can read the README for the repository, the coding conventions documentation, and other information to help you understand the repository and how you should work when updating or adding code. This will help you submit good quality pull requests. However, the quality of work you're able to deliver will steadily improve as you work on the codebase and learn more about it. In the same way, by allowing {% data variables.product.prodname_copilot_short %} to build its own understanding of your repository, you can enable it to become increasingly effective over time.

Copilot can develop a persistent understanding of a repository by storing "memories."

Memories are tightly scoped pieces of information about a repository, that are deduced by Copilot as it works on the repository. Memories are:

* Repository-specific.
* Only created in response to {% data variables.product.prodname_copilot_short %} activity initiated by users who have had {% data variables.copilot.copilot_memory %} enabled.

Memories created by one part of {% data variables.product.prodname_copilot_short %} can be used by another part of {% data variables.product.prodname_copilot_short %}. So, for example, if {% data variables.copilot.copilot_coding_agent %} discovers how your repository handles database connections, {% data variables.copilot.copilot_code-review_short %} can later apply that knowledge to spot inconsistent patterns in a pull request it is reviewing. Similarly, if {% data variables.copilot.copilot_code-review_short %} learns about settings that must stay synchronized in two separate files, then {% data variables.copilot.copilot_coding_agent %} will know that if it alters the settings in one of those files it must update the other file accordingly.

## Benefits of using {% data variables.copilot.copilot_memory %}

AI that is stateless and doesn't retain an understanding of a codebase between separate human/AI interactions, requires you either to repeatedly explain coding conventions and important details about specific code in your prompts, or to create detailed custom instructions files, which you must then maintain.

{% data variables.copilot.copilot_memory %}:

* Reduces the burden of repeatedly providing the same details in your prompts.
* Reduces the need for regular, manual maintenance of custom instruction files.

By building and maintaining a persistent, repository-level memory, {% data variables.product.prodname_copilot_short %} develops its own knowledge of your codebase, adapts to your coding requirements, and increases the value it can deliver over time.

## Where is {% data variables.copilot.copilot_memory %} used?

Currently {% data variables.copilot.copilot_memory %} is used by {% data variables.copilot.copilot_coding_agent %} and {% data variables.copilot.copilot_code-review_short %} when these features are working on pull requests on the {% data variables.product.github %} website, and by {% data variables.copilot.copilot_cli_short %}. Memories are only created and used by {% data variables.product.prodname_copilot_short %} when {% data variables.copilot.copilot_memory %} has been enabled for the user initiating the {% data variables.product.prodname_copilot_short %} operation.

Agentic memory will be extended to other parts of {% data variables.product.prodname_copilot_short %}, and for personal and organizational scopes, in future releases.

## How memories are stored, retained and used

Each memory that {% data variables.product.prodname_copilot_short %} generates is stored with citations. These are references to specific code locations that support the memory. When {% data variables.product.prodname_copilot_short %} finds a memory that relates to the work it is doing, it checks the citations against the current codebase to validate that the information is still accurate and is relevant to the current branch. The memory is only used if it is successfully validated.

To avoid stale memories being retained, resulting in outdated information adversely affecting {% data variables.product.prodname_copilot_short %}'s decision making, memories are automatically deleted after 28 days.

If a memory is validated and used by {% data variables.product.prodname_copilot_short %}, then a new memory with the same details may be stored, which increases the longevity of that memory.

Memories can be created from code in pull requests that were closed without being merged. However, the validation mechanism ensures that such memories will not affect {% data variables.product.prodname_copilot_short %}'s behavior if there is no substantiating evidence in the current codebase.

{% data variables.product.prodname_copilot_short %} only creates memories in a repository in response to actions taken within that repository by people who have write permission for the repository, and for whom {% data variables.copilot.copilot_memory %} has been enabled. Memories are repository scoped, not user scoped, so all memories stored for a repository are available for use in {% data variables.product.prodname_copilot_short %} operations initiated by any user who has access to {% data variables.copilot.copilot_memory %} for that repository. The memories stored for a repository can only be used in {% data variables.product.prodname_copilot_short %} operations on that same repository. In this way, what {% data variables.product.prodname_copilot_short %} learns about a repository stays within that repository, ensuring privacy and security.

If you are the owner of a repository where {% data variables.copilot.copilot_memory %} is being used, you can review and manually delete the memories for that repository. See [AUTOTITLE](/copilot/how-tos/use-copilot-agents/copilot-memory).

## About enabling {% data variables.copilot.copilot_memory %}

{% data variables.copilot.copilot_memory %} is turned off by default and can be enabled in the enterprise, organization, and personal settings.

The ability to use {% data variables.copilot.copilot_memory %} is granted to users, rather than being enabled for repositories. After {% data variables.copilot.copilot_memory %} has been enabled for a user, {% data variables.product.prodname_copilot_short %} will be able to use agentic memory in any repository in which that person uses {% data variables.product.prodname_copilot %}.

When enabled at the enterprise or organization level, {% data variables.copilot.copilot_memory %} will be available to all organization members who receive a {% data variables.product.prodname_copilot_short %} subscription from that organization.

Users who have an individual {% data variables.product.prodname_copilot_short %} subscription, from a {% data variables.copilot.copilot_pro_short %} or {% data variables.copilot.copilot_pro_plus_short %} plan, must enable {% data variables.copilot.copilot_memory %} in their personal {% data variables.product.prodname_copilot_short %} settings on {% data variables.product.github %}.

For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/copilot-memory).
1 change: 1 addition & 0 deletions content/copilot/concepts/agents/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ children:
- /coding-agent
- /code-review
- /about-copilot-cli
- /copilot-memory
- /openai-codex
- /about-agent-skills
- /enterprise-management
Expand Down
4 changes: 4 additions & 0 deletions content/copilot/concepts/prompting/response-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ Here are some common use cases and examples for each type of custom instructions
* [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
* [AUTOTITLE](/copilot/customizing-copilot/adding-organization-custom-instructions-for-github-copilot)

## Further reading

* [AUTOTITLE](/copilot/concepts/agents/copilot-memory)

{% endwebui %}

<!-- end of web browser tab -->
Expand Down
4 changes: 4 additions & 0 deletions content/copilot/get-started/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ AI-generated text completion to help you write pull request descriptions quickly

Enhance {% data variables.copilot.copilot_chat_short %} responses by providing contextual details on your preferences, tools, and requirements. See [AUTOTITLE](/copilot/concepts/about-customizing-github-copilot-chat-responses).

### {% data variables.copilot.copilot_memory %} ({% data variables.release-phases.public_preview %})

{% data variables.product.prodname_copilot_short %} can deduce and store useful information about a repository, which {% data variables.copilot.copilot_coding_agent %} and {% data variables.copilot.copilot_code-review_short %} can use to improve the quality of their output when working in that repository. For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-memory).

### {% data variables.copilot.copilot_desktop_short %}

Automatically generate commit messages and descriptions with {% data variables.copilot.copilot_desktop_short %} based on the changes you make to your project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ For detailed setup instructions, see [Local {% data variables.product.github %}

* [AUTOTITLE](/copilot/how-tos/provide-context/use-mcp/set-up-the-github-mcp-server)
* [AUTOTITLE](/copilot/how-tos/provide-context/use-mcp/use-the-github-mcp-server)
* [AUTOTITLE](/copilot/how-tos/provide-context/use-mcp/configure-toolsets)
5 changes: 3 additions & 2 deletions content/copilot/how-tos/set-up/set-up-for-self.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ redirect_from:
- /copilot/get-started/setting-up-github-copilot/setting-up-github-copilot-for-yourself
- /copilot/how-tos/set-up/setting-up-github-copilot-for-yourself
contentType: how-tos
category:
category:
- Configure Copilot
---

Expand Down Expand Up @@ -55,8 +55,9 @@ All users can configure {% data variables.product.prodname_copilot_short %} sett

If you have your own {% data variables.product.prodname_copilot_short %} plan (instead of using your organization or enterprise's plan), you can:

* **Install Model Context Protocol (MCP) servers to integrate with {% data variables.copilot.copilot_chat_short %}. See [AUTOTITLE](/copilot/how-tos/context/model-context-protocol/extending-copilot-chat-with-mcp).
* **Install Model Context Protocol (MCP) servers** to integrate with {% data variables.copilot.copilot_chat_short %}. See [AUTOTITLE](/copilot/how-tos/context/model-context-protocol/extending-copilot-chat-with-mcp).
* **Manage policies**. See [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/managing-copilot-policies-as-an-individual-subscriber).
* **Enable {% data variables.copilot.copilot_memory %}**, which allows {% data variables.product.prodname_copilot_short %} to generate and store useful information about your repositories. See [AUTOTITLE](/copilot/concepts/agents/copilot-memory).

## 7. Start using {% data variables.product.prodname_copilot_short %}

Expand Down
Loading
Loading