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

# List Messages

> List a session's messages in chronological order.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json get /agent/sessions/{session_id}/messages
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /agent/sessions/{session_id}/messages:
    get:
      summary: List Messages
      description: List a session's messages in chronological order.
      operationId: list_messages_agent_sessions__session_id__messages_get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentMessage'
                title: >-
                  Response List Messages Agent Sessions  Session Id  Messages
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgentMessage:
      properties:
        id:
          type: string
          title: Id
        session_id:
          type: string
          title: Session Id
        role:
          type: string
          title: Role
          description: user | assistant | system
        content:
          additionalProperties: true
          type: object
          title: Content
        created_at:
          type: string
          format: date-time
          title: Created At
      additionalProperties: false
      type: object
      required:
        - id
        - session_id
        - role
        - content
        - created_at
      title: AgentMessage
      description: A persisted message in a session; ``content`` is the rendered parts.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````