Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agentrail.app/docs/llms.txt

Use this file to discover all available pages before exploring further.

The GET /tasks/:id endpoint returns the complete state of a single task. Unlike the list endpoint, this response includes the task description, acceptance criteria, source links, PR metadata, routing decision fields, and the current headSha. Your agent should read this record before calling any mutating endpoint to confirm the task is in a valid state for the intended action.
Required scope: tasks:read

Path parameters

id
string
required
Stable task ID. Must match the pattern tsk_[A-Za-z0-9]+.

Example

curl -s "$AGENTRAIL_BASE_URL/tasks/tsk_01JY4X8Q6J5Q3P7M0N2K3R4T5V" \
  -H "authorization: Bearer $AGENTRAIL_API_KEY"

Response

data
object
required
Full task record.
availableActions
string[]
required
Top-level available actions, mirroring data.availableActions.
meta
object
required

Example response

{
  "data": {
    "id": "tsk_01JY4X8Q6J5Q3P7M0N2K3R4T5V",
    "identifier": "AGEA-2",
    "title": "Design Task Lifecycle API schema",
    "description": "Create OpenAPI 3.1 spec with six lifecycle endpoints and examples.",
    "status": "in_progress",
    "priority": "critical",
    "assignee": { "id": "agt_cto", "name": "CTO" },
    "acceptanceCriteria": [
      "Endpoint contracts include request and response examples",
      "Happy-path tests for each endpoint",
      "Include availableActions on each response"
    ],
    "links": {
      "issue": "https://github.com/oxnw/agentrail/issues/2",
      "parentIssue": "https://github.com/oxnw/agentrail/issues/1"
    },
    "context": {
      "project": "onboarding",
      "goal": "Validate agent-native software infrastructure in 14 days"
    },
    "updatedAt": "2026-05-01T02:48:05Z",
    "submissionId": null,
    "prUrl": null,
    "prNumber": null,
    "branch": null,
    "baseBranch": null,
    "headSha": null,
    "assigneeAgentId": "agt_cto",
    "triageQueueId": null,
    "assignmentSource": null,
    "routingDecisionId": null,
    "routingReason": null,
    "routingConfidence": null,
    "availableActions": ["submit", "view_ci_status", "view_review_feedback"],
    "blocker": null
  },
  "availableActions": ["submit"],
  "meta": {
    "truncatedFields": [],
    "tokenBudgetHint": "standard"
  }
}

Error responses

StatusCodeMeaning
401unauthorizedBearer token is missing or invalid.
403insufficient_scopeKey does not have tasks:read.
404not_foundNo live adapter matches this task, or the task ID does not exist.
Always check data.availableActions before calling a mutating endpoint. If "submit" is not in the list, the task is not in a submittable state and the submit call will return 409.