Triggers and actions
GitHub events reach the platform through the GitHub App webhook; Linear and Jira through their connection webhooks.
POST /v2/automations/{automation_id}/trigger fires an automation manually with caller-supplied variables, which is also how the generic webhook adapter works.
Runs, queue and limits
Every invocation is recorded as an automation run inworkspaces.automation_runs. A run moves through queued → running → completed or failed, or is recorded as skipped without a session.
Automation.limits controls how invocations turn into sessions:
Disabling an automation leaves its queued runs waiting until it is enabled again; deleting it fails them. A run whose session never starts within 40 minutes, or whose session run ended without the control plane noticing, is settled by the reconcile sweep.
The Activity view under the automation lists queued, running, completed, failed and skipped runs with their linked sessions and posted reviews; the automation row shows how many runs are queued and running and a 30-day sparkline of daily invocations.
GET /v2/factories/{factory_id}/automations/activity returns the same counts per automation.
Pull-request reviews
The Code review and Security audit templates setaction.post_review. For such automations the run prompt is extended with an output contract, and when the repository contains a REVIEW.md at its root (read at the pull request’s head ref), its content is added to the prompt as the repository’s review guidelines.
The agent ends its final message with a JSON block:
The block is parsed leniently (last fenced JSON block, bare object or bare array). Findings are stored on the run and posted as one pull-request review through the GitHub App: findings with a file and line become inline comments, the rest go into the review body, and when GitHub rejects a line outside the diff the review is re-posted with every finding folded into the body. Free-text final messages without a JSON block are posted as the review summary.
With
action.auto_fix, a review with at least one finding above info continues the same session with the findings to fix; when that run completes, the platform commits the workspace and pushes fix: apply review findings to the pull-request branch (same-repository branches only). The review URL and fix commit appear on the run. Merging stays a human decision.
Reviews require a GitHub repository credential: the GitHub App installation or a personal access token on the factory’s connection. GitLab merge-request discussions are not supported yet; review automations on GitLab repositories fail with an explanatory error.
Factory as code
factory.yaml automations[] carries the same action.post_review, action.auto_fix and limits fields as the API; Terraform orq_automation exposes them as action and limits attributes.