agent-automations

List tasks for an automation in a repository

Changed on

[!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:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (read)
get/agents/repos/{owner}/{repo}/automations/{automation_id}/tasks

Request

  • Base URL
    https://api.github.com
  • URL
    https://api.github.com/agents/repos/{owner}/{repo}/automations/{automation_id}/tasks
  • Auth
    none declared

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository. The name is not case sensitive.

automation_idstring required

The unique identifier of the automation.

Query parameters

per_pageinteger

The number of results per page (max 100).

pageinteger

The page number of the results to fetch.

sort'updated_at' | 'created_at'

The field to sort results by. Can be updated_at or created_at.

direction'asc' | 'desc'

The direction to sort results. Can be asc or desc.

statestring

Comma-separated list of task states to filter by. Can be any combination of: queued, in_progress, completed, failed, idle, waiting_for_user, timed_out, cancelled.

is_archivedboolean

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

Response

Automation task history retrieved successfully

Example response

{
  "tasks": [
    {
      "clients": [
        {
          "integration_id": "github-mobile-ios",
          "slug": "copilot-mobile-ios"
        }
      ]
    }
  ]
}

Changes