Operations related to ai agents.

Report the state of an AI agent task

POST /api/v4/projects/{id}/ai_agents/tasks/{task_id}/report

Called by the agent pod: the task is active, done or failed. Available only to the agent account.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 12
task_id
Path, required
IntegerThe task id the pod was handed
Example: 7

Request body (application/json)

PropertyTypeDescription
errorStringWhy the task failed
Example: OpenCode timed out
result_urlStringThe merge request or note the task produced
retryBooleanfalse once the task must not be repeated after an interruption
status
Required
Stringactive, done or failed
Allowed values: active, done, failed
Minimum length: 1

Responses

CodeDescriptionSchema
200OKAPIEntitiesAiAgentTask
400Bad Request—
401Unauthorized—
403Forbidden—
404Not found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesAiAgentTask

PropertyTypeDescription
idIntegerExample: 7
lease_expires_atString (date-time)Example: 2026-10-10T12:00:00Z
stateStringAllowed values: pending, running, done, failed
Example: running