REST API endpoints for agent automations

Use the REST API to manage agent automations.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

List automations for user

GET /agents/automations

Returns automations whose created_by user is the authenticated caller, across
repositories the caller can read. This includes both user-owned and repository-owned
automations created by the caller but excludes repository-owned automations created by
someone else even if the caller has write access to the repository.
Use the repository-scoped list operation for those automations. The owner_type filter
only narrows this creator-scoped collection.
Fine-grained access tokens for "List automations for user"
This endpoint works with the following fine-grained token types:

GitHub App user access tokens
Fine-grained personal access tokens

The fine-grained token must have one of the following permission sets for each
repository accessed by this request:

"Agent tasks" repository permissions (read)
"Contents" repository permissions (read)

The required permission set depends on each repository's Automation permission
configuration.
GitHub App installation access tokens are not supported for this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/agents/automations

Response schema (Status: 200):

Array of objects:

List available automation tools

GET /agents/automations/available-tools

Returns the tools available to the authenticated caller for use when creating or updating an automation.
Fine-grained access tokens for "List available automation tools"
This endpoint works with the following fine-grained token types:

GitHub App user access tokens
Fine-grained personal access tokens

This endpoint does not require repository permissions.
GitHub App installation access tokens are not supported for this endpoint.

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/agents/automations/available-tools

Response schema (Status: 200):

Array of objects:

List available automation triggers

GET /agents/automations/available-triggers

Returns the triggers available to the authenticated caller, including machine-readable schemas for their configurable fields.
Fine-grained access tokens for "List available automation triggers"
This endpoint works with the following fine-grained token types:

GitHub App user access tokens
Fine-grained personal access tokens

This endpoint does not require repository permissions.
GitHub App installation access tokens are not supported for this endpoint.

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/agents/automations/available-triggers

Response schema (Status: 200):

Array of objects:

Get an automation by ID

GET /agents/automations/{automation_id}

Returns an automation by ID without requiring repository context when its created_by
user is the authenticated caller and the caller can read its repository. This includes
both user-owned and repository-owned automations created by the caller but excludes
repository-owned automations created by someone else even if the caller has write
access to the repository.
Use the repository-scoped get operation for those automations. The response includes
repository identity so clients can link back to the repository.
Fine-grained access tokens for "Get an automation by ID"
This endpoint works with the following fine-grained token types:

GitHub App user access tokens
Fine-grained personal access tokens

The fine-grained token must have one of the following permission sets for each
repository accessed by this request:

"Agent tasks" repository permissions (read)
"Contents" repository permissions (read)

The required permission set depends on each repository's Automation permission
configuration.
GitHub App installation access tokens are not supported for this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/agents/automations/AUTOMATION_ID

Response schema (Status: 200):

List tasks for an automation

GET /agents/automations/{automation_id}/tasks

Returns a list of tasks triggered by the specified automation.
User-owned automation history is available only to its creator, while repository-owned automation
history is available to anyone with read access to the repository. 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.
Fine-grained access tokens for "List tasks for an automation"
This endpoint works with the following fine-grained token types:

GitHub App user access tokens
Fine-grained personal access tokens

The fine-grained token must have one of the following permission sets for each
repository accessed by this request:

"Agent tasks" repository permissions (read)
"Contents" repository permissions (read)

The required permission set depends on each repository's Automation permission
configuration.
GitHub App installation access tokens are not supported for this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/agents/automations/AUTOMATION_ID/tasks

Response schema (Status: 200):

List automations for a repository

GET /agents/repos/{owner}/{repo}/automations

Returns a paginated list of the authenticated user's automations for a repository,
together with every repository-owned automation in it. total_count is the number of
caller-visible automations matching the supplied filters across all pages.
Repository-owned automations are visible to anyone with read access to the repository,
so the results are not limited to automations the caller created. Use the owner_type
field on each automation to tell the two apart.
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
Fine-grained personal access tokens

The fine-grained token must have one of the following permission sets for each
repository accessed by this request:

"Agent tasks" repository permissions (read)
"Contents" repository permissions (read)

The required permission set depends on each repository's Automation permission
configuration.
GitHub App installation access tokens are not supported for this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/agents/repos/OWNER/REPO/automations

Response schema (Status: 200):

Create an automation for a repository

POST /agents/repos/{owner}/{repo}/automations

Creates a new automation in a repository. User-owned automations remain private to
their creator. Repository-owned automations are visible to anyone with read access to
the repository and manageable by anyone with write access to the repository.
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
Fine-grained personal access tokens

The fine-grained token must have one of the following permission sets for each
repository accessed by this request:

"Agent tasks" repository permissions (read and write)
"Contents" repository permissions (read and write)

The required permission set depends on each repository's Automation permission
configuration.
GitHub App installation access tokens are not supported for this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/agents/repos/OWNER/REPO/automations \
  -d '{
  "name": "Issue triage",
  "enabled": true,
  "owner_type": "user",
  "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-5.4",
  "reasoning_effort": "high"
}'

Response schema (Status: 201):

Get an automation for a repository

GET /agents/repos/{owner}/{repo}/automations/{automation_id}

Returns an automation by ID in a repository.
User-owned automations are visible only to their creator. Repository-owned
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
owner_type.
Fine-grained access tokens for "Get an automation for a repository"
This endpoint works with the following fine-grained token types:

GitHub App user access tokens
Fine-grained personal access tokens

The fine-grained token must have one of the following permission sets for each
repository accessed by this request:

"Agent tasks" repository permissions (read)
"Contents" repository permissions (read)

The required permission set depends on each repository's Automation permission
configuration.
GitHub App installation access tokens are not supported for this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_ID

Response schema (Status: 200):

Same response schema as Create an automation for a repository.

Edit an automation for a repository

PATCH /agents/repos/{owner}/{repo}/automations/{automation_id}

Edits specified fields on an existing automation in a repository. Omitted fields
are left unchanged.
The automation's owner_type is immutable and cannot be changed by this operation.
Fine-grained access tokens for "Edit an automation for a repository"
This endpoint works with the following fine-grained token types:

GitHub App user access tokens
Fine-grained personal access tokens

The fine-grained token must have one of the following permission sets for each
repository accessed by this request:

"Agent tasks" repository permissions (read and write)
"Contents" repository permissions (read and write)

The required permission set depends on each repository's Automation permission
configuration.
GitHub App installation access tokens are not supported for this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PATCH \
  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"
    }
  }
}'

Response schema (Status: 200):

Same response schema as Create an automation for a repository.

Delete an automation for a repository

DELETE /agents/repos/{owner}/{repo}/automations/{automation_id}

Deletes an automation in a repository.
Fine-grained access tokens for "Delete an automation for a repository"
This endpoint works with the following fine-grained token types:

GitHub App user access tokens
Fine-grained personal access tokens

The fine-grained token must have one of the following permission sets for each
repository accessed by this request:

"Agent tasks" repository permissions (read and write)
"Contents" repository permissions (read and write)

The required permission set depends on each repository's Automation permission
configuration.
GitHub App installation access tokens are not supported for this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_ID

Response schema (Status: 204):