Tasks
get/v1/workflows/{id}/runs/{run_id}/tasks/pending

List pending human tasks

Returns all human-in-the-loop tasks currently awaiting a decision for this run. A run with pending tasks has status: "paused" and will not proceed until all pending tasks are completed.

Typical integration pattern:

  1. Subscribe to the WebSocket stream
  2. When you receive a human_task_created event, show the task to a reviewer in your UI
  3. The reviewer submits a decision via POST .../tasks/{task_id}/complete
  4. The run resumes automatically

Server

https://api.agentruntime.io/v1/workflows/{id}/runs/{run_id}/tasks/pending
Production
AuthenticationRequiredBearerAuth

API key obtained from the AgentRuntime dashboard. Pass as Authorization: Bearer <key> on every request.

Stored only in this page session. It is not saved to local storage.

Test Request

Runs from your browser. Non-GET requests require explicit confirmation and tokens are sent only when you click Send.

Enter a bearer token to enable testing.

Client Libraries
Shell
curl -sS -X GET \
  'https://api.agentruntime.io/v1/workflows/{id}/runs/{run_id}/tasks/pending' \
  -H 'Authorization: Bearer <token>'
  • 200Pending tasks for this run.

    application/json

    tasks

    array of

    Schema
    id

    string

    Example: "task_01hw3k9x4v8m"

    run_id

    string

    Example: "run_01hw3k9x4v8m"

    workflow_id

    string

    Example: "wf_01hw3k9x4v8m"

    task_type

    string

    Identifier for the type of review required, as defined in the workflow step.

    Example: "reply_approval"

    prompt

    string

    Instructions shown to the human reviewer. Derived from the step's task_payload.

    Example: "Please review the AI-drafted support reply before sending."

    context
    Schema
    created_at

    string

    Example: "2026-04-10T11:00:02.001Z"

    {
      "tasks": [
        {
          "id": "task_01hw3k9x4v8m",
          "run_id": "run_01hw3k9x4v8m",
          "workflow_id": "wf_01hw3k9x4v8m",
          "task_type": "reply_approval",
          "prompt": "Please review the AI-drafted support reply before sending.",
          "context": {
            "draft": "Hi! I can help you cancel. Go to Account Settings → Billing → Cancel Plan.",
            "category": "billing",
            "confidence": 0.94
          },
          "created_at": "2026-04-10T11:00:02.001Z"
        }
      ]
    }
  • 401Missing or invalid Bearer token.

    application/json

    errorrequired

    string

    Human-readable description of what went wrong.

    Example: "workflow not found"

    code

    string

    Machine-readable error code for programmatic handling.

    Example: "NOT_FOUND"

    {
      "error": "unauthorized",
      "code": "UNAUTHORIZED"
    }
  • 404The requested resource does not exist.

    application/json

    errorrequired

    string

    Human-readable description of what went wrong.

    Example: "workflow not found"

    code

    string

    Machine-readable error code for programmatic handling.

    Example: "NOT_FOUND"

    {
      "error": "workflow not found",
      "code": "NOT_FOUND"
    }