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

# List messages

> List a task's messages in order, oldest first.

Your messages have `role: "user"` and the agent's have `role: "assistant"`. Each agent reply is a single message whose `content[]` holds the whole reply: text, tool calls, and results. A reply still in progress has `status: "streaming"` with the content so far.

`limit` (default 200, max 500) bounds the underlying events read, not the messages returned, so expect fewer messages than `limit`. The first page is the most recent stretch of the conversation.


## OpenAPI

````yaml api-reference/openapi.json GET /experimental/tasks/{task_id}/messages
openapi: 3.1.0
info:
  title: Phylo API — V1
  description: Public API for Phylo, the biomedical AI agent platform.
  version: 0.1.0
servers:
  - url: https://api.phylo.bio/v1
    description: >-
      Self-serve platform. Enterprise customers should contact the Phylo team to
      get their API base URL. Learn more at https://phylo.bio/enterprise.
security: []
paths:
  /experimental/tasks/{task_id}/messages:
    get:
      tags:
        - messages
      summary: List messages
      description: List a task's messages in order, oldest first.
      operationId: list_messages_experimental_tasks__task_id__messages_get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            default: 200
            title: Limit
        - name: before_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Before Id
        - name: after_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: After Id
      responses:
        '200':
          description: Page of messages, oldest first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageList'
              example:
                type: list
                data:
                  - id: msg_a4f9b5cc30d8
                    type: message
                    task_id: tsk_017ilCeuDpMWTSH9Ah1syUGJ
                    created_at: '2026-08-12T21:21:03.412000Z'
                    role: user
                    content:
                      - type: text
                        text: >-
                          I'm a clinical genomics analyst working up Patient001.
                          There are 3 BRCA1 pathogenic-flagged variants in the
                          attached VCF. For each variant: describe ClinVar
                          significance, flag PARP inhibitor eligibility, note
                          any conflicts in the literature. Cite ClinVar VCV/RCV
                          IDs and PMIDs.
                    platform: api
                  - id: msg_1a0ef0fa8e26
                    type: message
                    task_id: tsk_017ilCeuDpMWTSH9Ah1syUGJ
                    created_at: '2026-08-12T21:21:08.735000Z'
                    role: assistant
                    status: completed
                    completed_at: '2026-08-12T21:31:37.204000Z'
                    content:
                      - type: text
                        text: >-
                          Loaded the genetic-variant-annotation skill. For these
                          3 BRCA1 variants I'll (1) query ClinVar's REST API
                          directly for each rsID to get current assertions,
                          review status, star ratings, and conditions, and (2)
                          cross-reference NCBI's ClinVar records for conflicting
                          submissions and literature PMIDs.
                      - type: tool_use
                        id: toolu_01RkjLRcNtbVHBBwWDDk7gmF
                        name: Skill
                        input:
                          action: load
                          name: genetic-variant-annotation
                      - type: tool_result
                        tool_use_id: toolu_01RkjLRcNtbVHBBwWDDk7gmF
                        content: >-
                          # Skill: genetic-variant-annotation


                          **Category**: genomics_genetics


                          **Description**: Annotate genomic variants in VCF
                          files with functional effects, clinical significance,
                          and pathogenicity predictions. … (truncated)
                      - type: text
                        text: >-
                          Here is the full structured report. Two deliverables
                          are saved: `report_Patient001_BRCA1_variants.md` and
                          `Patient001_BRCA1_variant_report.json`. All three
                          variants are confirmed pathogenic by ClinVar (3-star
                          review); PARP inhibitor eligibility applies for HBOC
                          and ovarian indications.
                    platform: api
                    input:
                      user_message_id: msg_a4f9b5cc30d8
                      file_ids: []
                has_more: false
                first_id: msg_a4f9b5cc30d8
                last_id: msg_1a0ef0fa8e26
      security:
        - bearerAuth: []
components:
  schemas:
    MessageList:
      properties:
        type:
          type: string
          const: list
          title: Type
          default: list
        data:
          items:
            $ref: '#/components/schemas/Message'
          type: array
          title: Data
        has_more:
          type: boolean
          title: Has More
          default: false
        first_id:
          anyOf:
            - type: string
            - type: 'null'
          title: First Id
        last_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Id
      type: object
      required:
        - data
      title: MessageList
    Message:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: message
          title: Type
          default: message
        task_id:
          type: string
          title: Task Id
        created_at:
          type: string
          format: date-time
          title: Created At
        role:
          type: string
          enum:
            - user
            - assistant
            - system
          title: Role
        content:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Content
        finish_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Finish Reason
        status:
          anyOf:
            - type: string
              enum:
                - pending
                - streaming
                - completed
                - cancelling
                - cancelled
                - failed
            - type: 'null'
          title: Status
        stop_reason:
          anyOf:
            - type: string
              enum:
                - stop
                - length
                - cancelled
                - error
            - type: 'null'
          title: Stop Reason
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        platform:
          type: string
          enum:
            - api
            - mcp
            - web
            - desktop
            - mobile
          title: Platform
          default: api
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input
        output:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output
      type: object
      required:
        - id
        - task_id
        - created_at
        - role
        - content
      title: Message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Requires an API key. See the Authentication guide.

````