> ## 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

> Get one configured Outlit agent by id. Read-only.



## OpenAPI

````yaml /openapi.json get /api/agents/{id}
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/{id}:
    get:
      tags:
        - Platform API
      summary: Get agent
      description: Get one configured Outlit agent by id. Read-only.
      operationId: getAgent
      parameters:
        - name: id
          in: path
          required: true
          description: Agent ID to fetch.
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: The configured agent was returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAgentCommandSuccess'
        '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 was found for the authenticated organization and requested
            id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandErrorEnvelope'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          description: The platform could not get the agent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandErrorEnvelope'
components:
  schemas:
    GetAgentCommandSuccess:
      type: object
      required:
        - ok
        - commandId
        - commandVersion
        - correlationId
        - result
      properties:
        ok:
          type: boolean
          const: true
        commandId:
          type: string
          const: agent.get
        commandVersion:
          type: integer
          const: 1
        correlationId:
          type: string
        result:
          allOf:
            - $ref: '#/components/schemas/CommandResultBase'
            - type: object
              properties:
                operationId:
                  type: string
                  const: agent.get
                data:
                  type: object
                  required:
                    - agent
                  properties:
                    agent:
                      $ref: '#/components/schemas/AgentDetail'
                  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
    AgentDetail:
      type: object
      required:
        - id
        - agentKey
        - displayName
        - status
        - templateVersion
        - actionKeys
        - createdAt
        - updatedAt
        - schedule
        - destinationSummary
        - automationSummary
        - automations
        - lastRun
        - recentRuns
        - settings
      properties:
        id:
          type: string
        agentKey:
          type: string
        displayName:
          type: string
        status:
          $ref: '#/components/schemas/AgentStatus'
        templateVersion:
          type: string
        actionKeys:
          type: array
          items:
            type: string
        schedule:
          $ref: '#/components/schemas/AgentScheduleDetail'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        destinationSummary:
          $ref: '#/components/schemas/AgentDetailDestinationSummary'
        automationSummary:
          $ref: '#/components/schemas/AgentDetailAutomationRollup'
        automations:
          type: array
          items:
            $ref: '#/components/schemas/AgentDetailAutomationSummary'
        lastRun:
          anyOf:
            - $ref: '#/components/schemas/AgentRunSummary'
            - type: 'null'
        recentRuns:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunSummary'
        settings:
          anyOf:
            - $ref: '#/components/schemas/AgentDetailSettings'
            - type: 'null'
      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
    AgentStatus:
      type: string
      enum:
        - ENABLED
        - DISABLED
    AgentScheduleDetail:
      type: object
      required:
        - enabled
        - nextRunAt
        - lastRunAt
        - lastSuccessfulRunAt
        - cadence
      properties:
        enabled:
          type: boolean
        nextRunAt:
          type:
            - string
            - 'null'
          format: date-time
        lastRunAt:
          type:
            - string
            - 'null'
          format: date-time
        lastSuccessfulRunAt:
          type:
            - string
            - 'null'
          format: date-time
        cadence:
          type:
            - string
            - 'null'
          enum:
            - daily
            - weekly
            - null
      additionalProperties: false
    AgentDetailDestinationSummary:
      type: object
      required:
        - destinations
        - label
        - count
        - missing
      properties:
        destinations:
          type: array
          items:
            type: object
            required:
              - id
              - provider
              - channelId
              - label
              - isDefault
            properties:
              id:
                type: string
                format: uuid
              provider:
                type: string
                const: slack
              channelId:
                type:
                  - string
                  - 'null'
              label:
                type:
                  - string
                  - 'null'
              isDefault:
                type: boolean
            additionalProperties: false
        label:
          type: string
        count:
          type: integer
          minimum: 0
        missing:
          type: boolean
      additionalProperties: false
    AgentDetailAutomationRollup:
      type: object
      required:
        - activeCount
        - totalCount
        - nextRunAt
        - primaryDestinationLabel
      properties:
        activeCount:
          type: integer
          minimum: 0
        totalCount:
          type: integer
          minimum: 0
        nextRunAt:
          type:
            - string
            - 'null'
          format: date-time
        primaryDestinationLabel:
          type:
            - string
            - 'null'
      additionalProperties: false
    AgentDetailAutomationSummary:
      type: object
      required:
        - id
        - name
        - enabled
        - conditionKind
        - conditionLabel
        - audienceLabel
        - destinationLabel
        - destinationCount
        - lastRunStatus
        - lastRunAt
        - nextRunAt
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        enabled:
          type: boolean
        conditionKind:
          type: string
          enum:
            - schedule
            - event_happens
            - activity_spikes
            - activity_stops
            - customer_activity_threshold
            - customer_activity_drop
            - related_user_inactivity
            - unknown
        conditionLabel:
          type: string
        audienceLabel:
          type: string
        destinationLabel:
          type: string
        destinationCount:
          type: integer
          minimum: 0
        lastRunStatus:
          anyOf:
            - $ref: '#/components/schemas/AutomationRunStatus'
            - type: 'null'
        lastRunAt:
          type:
            - string
            - 'null'
          format: date-time
        nextRunAt:
          type:
            - string
            - 'null'
          format: date-time
      additionalProperties: false
    AgentRunSummary:
      type: object
      required:
        - id
        - runId
        - agentId
        - status
        - trigger
        - summary
        - errorSummary
        - sandboxStatus
        - startedAt
        - endedAt
        - durationMs
        - counts
        - outputs
      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'
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunOutputSummary'
      additionalProperties: false
    AgentDetailSettings:
      type: object
      required:
        - configSchemaKey
        - configSchemaVersion
        - custom
      properties:
        configSchemaKey:
          type: string
        configSchemaVersion:
          type: integer
          minimum: 1
        custom:
          anyOf:
            - $ref: '#/components/schemas/CustomAgentSettingsSummary'
            - type: 'null'
      additionalProperties: false
    ValidationIssue:
      type: object
      required:
        - path
        - message
      properties:
        path:
          type: array
          items:
            type:
              - string
              - number
        message:
          type: string
      additionalProperties: false
    AutomationRunStatus:
      type: string
      enum:
        - PENDING
        - SKIPPED
        - RUNNING_PROCESSOR
        - READY_FOR_DELIVERY
        - PENDING_DELIVERY
        - DELIVERED
        - PARTIAL_FAILURE
        - FAILED
    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
    AgentRunOutputSummary:
      type: object
      required:
        - id
        - status
        - deliveryStatus
        - deliveredAt
        - createdAt
      properties:
        id:
          type: string
        status:
          $ref: '#/components/schemas/AgentOutputStatus'
        deliveryStatus:
          $ref: '#/components/schemas/AgentOutputDeliveryStatus'
        deliveredAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
      additionalProperties: false
    CustomAgentSettingsSummary:
      type: object
      required:
        - instructions
        - maxItemsToSurface
        - outputMode
      properties:
        instructions:
          type: string
          maxLength: 32000
        maxItemsToSurface:
          type: integer
          minimum: 1
          maximum: 50
        outputMode:
          type:
            - string
            - 'null'
          enum:
            - alert
            - digest
            - action_list
            - null
      additionalProperties: false
    AgentOutputStatus:
      type: string
      enum:
        - PENDING
        - VALID
        - INVALID
        - PROCESSED
    AgentOutputDeliveryStatus:
      type: string
      enum:
        - NOT_REQUIRED
        - PENDING
        - SENT
        - FAILED
        - PARTIAL
  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.

````