---
title: "List tasks for an automation in a repository"
method: GET
path: "/agents/repos/{owner}/{repo}/automations/{automation_id}/tasks"
tags: ["agent-automations"]
---

# List tasks for an automation in a repository

`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

> [!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](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
* [GitHub App installation access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app)
* [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)

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

* "Agent tasks" repository permissions (read)

## Path parameters

- `owner` string, required
- `repo` string, required
- `automation_id` string, required

## Query parameters

- `per_page` integer
- `page` integer
- `sort` 'updated_at' | 'created_at'
- `direction` 'asc' | 'desc'
- `state` string
- `is_archived` boolean

## Response `200`

Automation task history retrieved successfully

- object: A page of tasks created by an automation.
  - `tasks` object[], required: Tasks created by the automation.
    - `id` string, required: Unique task identifier
    - `url` string: API URL for this task
    - `html_url` string: Web URL for this task
    - `name` string: Human-readable name derived from the task prompt
    - `clients` object[]: Known client products that created or participated in this task, independent of its executing agents. Omitted when no client identity is known.
      - `integration_id` string, required: Server-resolved integration identity for the client product.
      - `slug` string, required: Stable client product identifier, not an agent or host identifier. Clients must tolerate unknown future slugs.
      - `creator` boolean, required: True only when the service has explicit evidence this client created the containing session or task. False does not imply the original client is known.
    - `creator` object: A GitHub user
      - `id` integer: The unique identifier of the user
    - `creator_type` 'user' | 'organization': Type of the task creator
    - `user_collaborators` object[]: User objects of collaborators on this task
      - `id` integer: The unique identifier of the user
    - `owner` object: The owner of the repository
      - `id` integer: The unique identifier of the user
    - `repository` object: The repository this task belongs to
      - `id` integer: The unique identifier of the repository
    - `state` 'queued' | 'in_progress' | 'completed' | 'failed' | 'idle' | 'waiting_for_user' | 'timed_out' | 'cancelled', required: Current state of the task, derived from its most recent session
    - `session_count` integer: Number of sessions in this task
    - `artifacts` object[]: Resources created by this task (PRs, branches, etc.)
      - `provider` 'github', required: Provider namespace
      - `type` 'pull' | 'branch', required: Type of artifact. Available Values: `pull`, `branch`.
      - `data` union, required: Resource data (shape depends on type)
        - object: A GitHub resource (pull request, issue, etc.)
          - `id` integer, required: GitHub resource ID
          - `global_id` string: GraphQL global ID
        - object: A Git branch reference
          - `head_ref` string, required: Head branch name
          - `base_ref` string, required: Base branch name
    - `archived_at` string, date-time, nullable: Timestamp when the task was archived, null if not archived
    - `updated_at` string, date-time: Timestamp of the most recent update
    - `created_at` string, date-time, required: Timestamp when the task was created
    - `custom_agent` object: Custom agent metadata associated with this task
      - `id` string: The custom agent's filename without the extension - for example, `performance-optimizer` for a `.github/agents/performance-optimizer.agent.md` custom agent.

## Other responses

- `401`: Authentication required
- `404`: Repository or automation not found, inaccessible, or unavailable
- `422`: Validation failed

## Changes

- **2026-10-27** (2026-03-10) `18226de6c75a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/github/apis/rest/changes/agents/repos/:owner/:repo/automations/:automation_id/tasks/get.md)

---

[API](https://skmtc.dev/github/apis/rest.md) - [All operations](https://skmtc.dev/github/apis/rest/llms.txt) - [OpenAPI document](https://skmtc.dev/github/apis/rest/revisions/981aa3c25d9e?raw)
