{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"> [!NOTE]\n> This endpoint is in public preview and is subject to change.\n\nRuns an automation in a repository. Set `event` to `manual` and optionally include\n`context` of up to 10,000 characters, which will be injected into the automation's\nprompt.\n\nThe repository must have the \"Allow automations\" setting enabled, and the automation\nmust be a personal automation belonging to you or a shared automation.\n\nGitHub App installation access tokens can run shared automations.\nThe installation must belong to the repository owner and the token must have\n\"Agent tasks\" repository permissions (write). Personal automations require a user token.\n\nA successful response accepts the run request and includes a preallocated\n`task_id`, which can be fetched with the \"Get a task by repo\" Agent tasks API.\nIt does not confirm execution or task creation. Task creation is asynchronous,\nso fetching the task immediately may return `404 Not Found`, and downstream\nskips or failures can prevent its creation.\n\nTo call this endpoint, you must have write access to the repository.\n\nOAuth app tokens and personal access tokens (classic) need:\n\n* the `repo` scope for private or internal repositories\n* the `repo` scope or `public_repo` scope for public repositories\n\n**Fine-grained access tokens for \"Run an automation\"**\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 (write)\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},"body":{"type":"object","description":"Request body for requesting an automation run.","required":["event"],"properties":{"event":{"type":"string","description":"The event to trigger. Only `manual` is supported.","enum":["manual"]},"context":{"type":"string","maxLength":10000,"description":"Additional context for this automation run, up to 10,000 characters. Supported only when `event` is `manual`. The context supplements the automation's configured instructions."}},"examples":[{"event":"manual","context":"New Sentry issue detected: https://contoso.sentry.io/issues/7796648726"}]}},"required":["path","body"],"additionalProperties":false},"name":"Run an automation","id":"github.agent-automations.create-repo-automation-task","example":{"path":{"owner":"octocat","repo":"hello-world","automation_id":"example"},"body":{"event":"manual","context":"New Sentry issue detected: https://contoso.sentry.io/issues/7796648726"}},"maxRequests":1,"summary":false}}