{"meta":{"title":"About Copilot automations","intro":"Automations let you run Copilot cloud agent automatically, on a schedule or in response to events in a repository.","product":"GitHub Copilot","breadcrumbs":[{"href":"/en/enterprise-cloud@latest/copilot","title":"GitHub Copilot"},{"href":"/en/enterprise-cloud@latest/copilot/concepts","title":"Concepts"},{"href":"/en/enterprise-cloud@latest/copilot/concepts/agents","title":"Agents"},{"href":"/en/enterprise-cloud@latest/copilot/concepts/agents/cloud-agent","title":"Cloud agent"},{"href":"/en/enterprise-cloud@latest/copilot/concepts/agents/cloud-agent/about-automations","title":"About automations"}],"documentType":"article"},"body":"# About Copilot automations\n\nAutomations let you run Copilot cloud agent automatically, on a schedule or in response to events in a repository.\n\n## Overview\n\nWith automations, you can set up Copilot cloud agent to run automatically, either on a schedule or in response to an event in a repository. Automations can take action within the repository where they are configured, such as opening a pull request or labeling an issue.\n\nWith a manually started Copilot cloud agent session, you give Copilot a task each time you want work done. With automations, you define a task once, and Copilot runs it automatically whenever the automation's trigger fires.\n\nFor example, you can use automations to:\n\n* **Triage incoming issues**: automatically label new issues as a bug, an enhancement, or other, based on their content.\n* **Fix failing tests nightly**: each night, check for failing tests on the `main` branch, attempt a fix, and open a draft pull request.\n* **Prepare weekly release notes**: draft release notes and open a pull request on a schedule.\n\nWhen you create an automation, you define:\n\n* A **name** to identify the automation.\n* A **prompt** describing the task you want Copilot to perform.\n* One or more **triggers** that determine when the automation runs.\n* The **model** Copilot uses.\n* The **tools** Copilot can use, which control what actions it can take in your repository.\n\nFor instructions on creating and managing automations, see [Creating automations with Copilot cloud agent](/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/cloud-agent/create-automations).\n\n## Availability and permissions\n\nFor automations to be available in a repository, all of the following must be true:\n\n* The repository must be **private or internal**. Automations are not available in public repositories.\n* Copilot cloud agent must be enabled for the repository. If you have Copilot Business or Copilot Enterprise, an administrator must enable the Copilot cloud agent policy. See [Managing access to GitHub Copilot cloud agent](/en/enterprise-cloud@latest/copilot/concepts/agents/cloud-agent/access-management).\n* The organization must allow both Copilot cloud agent and automations in the repository (both are enabled by default). See [Adding GitHub Copilot cloud agent to your organization](/en/enterprise-cloud@latest/copilot/how-tos/administer-copilot/manage-for-organization/add-copilot-cloud-agent).\n\nAutomations are available with the GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Max, GitHub Copilot Business, and GitHub Copilot Enterprise plans.\n\nAny user with **write access** to a repository can create automations in that repository.\n\nYou can create and manage automations from:\n\n* The **Agents** tab in a repository on GitHub, in the **Automations** pane.\n* The **Automations** tab in the GitHub Copilot app.\n\n## Triggers\n\nAn automation runs when one of its triggers fires. The following triggers are available:\n\n* **On a schedule**: the automation runs at a recurring interval—hourly, daily, or weekly.\n* **When an issue is created**: the automation runs each time an issue is opened in the repository.\n* **When a pull request is opened**: the automation runs each time a pull request is opened in the repository.\n* **When a pull request is synchronized**: the automation runs each time new commits are pushed to a pull request in the repository.\n\nYou can optionally configure filters for event-based triggers:\n\n* For when **an issue is created**, add a search query filter.\n* For when **a pull request is opened** and when **a pull request is synchronized**, add a search query filter and a filter for files changed in the pull request.\n\nTo reduce the risk of prompt injection, automations ignore events triggered by users who don't have write access to the repository by default. This helps prevent untrusted users—for example, an external contributor opening an issue—from causing Copilot to take action. You can opt in to allowing these events if you need to. For more information, see [Security and safety](#security-and-safety).\n\n## Tools and actions\n\nThe **tools** you select when you create an automation determine what Copilot can do when the automation runs.\n\nFor example, you might allow Copilot to push changes, update issue labels, or create a pull request.\n\nSelecting tools is the main way you control the scope of an automation. Grant only the tools that the task needs, so that Copilot can't take actions you didn't intend.\n\nYou can manually select the tools you want to enable, or you can use the **Suggest tools** button to have Copilot suggest tools based on your prompt.\n\nAn automation can only take action in the single repository it is scoped to.\n\nWhen an automation changes an issue, it can explain each change and rate its confidence, applying high-confidence changes automatically and proposing others for your review. See [About rationale, confidence, and approvals for issues](/en/enterprise-cloud@latest/copilot/concepts/agents/cloud-agent/about-automation-rationale-and-approvals).\n\n## Configuration inherited from the repository\n\nAutomations use the Copilot cloud agent configuration for the repository they are scoped to, including:\n\n* **Custom instructions**. See [Adding repository custom instructions for GitHub Copilot](/en/enterprise-cloud@latest/copilot/how-tos/copilot-on-github/customize-copilot/add-custom-instructions/add-repository-instructions).\n* **Agent skills**. See [Adding agent skills for GitHub Copilot](/en/enterprise-cloud@latest/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/add-skills).\n* **Firewall rules**. See [Customizing or disabling the firewall for GitHub Copilot](/en/enterprise-cloud@latest/copilot/how-tos/copilot-on-github/customize-copilot/customize-the-firewall).\n* **Secrets and variables**. See [Configure secrets and variables for Copilot cloud agent](/en/enterprise-cloud@latest/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/configure-secrets-and-variables).\n\nAutomations are stored separately from your repository's contents. They are not committed to Git, so they are not versioned alongside your code or managed through pull requests.\n\n## Visibility\n\nAn automation is **private to the user who created it**. Other people, including repository administrators, can't see your automations.\n\nHowever, the Copilot cloud agent **sessions** that an automation starts are visible to other people with access to the repository, just like any other Copilot cloud agent session. Anyone who can see these sessions can see the prompt, the session logs, and any pull requests or other changes Copilot creates.\n\nBecause sessions and their logs are visible to others, you should not include secrets or other sensitive information directly in an automation's prompt. To give Copilot access to sensitive values, use repository secrets instead. See [Configure secrets and variables for Copilot cloud agent](/en/enterprise-cloud@latest/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/configure-secrets-and-variables).\n\n## Billing\n\nEach time an automation runs, it starts a Copilot cloud agent session that uses GitHub Actions minutes and GitHub AI Credits. This usage is billed to the user who created the automation. For more information, see [GitHub Copilot licenses](/en/enterprise-cloud@latest/billing/concepts/product-billing/github-copilot-licenses).\n\n## Security and safety\n\nAutomations run Copilot without a person initiating each task, so they carry some additional risks. GitHub provides built-in protections to help mitigate these risks.\n\n* **Attribution.** Pull requests opened and code pushed by an automation are attributed to the user who created the automation. As with pull requests that user creates themselves, they can't approve those pull requests, which preserves the expected review controls.\n* **Least-privilege tools.** You choose exactly which tools an automation can use, so you can limit it to only the actions the task requires.\n* **Untrusted input.** By default, automations ignore events triggered by users without write access to the repository, to reduce the risk of prompt injection from untrusted users.\n* **Workflow runs.** As with all Copilot cloud agent work, GitHub Actions workflows don't run on a pull request until a user with write access approves them. This mitigates the risk of a pull request opened by an automation triggering workflows automatically.\n\nFor more information about how GitHub mitigates the risks of Copilot cloud agent, see [Risks and mitigations for GitHub Copilot cloud agent](/en/enterprise-cloud@latest/copilot/concepts/agents/cloud-agent/risks-and-mitigations).\n\n## Further reading\n\n* [Creating automations with Copilot cloud agent](/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/cloud-agent/create-automations)\n* [About GitHub Copilot cloud agent](/en/enterprise-cloud@latest/copilot/concepts/agents/cloud-agent/about-cloud-agent)\n* To learn how to store your automation as code, review it through pull requests, or run it with a different coding agent, see [About GitHub Agentic Workflows](/en/enterprise-cloud@latest/copilot/concepts/agents/about-github-agentic-workflows)"}