{"command":{"effect":"read","timeoutSeconds":30,"inputSchema":{"type":"object","description":"> [!NOTE]\n> This endpoint is in public preview and is subject to change.\n\nReturns a paginated list of tasks created by an automation in the specified\nrepository. The automation must belong to that exact repository.\n\nUser-owned automation history is visible only to the automation's creator.\nRepository-owned automation history is visible to callers with read access to\nrepository automations. Deleted and unlisted tasks are excluded. Tasks produced\nby private-session agents are excluded unless the caller created the task, is a\ntask collaborator, or the task is shared.\n\nA missing repository, an inaccessible repository, or an automation that does not\nbelong to the specified repository returns `404` without revealing which condition\noccurred.\n\nGitHub App installation access tokens can list tasks for shared automations.\nThe installation must belong to the repository owner and the token must have\n\"Agent tasks\" repository permissions (read). Personal automations require a user token.\n\n**Fine-grained access tokens for \"List tasks for an automation in a repository\"**\n\nThis endpoint works with the following fine-grained token types:\n\n* [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)\n* [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)\n* [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)\n\nThe fine-grained token must have the following permission set:\n\n* \"Agent tasks\" repository permissions (read)\n","properties":{"path":{"type":"object","properties":{"owner":{"type":"string","description":"The account owner of the repository. The name is not case sensitive."},"repo":{"type":"string","description":"The name of the repository. The name is not case sensitive."},"automation_id":{"type":"string","description":"The unique identifier of the automation."}},"required":["owner","repo","automation_id"],"additionalProperties":false},"query":{"type":"object","properties":{"per_page":{"type":"integer","default":30,"minimum":1,"maximum":100,"description":"The number of results per page (max 100)."},"page":{"type":"integer","default":1,"minimum":1,"description":"The page number of the results to fetch."},"sort":{"type":"string","default":"updated_at","enum":["updated_at","created_at"],"description":"The field to sort results by. Can be `updated_at` or `created_at`."},"direction":{"type":"string","default":"desc","enum":["asc","desc"],"description":"The direction to sort results. Can be `asc` or `desc`."},"state":{"type":"string","description":"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_archived":{"type":"boolean","default":false,"description":"Filter by archived status. When `true`, returns only archived tasks. When `false` or omitted, returns only non-archived tasks. Defaults to `false`."}},"required":[],"additionalProperties":false}},"required":["path"],"additionalProperties":false},"name":"List tasks for an automation in a repository","id":"github.agent-automations.list-repo-automation-tasks","example":{"path":{"owner":"octocat","repo":"hello-world","automation_id":"example"}},"maxRequests":1,"summary":false}}