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

# List the Agent Logs of a Request

> Lists, in chronological order, the timeline of the AI agent execution that handled a Request: its messages, actions, approvals, playbook runs and lifecycle events. This endpoint may change or be removed without prior notice.



## OpenAPI

````yaml /api-reference/openapi.yml get /v1/requests/{uid}/agent_logs
openapi: 3.0.1
info:
  title: Siit Public API
  version: v0
servers:
  - url: https://api.siit.io
security: []
paths:
  /v1/requests/{uid}/agent_logs:
    parameters:
      - name: uid
        in: path
        description: The UID (or `friendly_id`) of the Request
        required: true
        schema:
          type: string
    get:
      tags:
        - Unstable
        - Agent Log
      summary: List the Agent Logs of a Request
      description: >-
        Lists, in chronological order, the timeline of the AI agent execution
        that handled a Request: its messages, actions, approvals, playbook runs
        and lifecycle events. This endpoint may change or be removed without
        prior notice.
      parameters:
        - name: type_in[]
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - action_execution
                - ai_action
                - approval_event
                - execution_event
                - message
                - message_event
                - playbook_execution
                - request_created
          required: false
          style: form
          explode: true
          description: >-
            Only return items of these types. Use `message` alone to read just
            the conversation.
        - name: occurred_after
          in: query
          schema:
            type: string
            format: date-time
          required: false
          description: >-
            Only return items that happened after this DateTime (ISO 8601,
            exclusive).
        - name: occurred_before
          in: query
          schema:
            type: string
            format: date-time
          required: false
          description: >-
            Only return items that happened before this DateTime (ISO 8601,
            exclusive).
        - name: page
          in: query
          required: false
          description: The current page
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Number of results retrieved per page.
          schema:
            type: integer
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/meta_object'
                  results:
                    type: array
                    items:
                      type: object
                      description: >-
                        One item of an agent execution timeline. Every item
                        shares this envelope; only `data` varies with `type`.
                      properties:
                        uid:
                          type: string
                          nullable: true
                          description: >-
                            UID of the underlying record. Null for item types
                            without one (message_event, ai_action,
                            approval_event).
                        type:
                          type: string
                          enum:
                            - action_execution
                            - ai_action
                            - approval_event
                            - execution_event
                            - message
                            - message_event
                            - playbook_execution
                            - request_created
                          description: The kind of item, which sets the shape of `data`.
                        occurred_at:
                          type: string
                          format: date-time
                          description: When the item happened, formatted as ISO 8601.
                        data:
                          description: >-
                            Type-specific payload. Its shape depends on the item
                            `type`, as listed below.
                          oneOf:
                            - title: message
                              description: >-
                                For `type: message`: a message exchanged in the
                                agent conversation.
                              type: object
                              properties:
                                sender:
                                  type: string
                                  enum:
                                    - agent
                                    - user
                                  description: Who sent the message.
                                user:
                                  type: string
                                  nullable: true
                                  description: UID of the conversation user.
                                body:
                                  type: string
                                  nullable: true
                                  description: >-
                                    Plain-text content of the message, with
                                    sensitive values masked.
                                sent_at:
                                  type: string
                                  format: date-time
                                  nullable: true
                                  description: When the message was sent.
                            - title: message_event
                              description: >-
                                For `type: message_event`: a state change or
                                moderation event on a message.
                              type: object
                              properties:
                                event:
                                  type: string
                                  description: >-
                                    The message event (e.g. acknowledged,
                                    moderated).
                                article:
                                  type: string
                                  nullable: true
                                  description: >-
                                    UID of the Knowledge Article involved, if
                                    any.
                                playbook:
                                  type: string
                                  nullable: true
                                  description: UID of the playbook involved, if any.
                                moderation_reason:
                                  type: string
                                  nullable: true
                                  description: Why the message was moderated, if it was.
                            - title: ai_action
                              description: >-
                                For `type: ai_action`: a built-in AI tool the
                                agent ran while composing a message.
                              type: object
                              properties:
                                kind:
                                  type: string
                                  description: The AI tool that ran.
                            - title: playbook_execution
                              description: >-
                                For `type: playbook_execution`: a run of a
                                configured playbook.
                              type: object
                              properties:
                                playbook:
                                  type: string
                                  nullable: true
                                  description: UID of the playbook.
                                playbook_name:
                                  type: string
                                  nullable: true
                                  description: Name of the playbook.
                                state:
                                  type: string
                                  description: State of the playbook run.
                                started_at:
                                  type: string
                                  format: date-time
                                  nullable: true
                                  description: When the run started.
                                finished_at:
                                  type: string
                                  format: date-time
                                  nullable: true
                                  description: When the run finished.
                                error_code:
                                  type: string
                                  nullable: true
                                  description: Error code, when the run failed.
                                rejection_reason:
                                  type: string
                                  nullable: true
                                  description: Why the run was rejected, if it was.
                            - title: action_execution
                              description: >-
                                For `type: action_execution`: an action the
                                agent executed (default or configured function).
                              type: object
                              properties:
                                kind:
                                  type: string
                                  description: The action that ran.
                                state:
                                  type: string
                                  description: State of the action execution.
                                playbook_execution:
                                  type: string
                                  nullable: true
                                  description: >-
                                    UID of the playbook execution the action ran
                                    under, if any.
                                configured_function:
                                  type: string
                                  nullable: true
                                  description: >-
                                    UID of the configured function, for
                                    configured function actions.
                                approvers:
                                  type: array
                                  items:
                                    type: string
                                  nullable: true
                                  description: >-
                                    UIDs of the configured approvers (older
                                    executions only).
                                approval_condition:
                                  type: string
                                  nullable: true
                                  description: >-
                                    Configured approval condition (older
                                    executions only).
                                started_at:
                                  type: string
                                  format: date-time
                                  nullable: true
                                  description: When the action started.
                                finished_at:
                                  type: string
                                  format: date-time
                                  nullable: true
                                  description: When the action finished.
                                error_code:
                                  type: string
                                  nullable: true
                                  description: Error code, when the action failed.
                                rejection_reason:
                                  type: string
                                  nullable: true
                                  description: Why the action was rejected, if it was.
                            - title: approval_event
                              description: >-
                                For `type: approval_event`: a state transition
                                of an action approval.
                              type: object
                              properties:
                                event:
                                  type: string
                                  description: The transition (e.g. approve, reject).
                                from_state:
                                  type: string
                                  nullable: true
                                  description: State before the transition.
                                to_state:
                                  type: string
                                  nullable: true
                                  description: State after the transition.
                                approval:
                                  type: string
                                  nullable: true
                                  description: UID of the approval.
                                approver:
                                  type: string
                                  nullable: true
                                  description: UID of the approver.
                                action_execution:
                                  type: string
                                  nullable: true
                                  description: >-
                                    UID of the action execution the approval
                                    gates.
                            - title: request_created
                              description: >-
                                For `type: request_created`: the agent created a
                                Request.
                              type: object
                              properties:
                                request:
                                  type: string
                                  description: UID of the created Request.
                                friendly_id:
                                  type: string
                                  description: Friendly ID of the created Request.
                            - title: execution_event
                              description: >-
                                For `type: execution_event`: a lifecycle event
                                of the execution itself.
                              type: object
                              properties:
                                event:
                                  type: string
                                  description: >-
                                    The lifecycle event (e.g. triage_completed,
                                    article_suggested, article_approved,
                                    article_rejected).
                                article:
                                  type: string
                                  nullable: true
                                  description: >-
                                    UID of the Knowledge Article involved, if
                                    any.
        '400':
          description: Invalid type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors_object'
        '401':
          description: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors_object'
      security:
        - bearer: []
components:
  schemas:
    meta_object:
      type: object
      properties:
        count:
          type: integer
        current_page:
          type: integer
        next_page_link:
          type: string
          nullable: true
        per_page:
          type: integer
          default: 20
          maximum: 200
        previous_page_link:
          type: string
          nullable: true
        total:
          type: integer
    errors_object:
      type: object
      properties:
        error:
          type: string
        troubleshoot:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````