Skip to main content
Runners are external agents that execute AI reviews in isolated environments (containers). They communicate with the server over HTTP using an API key for authentication. All runner endpoints are under /api/runners. Management endpoints (list, get) require a user session or API key. Task endpoints (register, heartbeat, task pickup, result submission) require an API key passed as Authorization: Bearer <key> or x-api-key: <key>.

List runners

GET /api/runners Returns all registered runners ordered by most recent heartbeat. Requires authentication.
Response 200
array

Get a runner

GET /api/runners/:id Returns details for a specific runner. Requires authentication.
string
required
Runner UUID.
Response 200
object
Single runner record. Same fields as the list response.

Register a runner

POST /api/runners/register Registered or re-registers a runner. Runners call this endpoint on startup. Uses an upsert — if the runner ID already exists, its fields are updated. This endpoint requires an API key. Registration metadata is passed via custom headers rather than a JSON body.
Request headers
string
required
Unique identifier for this runner instance.
string
Human-readable name. Defaults to the runner ID.
string
Runner software version string. Defaults to unknown.
number
Maximum number of concurrent review jobs. Default: 5.
string
Comma-separated list of tags (e.g., gpu,fast).
Response 200
object
The created or updated runner record.

Runner heartbeat

POST /api/runners/:id/heartbeat Runners send this periodically to report their current status. Requires API key authentication.
string
required
Runner UUID.
Request body
string
required
Current runner state: online | busy | offline.
number
required
Number of jobs currently being processed.

Claim pending tasks

GET /api/runners/tasks/pending Returns pending review tasks for a runner to claim and execute. Requires API key authentication.
string
required
ID of the runner requesting tasks.
string
Maximum number of tasks to claim. Default: 1.
Response 200
array
List of claimed runner task objects, each containing repository URL, branch, commit SHA, file changes, and AI configuration.

Update task status

POST /api/runners/tasks/:id/status Updates the execution phase of a task while it is running. Requires API key authentication.
string
required
Runner task UUID.
Request body
string
required
Current phase: preparing | cloning | reviewing | submitting.

Append task logs

POST /api/runners/tasks/:id/logs Appends log lines to a running task. Requires API key authentication.
string
required
Runner task UUID.
Request body
array
required
Array of log line strings. Between 1 and 200 entries per call.

Submit task result

POST /api/runners/tasks/:id/result Submits the final result of a completed review task. Requires API key authentication. This triggers comment posting and review record updates.
string
required
Runner task UUID.
Request body
string
required
ID of the runner submitting the result.
string
required
Final task outcome: success | failed.
array
required
Per-file review results.
number
required
Total number of comments across all files.
string
Overall quality rating: A | B | C | D | F.
object
required
Timing metrics for the review execution.
string
Top-level error message if the task failed.
array
Final batch of log lines to append.

Deregister a runner

DELETE /api/runners/:id Marks a runner as offline. Can be called by the runner itself (API key) or by an authenticated user.
string
required
Runner UUID to deregister.