provider agent-tasks GET /agents/repos/{owner}/{repo}/tasks
@utdk/github /agents/repos/{owner}/{repo}/tasks
List tasks for repository
> [!NOTE] > This endpoint is in public preview and is subject to change. Returns a list of tasks for a specific repository **Fine-grained access tokens for "List tasks for 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) * [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) GitHub App installation access tokens are not supported for this endpoint.
owner path required
The account owner of the repository. The name is not case sensitive.
string
repo path required
The name of the repository. The name is not case sensitive.
string
per_page query
The number of results per page (max 100).
integer
page query
The page number of the results to fetch.
integer
sort query
The field to sort results by. Can be `updated_at` or `created_at`.
enum: updated_at, created_at
direction query
The direction to sort results. Can be `asc` or `desc`.
enum: asc, desc
state query
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`.
string
is_archived query
Filter by archived status. When `true`, returns only archived tasks. When `false` or omitted, returns only non-archived tasks. Defaults to `false`.
boolean
since query
Only show tasks updated at or after this time (ISO 8601 timestamp)
string
creator_id query
Filter tasks by creator user ID. Accepts one or more user IDs.
array

Try it

Authentication
Configure credentials for GitHub v3 REST API
agentTasks.listTasksForRepo
GET/agents/repos/{owner}/{repo}/tasks
> [!NOTE] > This endpoint is in public preview and is subject to change. Returns a list of tasks for a specific repository **Fine-grained access tokens for "List tasks for 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) * [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) GitHub App installation access tokens are not supported for this endpoint.

Parameters

required

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

required

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

The number of results per page (max 100).

The page number of the results to fetch.

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

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

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`.

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

Only show tasks updated at or after this time (ISO 8601 timestamp)

Filter tasks by creator user ID. Accepts one or more user IDs.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.agentTasks.listTasksForRepo({
  "per_page": 30,
  "page": 1,
  "sort": "updated_at",
  "direction": "desc",
  "is_archived": false
})