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

# Get agent run

> Get safe run details for one configured Outlit agent run. Read-only.



## OpenAPI

````yaml /openapi.json get /api/agents/{agentId}/runs/{runId}
openapi: 3.1.0
info:
  title: Outlit API
  summary: Public Outlit Platform and Ingest APIs.
  description: >-
    Canonical OpenAPI specification for the public Outlit API surfaces
    documented at docs.outlit.ai.
  version: 1.0.0
servers:
  - url: https://app.outlit.ai
security:
  - bearerAuth: []
tags:
  - name: Platform API
    description: >-
      Authenticated API key routes for customer intelligence tools and
      integration management.
  - name: Ingest API
    description: Public-key event ingestion routes used by Outlit SDKs.
paths:
  /api/agents/{agentId}/runs/{runId}:
    get:
      tags:
        - Platform API
      summary: Get agent run
      description: Get safe run details for one configured Outlit agent run. Read-only.
      operationId: getAgentRun
      parameters:
        - name: agentId
          in: path
          required: true
          description: Agent ID.
          schema:
            type: string
            minLength: 1
        - name: runId
          in: path
          required: true
          description: Agent run database ID or public run ID.
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: Agent run details were returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAgentRunCommandSuccess'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            The API key is valid but does not have the required agent read
            scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandErrorEnvelope'
        '404':
          description: >-
            No agent run was found for the authenticated organization, agent,
            and requested run id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandErrorEnvelope'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          description: The platform could not get the agent run.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandErrorEnvelope'
components:
  schemas:
    GetAgentRunCommandSuccess:
      type: object
      required:
        - ok
        - commandId
        - commandVersion
        - correlationId
        - result
      properties:
        ok:
          type: boolean
          const: true
        commandId:
          type: string
          const: agent.run.get
        commandVersion:
          type: integer
          const: 1
        correlationId:
          type: string
        result:
          allOf:
            - $ref: '#/components/schemas/CommandResultBase'
            - type: object
              properties:
                operationId:
                  type: string
                  const: agent.run.get
                data:
                  type: object
                  required:
                    - run
                  properties:
                    run:
                      $ref: '#/components/schemas/AgentRunDetail'
                  additionalProperties: false
      additionalProperties: false
    CommandErrorEnvelope:
      type: object
      required:
        - ok
        - commandId
        - commandVersion
        - error
      properties:
        ok:
          type: boolean
          const: false
        commandId:
          type: string
        commandVersion:
          type: integer
          minimum: 1
        error:
          type: object
          required:
            - code
            - message
            - correlationId
            - retryable
          properties:
            code:
              type: string
              enum:
                - validation_failed
                - authorization_denied
                - conflict
                - not_found
                - rate_limited
                - transient_failure
            message:
              type: string
            correlationId:
              type: string
            retryable:
              type: boolean
            details:
              type: object
              additionalProperties: true
          additionalProperties: false
      additionalProperties: false
    CommandResultBase:
      type: object
      required:
        - operationId
        - status
        - resources
        - data
        - warnings
      properties:
        operationId:
          type: string
        status:
          type: string
          const: completed
        resources:
          type: array
          items:
            $ref: '#/components/schemas/CommandResource'
        data:
          type: object
          additionalProperties: true
        warnings:
          type: array
          items:
            type: string
        auditId:
          type: string
      additionalProperties: false
    AgentRunDetail:
      type: object
      required:
        - id
        - runId
        - agentId
        - status
        - trigger
        - summary
        - errorSummary
        - sandboxStatus
        - startedAt
        - endedAt
        - durationMs
        - counts
        - agentKey
        - executionStrategy
        - model
        - thinkingLevel
        - visibility
        - triggerEvidence
        - candidates
        - outputs
        - toolCalls
        - artifacts
      properties:
        id:
          type: string
        runId:
          type: string
        agentId:
          type: string
        status:
          $ref: '#/components/schemas/AgentRunStatus'
        trigger:
          type:
            - string
            - 'null'
          enum:
            - manual
            - scheduled
            - event
            - signal
            - null
        summary:
          type:
            - string
            - 'null'
        errorSummary:
          type:
            - string
            - 'null'
        sandboxStatus:
          type:
            - string
            - 'null'
        startedAt:
          type: string
          format: date-time
        endedAt:
          type:
            - string
            - 'null'
          format: date-time
        durationMs:
          type:
            - integer
            - 'null'
          minimum: 0
        counts:
          $ref: '#/components/schemas/AgentRunCounts'
        agentKey:
          type: string
        executionStrategy:
          type: string
        model:
          type:
            - string
            - 'null'
        thinkingLevel:
          type:
            - string
            - 'null'
        visibility:
          $ref: '#/components/schemas/AgentRunVisibility'
        triggerEvidence:
          oneOf:
            - $ref: '#/components/schemas/AgentRunTriggerEvidence'
            - type: 'null'
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunCandidate'
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunOutputDetail'
        toolCalls:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunToolCallSummary'
        artifacts:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunArtifactSummary'
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
      additionalProperties: true
    CommandResource:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
        id:
          type: string
      additionalProperties: false
    AgentRunStatus:
      type: string
      enum:
        - RUNNING
        - COMPLETED
        - FAILED
        - PARTIAL
    AgentRunCounts:
      type: object
      required:
        - candidates
        - tools
        - artifacts
        - outputs
      properties:
        candidates:
          type: integer
          minimum: 0
        tools:
          type: integer
          minimum: 0
        artifacts:
          type: integer
          minimum: 0
        outputs:
          type: integer
          minimum: 0
      additionalProperties: false
    AgentRunVisibility:
      type: object
      required:
        - hiddenCustomerCount
        - hiddenOutputCount
        - debugLedgerHidden
      properties:
        hiddenCustomerCount:
          type: integer
          minimum: 0
        hiddenOutputCount:
          type: integer
          minimum: 0
        debugLedgerHidden:
          type: boolean
      additionalProperties: false
    AgentRunTriggerEvidence:
      type: object
      required:
        - automationRunId
        - policy
        - selectedSignals
        - matchedSignals
        - window
        - primaryOccurrence
      properties:
        automationRunId:
          type: string
        policy:
          $ref: '#/components/schemas/AgentRunTriggerEvidencePolicy'
        selectedSignals:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunTriggerEvidenceSignal'
        matchedSignals:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunTriggerEvidenceSignal'
        window:
          $ref: '#/components/schemas/AgentRunTriggerEvidenceWindow'
        primaryOccurrence:
          $ref: '#/components/schemas/AgentRunTriggerEvidenceOccurrence'
      additionalProperties: false
    AgentRunCandidate:
      type: object
      required:
        - id
        - customerId
        - customerName
        - customerDomain
        - billingStatus
        - lastActivityAt
        - candidateKey
        - fingerprint
        - status
        - outputId
        - disposition
        - surfaceReason
        - reasons
        - metrics
      properties:
        id:
          type: string
        customerId:
          type: string
        customerName:
          type: string
        customerDomain:
          type:
            - string
            - 'null'
        billingStatus:
          type:
            - string
            - 'null'
        lastActivityAt:
          type:
            - string
            - 'null'
          format: date-time
        candidateKey:
          type: string
        fingerprint:
          type: string
        status:
          $ref: '#/components/schemas/AgentRunCustomerStatus'
        outputId:
          type:
            - string
            - 'null'
        disposition:
          type:
            - string
            - 'null'
        surfaceReason:
          type:
            - string
            - 'null'
        reasons:
          type: array
          items:
            type: string
        metrics:
          type: array
          items:
            type: string
      additionalProperties: false
    AgentRunOutputDetail:
      type: object
      required:
        - id
        - contractType
        - contractVersion
        - status
        - deliveryStatus
        - error
        - processedAt
        - deliveredAt
        - createdAt
        - notificationCount
        - referencedCandidateCount
        - referencedCandidateIds
        - titles
        - markdownPreviews
        - deliverySummary
        - actions
      properties:
        id:
          type: string
        contractType:
          type: string
        contractVersion:
          type: integer
          minimum: 1
        status:
          $ref: '#/components/schemas/AgentOutputStatus'
        deliveryStatus:
          $ref: '#/components/schemas/AgentOutputDeliveryStatus'
        error:
          type:
            - string
            - 'null'
        processedAt:
          type:
            - string
            - 'null'
          format: date-time
        deliveredAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        notificationCount:
          type: integer
          minimum: 0
        referencedCandidateCount:
          type: integer
          minimum: 0
        referencedCandidateIds:
          type: array
          items:
            type: string
        titles:
          type: array
          items:
            type: string
        markdownPreviews:
          type: array
          items:
            type: string
        deliverySummary:
          type:
            - string
            - 'null'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunOutputAction'
      additionalProperties: false
    AgentRunToolCallSummary:
      type: object
      required:
        - id
        - toolName
        - status
        - error
        - startedAt
        - endedAt
        - latencyMs
        - inputSummary
        - outputSummary
      properties:
        id:
          type: string
        toolName:
          type: string
        status:
          $ref: '#/components/schemas/AgentToolCallStatus'
        error:
          type:
            - string
            - 'null'
        startedAt:
          type: string
          format: date-time
        endedAt:
          type:
            - string
            - 'null'
          format: date-time
        latencyMs:
          type:
            - integer
            - 'null'
          minimum: 0
        inputSummary:
          type: string
        outputSummary:
          type:
            - string
            - 'null'
      additionalProperties: false
    AgentRunArtifactSummary:
      type: object
      required:
        - id
        - kind
        - mimeType
        - bodySizeBytes
        - redactionStatus
        - createdAt
        - metadataSummary
      properties:
        id:
          type: string
        kind:
          type: string
        mimeType:
          type: string
        bodySizeBytes:
          type:
            - integer
            - 'null'
          minimum: 0
        redactionStatus:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        metadataSummary:
          type:
            - string
            - 'null'
      additionalProperties: false
    ValidationIssue:
      type: object
      required:
        - path
        - message
      properties:
        path:
          type: array
          items:
            type:
              - string
              - number
        message:
          type: string
      additionalProperties: false
    AgentRunTriggerEvidencePolicy:
      type: object
      required:
        - mode
        - requiredCount
        - selectedCount
        - matchedCount
      properties:
        mode:
          type: string
          enum:
            - ALL
            - ANY
            - COUNT
        requiredCount:
          type: integer
          minimum: 0
        selectedCount:
          type: integer
          minimum: 0
        matchedCount:
          type: integer
          minimum: 0
      additionalProperties: false
    AgentRunTriggerEvidenceSignal:
      type: object
      required:
        - id
        - key
        - name
        - kind
      properties:
        id:
          type: string
        key:
          type:
            - string
            - 'null'
        name:
          type: string
        kind:
          type:
            - string
            - 'null'
      additionalProperties: false
    AgentRunTriggerEvidenceWindow:
      type:
        - object
        - 'null'
      required:
        - value
        - unit
        - startAt
        - endAt
      properties:
        value:
          type: integer
          minimum: 1
        unit:
          type: string
          enum:
            - hour
            - day
        startAt:
          type:
            - string
            - 'null'
          format: date-time
        endAt:
          type:
            - string
            - 'null'
          format: date-time
      additionalProperties: false
    AgentRunTriggerEvidenceOccurrence:
      type:
        - object
        - 'null'
      required:
        - id
      properties:
        id:
          type: string
        eventName:
          type: string
        eventChannel:
          type: string
        eventOccurredAt:
          type: string
          format: date-time
      additionalProperties: false
    AgentRunCustomerStatus:
      type: string
      enum:
        - SELECTED
        - SENT_TO_AGENT
        - SURFACED
        - NOT_SURFACED
        - DELIVERY_FAILED
    AgentOutputStatus:
      type: string
      enum:
        - PENDING
        - VALID
        - INVALID
        - PROCESSED
    AgentOutputDeliveryStatus:
      type: string
      enum:
        - NOT_REQUIRED
        - PENDING
        - SENT
        - FAILED
        - PARTIAL
    AgentRunOutputAction:
      type: object
      required:
        - id
        - label
        - status
        - url
      properties:
        id:
          type: string
        label:
          type: string
        status:
          type: string
          enum:
            - OPEN
            - ENGAGED
            - EXECUTED
            - UNAVAILABLE
        url:
          type:
            - string
            - 'null'
          format: uri
      additionalProperties: false
    AgentToolCallStatus:
      type: string
      enum:
        - PENDING
        - SUCCESS
        - FAILED
  responses:
    Unauthorized:
      description: Invalid or missing API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid credentials
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Outlit API key using the Bearer ok_... format.

````