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

# List Run Messages

> Returns a paginated list of messages produced by a run, in chronological order, with the oldest messages first.

Messages conform to the [AI SDK UIMessage format](https://ai-sdk.dev/docs/reference/ai-sdk-core/ui-message).



## OpenAPI

````yaml get /v1/agents/runs/{runId}/messages
openapi: 3.0.0
info:
  title: Browserbase API
  description: Browserbase API for 3rd party developers
  version: v1
servers:
  - url: https://api.browserbase.com
    description: Public endpoint
    variables: {}
security:
  - BrowserbaseAuth: []
tags: []
paths:
  /v1/agents/runs/{runId}/messages:
    get:
      summary: List Run Messages
      description: >-
        Returns a paginated list of messages produced by a run, in chronological
        order, with the oldest messages first.


        Messages conform to the [AI SDK UIMessage
        format](https://ai-sdk.dev/docs/reference/ai-sdk-core/ui-message).
      operationId: AgentRuns_messages
      parameters:
        - name: since
          in: query
          description: >-
            The `id` of the last message you've already received. The response
            will contain messages produced after that one, in chronological
            order. Omit on the first call. Pass the previous response's
            `nextSince` value to continue paging or to poll for new messages.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of messages to return.
          required: false
          schema:
            type: integer
            default: 20
            maximum: 100
            minimum: 1
        - name: all
          in: query
          description: >-
            Return every message after `since` in one response, ignoring
            `limit`.
          required: false
          schema:
            type: boolean
            default: false
        - name: runId
          in: path
          description: The run ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: >-
            The page of messages, in chronological order, with the oldest
            messages first.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    description: >-
                      The page of messages, in chronological order, with the
                      oldest messages first.
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - createdAt
                        - message
                      properties:
                        id:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        message:
                          description: An AI SDK response message (assistant or tool).
                          type: object
                          additionalProperties: true
                          properties:
                            role:
                              type: string
                              enum:
                                - assistant
                                - tool
                            content:
                              description: >-
                                Plain string (assistant text) or an array of
                                typed parts.
                              oneOf:
                                - type: string
                                - type: array
                                  items:
                                    type: object
                                    required:
                                      - type
                                    additionalProperties: true
                                    properties:
                                      type:
                                        description: >-
                                          text | reasoning | file | tool-call |
                                          tool-result
                                        type: string
                                      text:
                                        type: string
                                      toolCallId:
                                        type: string
                                      toolName:
                                        type: string
                                      input: {}
                                      output: {}
                                      mediaType:
                                        type: string
                                      data:
                                        type: string
                          required:
                            - role
                            - content
                  nextSince:
                    description: >-
                      The `id` of the last message in `data`. Pass it back as
                      `since` on the next request to continue paging, or to poll
                      for new messages. `null` only when the run has no messages
                      yet; in that case, omit `since` and retry.
                    type: string
                    nullable: true
                required:
                  - data
                  - nextSince
components:
  securitySchemes:
    BrowserbaseAuth:
      type: apiKey
      in: header
      name: X-BB-API-Key
      description: Your [Browserbase API Key](https://www.browserbase.com/settings).

````