> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getgranite.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# HITL Status

> Get the current Human-in-the-Loop status including pending requests



## OpenAPI

````yaml get /api/agent-runs/{run_id}/hitl-status
openapi: 3.1.0
info:
  title: Axion Backend API
  description: Backend API for Axion platform with desktop automation capabilities
  version: 1.0.0
servers:
  - url: https://api.getgranite.ai
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Organizations
    description: Organization management and membership
  - name: Health
    description: API health and status monitoring
  - name: Automations
    description: Automation planning and execution
  - name: MIG
    description: Managed Instance Group operations
  - name: Agent
    description: Agent execution and streaming
  - name: Onboarding
    description: Organization onboarding flow
  - name: Organization Automations
    description: Organization automation endpoint management
  - name: Organization Endpoints
    description: Public endpoints for organization automations
  - name: Analytics
    description: Analytics and reporting endpoints
paths:
  /api/agent-runs/{run_id}/hitl-status:
    get:
      tags:
        - Agent
      summary: Get HITL status for a run
      description: Get the current Human-in-the-Loop status including pending requests
      operationId: getHITLStatus
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HITLStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HITLStatusResponse:
      properties:
        run_id:
          type: string
          title: Run Id
          description: Run ID
        has_active_manager:
          type: boolean
          title: Has Active Manager
          description: Whether an active HITL manager exists
        is_paused:
          type: boolean
          title: Is Paused
          description: Whether pipeline is paused
        is_cancelled:
          type: boolean
          title: Is Cancelled
          description: Whether pipeline is cancelled
        pending_requests:
          items:
            $ref: '#/components/schemas/HITLPendingRequest'
          type: array
          title: Pending Requests
          description: Pending HITL requests
        stats:
          $ref: '#/components/schemas/HITLStats'
          description: HITL statistics
        manager_state:
          anyOf:
            - $ref: '#/components/schemas/HITLManagerState'
            - type: 'null'
          description: Manager state if active
      type: object
      required:
        - run_id
        - has_active_manager
        - is_paused
        - is_cancelled
        - pending_requests
        - stats
      title: HITLStatusResponse
      description: HITL status for a run.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HITLPendingRequest:
      properties:
        request_id:
          type: string
          title: Request Id
          description: Request ID
        request_type:
          type: string
          title: Request Type
          description: Request type
        data:
          additionalProperties: true
          type: object
          title: Data
          description: Request data
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
          description: Creation timestamp
      type: object
      required:
        - request_id
        - request_type
        - data
      title: HITLPendingRequest
      description: A pending HITL request.
    HITLStats:
      properties:
        run_id:
          type: string
          title: Run Id
          description: Run ID
        total_requests:
          type: integer
          title: Total Requests
          description: Total HITL requests
        pending:
          type: integer
          title: Pending
          description: Pending requests
        answered:
          type: integer
          title: Answered
          description: Answered requests
        expired:
          type: integer
          title: Expired
          description: Expired requests
        cancelled:
          type: integer
          title: Cancelled
          description: Cancelled requests
      type: object
      required:
        - run_id
        - total_requests
        - pending
        - answered
        - expired
        - cancelled
      title: HITLStats
      description: HITL statistics for a run.
    HITLManagerState:
      properties:
        questions:
          items:
            type: string
          type: array
          title: Questions
          description: Pending question IDs
        approvals:
          items:
            type: string
          type: array
          title: Approvals
          description: Pending approval IDs
        is_paused:
          type: boolean
          title: Is Paused
          description: Whether pipeline is paused
        pause_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Pause Reason
          description: Reason for pause
      type: object
      required:
        - questions
        - approvals
        - is_paused
      title: HITLManagerState
      description: Current state of the HITL manager.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````