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

# List a fleet's chat thread with bodies

> Returns the newest chat events first. Each item carries the trigger payload (`request_json`) and the agent's full answer (`response_text`). One request replaces reading the event list and then each event's detail. A page holds at most `limit` items and at most 512 KiB of encoded items. The newest item always ships, even alone. Follow `next_cursor` to read the rest. 



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json get /v1/workspaces/{workspace_id}/fleets/{fleet_id}/messages
openapi: 3.1.0
info:
  title: agentsfleet Control Plane API
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
  license:
    name: MIT
    identifier: MIT
  version: 1.0.0
servers:
  - url: https://api.agentsfleet.net
    description: Production
security: []
paths:
  /v1/workspaces/{workspace_id}/fleets/{fleet_id}/messages:
    get:
      tags:
        - Fleets
      summary: List a fleet's chat thread with bodies
      description: >-
        Returns the newest chat events first. Each item carries the trigger
        payload (`request_json`) and the agent's full answer (`response_text`).
        One request replaces reading the event list and then each event's
        detail. A page holds at most `limit` items and at most 512 KiB of
        encoded items. The newest item always ships, even alone. Follow
        `next_cursor` to read the rest. 
      operationId: list_fleet_messages
      parameters:
        - name: workspace_id
          in: path
          description: '`UUIDv7` of the workspace.'
          required: true
          schema:
            type: string
        - name: fleet_id
          in: path
          description: '`UUIDv7` of the fleet.'
          required: true
          schema:
            type: string
        - name: starting_after
          in: query
          description: Opaque continuation cursor from a previous page's `next_cursor`.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadResponse'
        '400':
          description: The request could not be read
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '401':
          description: No credential, or one this route does not accept
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: The credential is good and lacks the capability this route requires
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: The instance is at its ceiling
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: The daemon failed to answer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: A dependency this route needs is unreachable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - BearerAuth: []
components:
  schemas:
    ThreadResponse:
      type: object
      description: A page of one fleet's chat thread, bodies included.
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/EventDetail'
          description: The turns on this page, newest first.
        next_cursor:
          type:
            - string
            - 'null'
          description: Where the next page resumes, or `null` when this one ends the walk.
        total:
          type:
            - integer
            - 'null'
          format: int32
          description: How many turns the thread holds in total. Never populated.
          minimum: 0
    ProblemBody:
      type: object
      description: The body every refusal carries, under `application/problem+json`.
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        action_id:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the action the gate held.'
        current_state:
          type:
            - string
            - 'null'
          description: 'On a 409 only: the state that forbade the transition.'
        detail:
          type: string
          description: One sentence on what was refused and why.
        docs_uri:
          type: string
          description: Where the error code is documented.
        error_code:
          type: string
          description: The registry code, stable across releases.
        etag:
          type:
            - string
            - 'null'
          description: >-
            On a 412 only: the resource's current entity tag, to refetch and
            retry.
        gate_id:
          type:
            - string
            - 'null'
          description: 'On an answered approval gate''s 409 only: the gate that was answered.'
        missing_secrets:
          type:
            - array
            - 'null'
          items:
            type: string
          description: 'On a 424 only: the credentials this workspace has yet to store.'
        outcome:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the answer that stands.'
        request_id:
          type: string
          description: The request this refusal answers, for support.
        resolved_at:
          type:
            - integer
            - 'null'
          format: int64
          description: 'On that 409 only: when the standing answer was given.'
        resolved_by:
          type:
            - string
            - 'null'
          description: 'On that 409 only: who gave it.'
        title:
          type: string
          description: A short name for the refusal, safe to show a person.
        user_message:
          type:
            - string
            - 'null'
          description: A curated sentence for end users, where the code has one.
    EventDetail:
      type: object
      description: One event as the expanded view renders it — bodies included.
      required:
        - fleet_id
        - event_id
        - workspace_id
        - actor
        - event_type
        - status
        - request_json
        - created_at
        - updated_at
      properties:
        actor:
          type: string
          description: Who or what produced the event.
        checkpoint_id:
          type:
            - string
            - 'null'
          description: The session checkpoint this run wrote, when it wrote one.
        cost_nanos:
          type:
            - integer
            - 'null'
          format: int64
          description: What this event actually cost, summed over its telemetry rows.
        created_at:
          type: integer
          format: int64
          description: Epoch milliseconds the row was created.
        event_id:
          type: string
          description: >-
            The canonical event identifier — the stream entry id that produced
            it.
        event_type:
          type: string
          description: How the event entered the system, as stored.
        failure_detail:
          type:
            - string
            - 'null'
          description: The operator-readable cause line, absent when none was carried.
        failure_label:
          type:
            - string
            - 'null'
          description: What refused or failed the run, absent on a clean one.
        fleet_id:
          type: string
          description: The fleet this event belongs to.
        request_json:
          type: string
          description: The trigger payload as stored, serialized to text.
        response_text:
          type:
            - string
            - 'null'
          description: |-
            The agent's full answer.

            `null` while a run is in flight, and on a run that failed before
            producing one.
        resumes_event_id:
          type:
            - string
            - 'null'
          description: The event this one continues, set on a continuation.
        status:
          type: string
          description: Where the event's run got to, as stored.
        tokens:
          type:
            - integer
            - 'null'
          format: int64
          description: Tokens the run spent, absent until a runner reports.
        updated_at:
          type: integer
          format: int64
          description: Epoch milliseconds the row last changed.
        wall_ms:
          type:
            - integer
            - 'null'
          format: int64
          description: Wall milliseconds the run took, absent until a runner reports.
        workspace_id:
          type: string
          description: The workspace the fleet belongs to.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub
        OAuth

````