REST API endpoints for agent automations
Use the REST API to manage agent automations.
List automations for user
Note
This endpoint is in public preview and is subject to change.
Lists automations created by the authenticated user across repositories they can read. This includes both personal and shared automations created by the caller, but excludes shared automations created by another user.
Use the repository-scoped list operation for those automations. The type filter
only narrows this creator-scoped collection.
To call this endpoint, OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "List automations for user"
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
GitHub App installation access tokens are not supported for this endpoint.
Parameters for "List automations for user"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
page integer The page number of the results to fetch. Default: |
per_page integer The number of results per page (max 100). Default: |
type string Filter automations by type. Can be one of: |
HTTP response status codes for "List automations for user"
| Status code | Description |
|---|---|
200 | Automations retrieved successfully |
400 | Bad request |
401 | Authentication required |
Code samples for "List automations for user"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/automationsAutomations retrieved successfully
Status: 200[
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"repository": {
"id": 123456,
"owner": "octo-org",
"name": "octo-repo"
},
"name": "Issue triage",
"enabled": true,
"type": "personal",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open"
}
},
"model": "gpt-5.4",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-03T14:30:00Z",
"created_by": {
"id": 123
}
}
]List automations for a repository
Note
This endpoint is in public preview and is subject to change.
Returns a paginated list of automations for a repository, including shared
automations and personal automations created by the caller.
total_count is the number of caller-visible automations matching the supplied
filters across all pages. Use the type field to distinguish personal and shared
automations.
GitHub App installation access tokens can list shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read). Personal automations require a user token.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "List automations for a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
Parameters for "List automations for a repository"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository. The name is not case sensitive. |
| Name, Type, Description |
|---|
page integer The page number of the results to fetch. Default: |
per_page integer The number of results per page (max 100). Default: |
type string Filter automations by type. Can be one of: |
HTTP response status codes for "List automations for a repository"
| Status code | Description |
|---|---|
200 | Automations retrieved successfully |
400 | Bad request |
401 | Authentication required |
404 | Resource not found |
Code samples for "List automations for a repository"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automationsAutomations retrieved successfully
Status: 200{
"automations": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Issue triage",
"enabled": true,
"type": "personal",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open"
}
},
"model": "gpt-5.4",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-03T14:30:00Z",
"created_by": {
"id": 123
}
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"name": "Nightly dependency sweep",
"enabled": true,
"type": "shared",
"require_actor_write_permission": false,
"triggers": {
"interval": {
"cadence": [
"daily"
],
"hour_utc": 3
}
},
"created_at": "2026-05-02T09:00:00Z",
"updated_at": "2026-05-04T11:15:00Z",
"created_by": {
"id": 456
}
}
],
"total_count": 3
}Create an automation for a repository
Note
This endpoint is in public preview and is subject to change.
Creates a new automation in a repository. Personal automations are private to their creator. Shared automations are visible to anyone with read access to the repository and manageable by anyone with write access to the repository.
GitHub App installation access tokens can create shared automations by setting
type to shared. The installation must belong to the repository owner and
the token must have "Agent tasks"
repository permissions (write). Personal automations require a user token.
For installation tokens, created_by identifies the App's bot account.
To call this endpoint, you must have write access to the repository and the "Allow automations" setting must be enabled for the repository.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Create an automation for a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (write)
Parameters for "Create an automation for a repository"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository. The name is not case sensitive. |
| Name, Type, Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name string RequiredThe name of the automation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
triggers object Trigger configuration for the automation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties of |
| Name, Type, Description | |||||||
|---|---|---|---|---|---|---|---|
interval object | |||||||
Properties of |
| Name, Type, Description |
|---|
cadence array of strings RequiredOne or more schedules on which the Automation runs.
Supported values are: |
hour_utc integer UTC hour anchor (0 through 23) for daily and weekly schedules. Omitted daily and weekly values default to |
day_of_week integer UTC weekday anchor for weekly schedules, where |
minute_utc integer UTC minute anchor for daily and weekly schedules. Omitted daily and weekly values default to Default: Can be one of: |
write_scope string Has no effect: scheduled runs can change any resource in the repository, and an organization or repository policy requiring trigger-scoped writes does not apply to them. Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_opened object Properties of issue_opened
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_labeled object Properties of issue_labeled
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
labels array of strings Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
workflow_run object Properties of workflow_run
| Name, Type, Description |
|---|
workflows array of strings RequiredWorkflow names matched against the name in each workflow YAML file. |
conclusions array of strings RequiredWorkflow conclusions to match. The current trigger supports failure.
Supported values are: |
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_opened object Properties of pull_request_opened
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_synchronize object Properties of pull_request_synchronize
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_merged object Properties of pull_request_merged
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_comment object Properties of issue_comment
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_comment object Properties of pull_request_comment
| Name, Type, Description |
|---|
comment_types array of strings RequiredPull request conversation and inline review comment types to match.
Supported values are: |
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_opened object Properties of discussion_opened
| Name, Type, Description |
|---|
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_updated object Properties of discussion_updated
| Name, Type, Description |
|---|
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_comment object Properties of discussion_comment
| Name, Type, Description |
|---|
comment_types array of strings Top-level discussion comments and replies to match. Omit to match both.
Supported values are: |
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_assigned object Properties of issue_assigned
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
assignees array of strings Affected assignee logins matched case-insensitively. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_assigned object Properties of pull_request_assigned
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
assignees array of strings Affected assignee logins matched case-insensitively. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
sub_issue_added object Properties of sub_issue_added
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_ready_for_review object Properties of pull_request_ready_for_review
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_labeled object Properties of pull_request_labeled
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
labels array of strings Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_merge_conflict object Properties of pull_request_merge_conflict
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_submitted object Properties of pull_request_review_submitted
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
states array of strings RequiredSubmitted review states to match.
Supported values are: |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_requested object Properties of pull_request_review_requested
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_closed object Properties of issue_closed
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_reopened object Properties of issue_reopened
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_closed object Properties of pull_request_closed
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_reopened object Properties of pull_request_reopened
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_converted_to_draft object Properties of pull_request_converted_to_draft
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_dismissed object Properties of pull_request_review_dismissed
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_thread_resolved object Properties of pull_request_review_thread_resolved
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_thread_unresolved object Properties of pull_request_review_thread_unresolved
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
automation_completed object Properties of automation_completed
| Name, Type, Description |
|---|
automation_ids array of strings RequiredUpstream Automation IDs in the same repository. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
automation_failed object Properties of automation_failed
| Name, Type, Description |
|---|
automation_ids array of strings RequiredUpstream Automation IDs in the same repository. An Automation cannot list itself, and a user-owned Automation can only be listed by its creator's user-owned Automations. |
reasons array of strings Failure reasons to match. Omit to match only reported failures.
Supported values are: |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
code_scanning_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of code_scanning_alert
| Name, Type, Description |
|---|
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
secret_scanning_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of secret_scanning_alert
| Name, Type, Description |
|---|
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
dependabot_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of dependabot_alert
| Name, Type, Description |
|---|
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
prompt string RequiredThe prompt for the automation.
model string The model to use for sessions triggered by this automation. Omit or leave empty to let the platform select the model.
reasoning_effort string The reasoning effort to use for sessions triggered by this automation. Omit or leave empty to use the model's default.
tools array of strings The tools available to the automation.
enabled boolean Whether the automation should be created enabled. Defaults to true when omitted.
Default: true
type string The type of automation, fixed at creation. personal keeps it private to its creator and its runs act as that user. shared makes it belong to the repository, visible to anyone with read access to the repository and maintainable by anyone with write access to the repository, and its runs act as the Copilot app rather than as a person. shared is rejected when repository ownership is not available for the repository. Supported values: personal, shared. Defaults to personal.
Default: personal
Can be one of: personal, shared
require_actor_write_permission boolean When true, event-triggered runs require the event actor to have repo write permission, even when the org's allow_read_access_triggers policy is enabled. When policy validation is enabled, explicitly setting false returns 422 if effective organization or repository policy disallows read-access triggers. If omitted, defaults to false when policy permits read-access triggers, otherwise true. The actor requirement does not apply to interval-scheduled runs, which always run as the automation owner.
continuous_history boolean When true, runs of this automation build on the session history of its previous runs, and runs of the same automation are serialized. Not tracked in revision history. Defaults to false.
HTTP response status codes for "Create an automation for a repository"
| Status code | Description |
|---|---|
201 | Automation created successfully |
400 | Bad request |
401 | Authentication required |
403 | Insufficient permissions |
404 | Resource not found |
422 | Validation Failed |
Code samples for "Create an automation for a repository"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations \
-d '{"name":"Issue triage","type":"personal","triggers":{"issue_opened":{"query":"is:open"}},"prompt":"Inspect the new issue and suggest labels, priority, and next steps.","tools":["github/get_file_contents","github/issue_read"],"model":"gpt-6-sol","reasoning_effort":"high"}'Automation created successfully
Status: 201{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Issue triage",
"enabled": true,
"type": "personal",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open"
}
},
"prompt": "Inspect the new issue and suggest labels, priority, and next steps.",
"tools": [
"github/get_file_contents",
"github/issue_read"
],
"model": "gpt-6-sol",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-01T12:00:00Z",
"created_by": {
"id": 123
}
}List available automation tools for a repository
Note
This endpoint is in public preview and is subject to change.
Lists available tools for automations in a repository, including both GitHub-provided tools and tools provided by custom MCP servers.
GitHub-provided tools are returned in named groups, with a name and description provided for each tool.
MCP entries describe configured tool selection, not live discovery or runtime
availability. An explicit allowlist is returned in tools, with each id in
<server-name>/<tool-name> format, for example sentry/list_issues. An allowlist of
["*"] is returned as supports_wildcard: true with an empty tools array. Server URLs,
authentication headers, environment variables, and credentials are never returned.
For MCP tools, a list of configured MCP servers is provided, along with
the tools allowlisted for each server. Where supports_wildcard is true,
any tool that exists on the server can be used.
GitHub App installation access tokens can list available automation tools. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read).
To call this endpoint, OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "List available automation tools for a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
Parameters for "List available automation tools for a repository"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository. The name is not case sensitive. |
HTTP response status codes for "List available automation tools for a repository"
| Status code | Description |
|---|---|
200 | Repository automation tool catalog retrieved successfully |
401 | Authentication required |
404 | Repository not found, inaccessible, or automations unavailable |
Code samples for "List available automation tools for a repository"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/available-toolsRepository automation tool catalog retrieved successfully
Status: 200{
"tool_groups": [
{
"id": "issues",
"title": "Issues",
"tools": [
{
"id": "github/issue_read",
"title": "Read issue",
"description": "Fetch a single issue by its number, including its title, body, state, labels, assignees, and other metadata.",
"scope": "read"
}
]
}
],
"mcp_servers": [
{
"name": "jira",
"tools": [
{
"id": "jira/search"
},
{
"id": "jira/get_issue"
}
],
"supports_wildcard": false
},
{
"name": "sentry",
"tools": [],
"supports_wildcard": true
}
]
}List available automation triggers for a repository
Note
This endpoint is in public preview and is subject to change.
Lists available triggers for automations in a repository.
Each available trigger includes a title and description that can be presented in user interfaces, plus a machine-readable schema of filters supported by the trigger.
GitHub App installation access tokens can list available automation triggers. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read).
To call this endpoint, OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "List available automation triggers for a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
Parameters for "List available automation triggers for a repository"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository. The name is not case sensitive. |
HTTP response status codes for "List available automation triggers for a repository"
| Status code | Description |
|---|---|
200 | Available automation triggers retrieved successfully |
401 | Authentication required |
404 | Repository not found, inaccessible, or automations unavailable |
Code samples for "List available automation triggers for a repository"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/available-triggersAvailable automation triggers retrieved successfully
Status: 200[
{
"id": "issue_opened",
"title": "Issue opened",
"description": "Runs when an issue is opened.",
"fields": [
{
"id": "query",
"label": "Issue query",
"required": false,
"description": "Only run for issues matching this query, using [issue search syntax](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests).",
"schema": {
"type": "string",
"minLength": 1
}
},
{
"id": "write_scope",
"label": "Write scope",
"required": false,
"description": "Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. Organization or repository policy may restrict the effective scope to `trigger`. Explicitly setting `repository` on create or edit returns 422 when policy validation is enabled and that policy applies.",
"schema": {
"type": "string",
"enum": [
"trigger",
"repository"
]
}
}
]
}
]Get an automation
Note
This endpoint is in public preview and is subject to change.
Fetches a repository automation by ID. The automation must be a personal automation belonging to you or a shared automation.
Shared automations are visible to anyone with read access to the repository.
The created_by field identifies the creator and is distinct from the automation's
type.
GitHub App installation access tokens can access shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read). Personal automations require a user token.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Get an automation"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
Parameters for "Get an automation"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository. The name is not case sensitive. |
automation_id string RequiredThe unique identifier of the automation. |
HTTP response status codes for "Get an automation"
| Status code | Description |
|---|---|
200 | Automation retrieved successfully |
400 | Bad request |
401 | Authentication required |
404 | Resource not found |
Code samples for "Get an automation"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_IDAutomation retrieved successfully
Status: 200{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Issue triage",
"enabled": true,
"type": "shared",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open"
}
},
"prompt": "Inspect the new issue and suggest labels, priority, and next steps.",
"model": "gpt-5.4",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-03T14:30:00Z",
"created_by": {
"id": 123
}
}Update an automation
Note
This endpoint is in public preview and is subject to change.
Updates an existing automation in a repository. The automation
must be a personal automation belonging to you or a shared automation.
Omitted fields are left unchanged. The automation's type is immutable.
GitHub App installation access tokens can update shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (write). Personal automations require a user token.
To call this endpoint, you must have write access to the repository and the "Allow automations" setting must be enabled for the repository.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Update an automation"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (write)
Parameters for "Update an automation"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository. The name is not case sensitive. |
automation_id string RequiredThe unique identifier of the automation. |
| Name, Type, Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name string The name of the automation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enabled boolean Set to true to enable, false to disable. Omit to leave unchanged. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
require_actor_write_permission boolean When true, event-triggered runs require the event actor to have repo write permission, even when the org's allow_read_access_triggers policy is enabled. When policy validation is enabled, explicitly setting false returns 422 if effective organization or repository policy disallows read-access triggers. The actor requirement does not apply to interval-scheduled runs, which always run as the automation owner. Omit to leave unchanged. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
continuous_history boolean When true, runs of this automation build on the session history of its previous runs, and runs of the same automation are serialized. Not tracked in revision history. Omit to leave unchanged. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
model string The model to use for sessions triggered by this automation. Omit to leave unchanged. Send an empty string to clear the override and let the platform select the model. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
reasoning_effort string The reasoning effort to use for sessions triggered by this automation. Omit to leave unchanged. Send an empty string to clear the override and use the model's default. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
triggers object Trigger configuration for the automation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties of |
| Name, Type, Description | |||||||
|---|---|---|---|---|---|---|---|
interval object | |||||||
Properties of |
| Name, Type, Description |
|---|
cadence array of strings RequiredOne or more schedules on which the Automation runs.
Supported values are: |
hour_utc integer UTC hour anchor (0 through 23) for daily and weekly schedules. Omitted daily and weekly values default to |
day_of_week integer UTC weekday anchor for weekly schedules, where |
minute_utc integer UTC minute anchor for daily and weekly schedules. Omitted daily and weekly values default to Default: Can be one of: |
write_scope string Has no effect: scheduled runs can change any resource in the repository, and an organization or repository policy requiring trigger-scoped writes does not apply to them. Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_opened object Properties of issue_opened
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_labeled object Properties of issue_labeled
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
labels array of strings Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
workflow_run object Properties of workflow_run
| Name, Type, Description |
|---|
workflows array of strings RequiredWorkflow names matched against the name in each workflow YAML file. |
conclusions array of strings RequiredWorkflow conclusions to match. The current trigger supports failure.
Supported values are: |
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_opened object Properties of pull_request_opened
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_synchronize object Properties of pull_request_synchronize
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_merged object Properties of pull_request_merged
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_comment object Properties of issue_comment
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_comment object Properties of pull_request_comment
| Name, Type, Description |
|---|
comment_types array of strings RequiredPull request conversation and inline review comment types to match.
Supported values are: |
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_opened object Properties of discussion_opened
| Name, Type, Description |
|---|
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_updated object Properties of discussion_updated
| Name, Type, Description |
|---|
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_comment object Properties of discussion_comment
| Name, Type, Description |
|---|
comment_types array of strings Top-level discussion comments and replies to match. Omit to match both.
Supported values are: |
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_assigned object Properties of issue_assigned
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
assignees array of strings Affected assignee logins matched case-insensitively. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_assigned object Properties of pull_request_assigned
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
assignees array of strings Affected assignee logins matched case-insensitively. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
sub_issue_added object Properties of sub_issue_added
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_ready_for_review object Properties of pull_request_ready_for_review
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_labeled object Properties of pull_request_labeled
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
labels array of strings Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_merge_conflict object Properties of pull_request_merge_conflict
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_submitted object Properties of pull_request_review_submitted
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
states array of strings RequiredSubmitted review states to match.
Supported values are: |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_requested object Properties of pull_request_review_requested
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_closed object Properties of issue_closed
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_reopened object Properties of issue_reopened
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_closed object Properties of pull_request_closed
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_reopened object Properties of pull_request_reopened
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_converted_to_draft object Properties of pull_request_converted_to_draft
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_dismissed object Properties of pull_request_review_dismissed
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_thread_resolved object Properties of pull_request_review_thread_resolved
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_thread_unresolved object Properties of pull_request_review_thread_unresolved
| Name, Type, Description |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
automation_completed object Properties of automation_completed
| Name, Type, Description |
|---|
automation_ids array of strings RequiredUpstream Automation IDs in the same repository. |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
automation_failed object Properties of automation_failed
| Name, Type, Description |
|---|
automation_ids array of strings RequiredUpstream Automation IDs in the same repository. An Automation cannot list itself, and a user-owned Automation can only be listed by its creator's user-owned Automations. |
reasons array of strings Failure reasons to match. Omit to match only reported failures.
Supported values are: |
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
code_scanning_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of code_scanning_alert
| Name, Type, Description |
|---|
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
secret_scanning_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of secret_scanning_alert
| Name, Type, Description |
|---|
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
dependabot_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of dependabot_alert
| Name, Type, Description |
|---|
write_scope string Override the Automation Can be one of: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
prompt string The prompt for the automation.
tools array of strings The tools available to the automation. Send an empty array to clear all tools.
HTTP response status codes for "Update an automation"
| Status code | Description |
|---|---|
200 | Automation updated successfully |
400 | Bad request |
401 | Authentication required |
404 | Resource not found |
422 | Validation Failed |
Code samples for "Update an automation"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_ID \
-d '{"name":"Issue triage and prioritization","enabled":true,"model":"gpt-5.4","reasoning_effort":"high","triggers":{"issue_opened":{"query":"is:open label:auto-triage"}}}'Automation updated successfully
Status: 200{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Issue triage and prioritization",
"enabled": true,
"type": "personal",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open label:auto-triage"
}
},
"prompt": "Inspect the new issue and suggest labels, priority, and next steps.",
"model": "gpt-5.4",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-03T14:30:00Z",
"created_by": {
"id": 123
}
}Delete an automation
Note
This endpoint is in public preview and is subject to change.
Deletes an automation in a repository. The automation must be a personal automation belonging to you or a shared automation.
GitHub App installation access tokens can delete shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (write). Personal automations require a user token.
To call this endpoint, you must have write access to the repository and the "Allow automations" setting must be enabled for the repository.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Delete an automation"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (write)
Parameters for "Delete an automation"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository. The name is not case sensitive. |
automation_id string RequiredThe unique identifier of the automation. |
HTTP response status codes for "Delete an automation"
| Status code | Description |
|---|---|
204 | Automation deleted successfully |
400 | Bad request |
401 | Authentication required |
404 | Resource not found |
Code samples for "Delete an automation"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_IDAutomation deleted successfully
Status: 204List tasks for an automation in a repository
Note
This endpoint is in public preview and is subject to change.
Returns a paginated list of tasks created by an automation in the specified repository. The automation must belong to that exact repository.
User-owned automation history is visible only to the automation's creator. Repository-owned automation history is visible to callers with read access to repository automations. Deleted and unlisted tasks are excluded. Tasks produced by private-session agents are excluded unless the caller created the task, is a task collaborator, or the task is shared.
A missing repository, an inaccessible repository, or an automation that does not
belong to the specified repository returns 404 without revealing which condition
occurred.
GitHub App installation access tokens can list tasks for shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read). Personal automations require a user token.
Fine-grained access tokens for "List tasks for an automation in a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
Parameters for "List tasks for an automation in a repository"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository. The name is not case sensitive. |
automation_id string RequiredThe unique identifier of the automation. |
| Name, Type, Description |
|---|
per_page integer The number of results per page (max 100). Default: |
page integer The page number of the results to fetch. Default: |
sort string The field to sort results by. Can be Default: Can be one of: |
direction string The direction to sort results. Can be Default: Can be one of: |
state string Comma-separated list of task states to filter by. Can be any combination of: |
is_archived boolean Filter by archived status. When Default: |
HTTP response status codes for "List tasks for an automation in a repository"
| Status code | Description |
|---|---|
200 | Automation task history retrieved successfully |
401 | Authentication required |
404 | Repository or automation not found, inaccessible, or unavailable |
422 | Validation failed |
Code samples for "List tasks for an automation in a repository"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_ID/tasksAutomation task history retrieved successfully
Status: 200{
"tasks": [
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"name": "Triage issue #42",
"creator": {
"id": 123
},
"creator_type": "user",
"repository": {
"id": 1296269
},
"state": "completed",
"session_count": 1,
"artifacts": [],
"archived_at": null,
"created_at": "2026-05-02T12:00:00Z",
"updated_at": "2026-05-02T12:05:00Z"
}
]
}Run an automation
Note
This endpoint is in public preview and is subject to change.
Runs an automation in a repository. Set event to manual and optionally include
context of up to 10,000 characters, which will be injected into the automation's
prompt.
The repository must have the "Allow automations" setting enabled, and the automation must be a personal automation belonging to you or a shared automation.
GitHub App installation access tokens can run shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (write). Personal automations require a user token.
A successful response accepts the run request and includes a preallocated
task_id, which can be fetched with the "Get a task by repo" Agent tasks API.
It does not confirm execution or task creation. Task creation is asynchronous,
so fetching the task immediately may return 404 Not Found, and downstream
skips or failures can prevent its creation.
To call this endpoint, you must have write access to the repository.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Run an automation"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (write)
Parameters for "Run an automation"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository. The name is not case sensitive. |
automation_id string RequiredThe unique identifier of the automation. |
| Name, Type, Description |
|---|
event string RequiredThe event to trigger. Only Value: |
context string Additional context for this automation run, up to 10,000 characters. Supported only when |
HTTP response status codes for "Run an automation"
| Status code | Description |
|---|---|
202 | Automation run request accepted for asynchronous processing |
400 | Bad request |
401 | Authentication required |
403 | Insufficient permissions |
404 | Resource not found |
409 | Automation usage limit reached for the current period |
422 | Validation failed |
503 | Service unavailable |
Code samples for "Run an automation"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_ID/tasks \
-d '{"event":"manual","context":"New Sentry issue detected: https://contoso.sentry.io/issues/7796648726"}'Automation run request accepted for asynchronous processing
Status: 202{
"task_id": "6f7b2fd5-bc70-4f55-befe-8653bd76045f",
"automation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"event": "manual"
}