Agents

List agent session turns

Lists turns by creation time and turn ID. The after cursor is exclusive in the selected order. See session turns.

get/agents/sessions/{session_id}/turns

Path parameters

session_idstring required

The ID of the session.

Query parameters

limitinteger

The maximum number of resources to return, between 1 and 100. Defaults to 20.

order'asc' | 'desc'

The order in which paginated resources are returned.

The order in which resources are returned. Defaults to desc.

afterstring

Return resources after this resource ID in the selected order.

Response

A page of session turns.

object'list' required

The object type, which is always list.

first_idstring nullable required

The ID of the first resource in data, or null if the page is empty.

last_idstring nullable required

The ID of the last resource in data, or null if the page is empty. Pass this as after with the same order and filters.

has_moreboolean required

Whether there are more resources to retrieve after this page.

Changes

Changed in 5 of the 163 revisions of this API.32

    • ●

      added the new flex_unavailable enum value to the /////// response property for the response status

      response-property-enum-value-added

    • ○

      added the non-success response with the status

      response-non-success-status-added

    • ●

      added the new misalignment_policy_violation enum value to the /////// response property for the response status

      response-property-enum-value-added

    • ●

      added the new credit_balance_exhausted enum value to the /////// response property for the response status

      response-property-enum-value-added

    • ○

      endpoint added

      endpoint-added