Skip to content

GitHub: List tasks for an automation in a repository

GitHub agentAutomations.agentAutomationsListRepoAutomationTasks: arguments, response, policy and SDK examples.

← Agent automations operations · Get started

Operation github.agent_automations_list_repo_automation_tasks

Provider route: GET /agents/repos/{owner}/{repo}/automations/{automation_id}/tasks. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/github with npm, or alter-sdk-github with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { GitHubIntegration } from "@alter-ai/github";
async function execute(input: Parameters<GitHubIntegration["agentAutomations"]["agentAutomationsListRepoAutomationTasks"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new GitHubIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.agentAutomations.agentAutomationsListRepoAutomationTasks(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_github import GitHubIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = GitHubIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.agent_automations.agent_automations_list_repo_automation_tasks(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.ownerstringRequired within parent
path.repostringRequired within parent
path.automation_idstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.per_pageintegerOptionalDefault: 30
Maximum: 100
Minimum: 1
query.pageintegerOptionalDefault: 1
Minimum: 1
query.sortstringOptionalDefault: updated_at
One of: updated_at, created_at
query.directionstringOptionalDefault: desc
One of: asc, desc
query.statestringOptional
query.is_archivedbooleanOptionalDefault: false

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRootA page of tasks created by an automation.
tasksarrayRequired within parentTasks created by the automation.
tasks[]objectEach item
tasks[].archived_atJSONOptional
tasks[].archived_at (anyOf 1)stringAlternativeTimestamp when the task was archived, null if not archived
Format: date-time
tasks[].archived_at (anyOf 2)nullAlternative
tasks[].artifactsarrayOptionalResources created by this task (PRs, branches, etc.)
tasks[].artifacts[]ModelEach itemExpand Start a task — response body — artifacts item
tasks[].clientsarrayOptionalKnown client products that created or participated in this task, independent of its executing agents. Omitted when no client identity is known.
tasks[].clients[]objectEach item
tasks[].clients[].creatorbooleanRequired within parentTrue only when the service has explicit evidence this client created the containing session or task. False does not imply the original client is known.
tasks[].clients[].integration_idstringRequired within parentServer-resolved integration identity for the client product.
tasks[].clients[].slugstringRequired within parentStable client product identifier, not an agent or host identifier. Clients must tolerate unknown future slugs.
tasks[].created_atstringRequired within parentTimestamp when the task was created
Format: date-time
tasks[].creatorJSONOptionalThe entity who created this task
tasks[].creator (anyOf 1)objectAlternativeA GitHub user
tasks[].creator (anyOf 1).idJSONOptional
tasks[].creator (anyOf 1).id (anyOf 1)integerAlternativeThe unique identifier of the user
Format: int64
tasks[].creator (anyOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
tasks[].creator_typestringOptionalType of the task creator
Known values: user, organization
tasks[].custom_agentobjectOptionalCustom agent metadata associated with this task
tasks[].custom_agent.idstringOptionalThe custom agent’s filename without the extension - for example, `performance-optimizer` for a `.github/agents/performance-optimizer.agent.md` custom agent.
tasks[].html_urlstringOptionalWeb URL for this task
tasks[].idstringRequired within parentUnique task identifier
tasks[].namestringOptionalHuman-readable name derived from the task prompt
tasks[].ownerobjectOptionalThe owner of the repository
tasks[].owner.idJSONOptional
tasks[].owner.id (anyOf 1)integerAlternativeThe unique identifier of the user
Format: int64
tasks[].owner.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
tasks[].repositoryobjectOptionalThe repository this task belongs to
tasks[].repository.idJSONOptional
tasks[].repository.id (anyOf 1)integerAlternativeThe unique identifier of the repository
Format: int64
tasks[].repository.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
tasks[].session_countJSONOptional
tasks[].session_count (anyOf 1)integerAlternativeNumber of sessions in this task
Format: int32
tasks[].session_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
tasks[].statestringRequired within parentCurrent state of the task, derived from its most recent session
Known values: queued, in_progress, completed, failed, idle, waiting_for_user, timed_out, cancelled
tasks[].updated_atstringOptionalTimestamp of the most recent update
Format: date-time
tasks[].urlstringOptionalAPI URL for this task
tasks[].user_collaboratorsarrayOptionalUser objects of collaborators on this task
tasks[].user_collaborators[]objectEach itemA GitHub user
tasks[].user_collaborators[].idJSONOptional
tasks[].user_collaborators[].id (anyOf 1)integerAlternativeThe unique identifier of the user
Format: int64
tasks[].user_collaborators[].id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Start a task — response body — artifacts item

Start a task — response body — artifacts item
FieldTypePresenceDescription and constraints
$objectRootA resource generated by the task
dataJSONRequired within parentResource data (shape depends on type)
data (anyOf 1)objectAlternativeA GitHub resource (pull request, issue, etc.)
data (anyOf 1).global_idstringOptionalGraphQL global ID
data (anyOf 1).idJSONRequired within parent
data (anyOf 1).id (anyOf 1)integerAlternativeGitHub resource ID
Format: int64
data (anyOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
data (anyOf 2)objectAlternativeA Git branch reference
data (anyOf 2).base_refstringRequired within parentBase branch name
data (anyOf 2).head_refstringRequired within parentHead branch name
providerstringRequired within parentProvider namespace
Known values: github
typestringRequired within parentType of artifact. Available Values: `pull`, `branch`.

Known values: pull, branch

SDK function policy ID: github.agent_automations_list_repo_automation_tasks. Catalog operation: agent-automations/list-repo-automation-tasks. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"X-GitHub-Api-Version": "2026-03-10", "User-Agent": "Alter", "Accept": "application/vnd.github+json"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.