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

# List Production Traces



## OpenAPI

````yaml /openapi.json get /api/v1/agents/{agent_id}/traces
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
  x-trajectory-api-version: '2026-10-14'
  description: >-
    This contract is API version 2026-10-14. The optional Trajectory-API-Version
    header pins it, and tmp-contract is accepted as an alias. Requests without
    the header get this version. Version 2026-10-07 and the pre-launch legacy
    response formats are retired.
servers:
  - url: https://api.trajectory.ai
security: []
tags:
  - name: agents
    x-group: Agents
  - name: benchmarks
    x-group: Specs (benchmarks)
  - name: diagnostics
    x-group: Diagnostics
  - name: benchmark-ingestion
    x-group: Spec (benchmark) submissions
  - name: eval
    x-group: Evaluations
  - name: training
    x-group: Training
  - name: deployments
    x-group: Deployments
  - name: model-endpoints
    x-group: Model endpoints
  - name: inference
    x-group: Inference
  - name: trajectories
    x-group: Trajectories
  - name: artifacts
    x-group: Artifacts
  - name: telemetry
    x-group: Telemetry
  - name: supported-models
    x-group: Supported models
  - name: organizations
    x-group: Organizations
  - name: secrets
    x-group: Secrets
paths:
  /api/v1/agents/{agent_id}/traces:
    get:
      tags:
        - agents
      summary: List Production Traces
      operationId: listAgentProductionTraces
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            title: Agent Id
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 25
            title: Limit
        - name: queue
          in: query
          required: false
          schema:
            enum:
              - all
              - needs_review
              - reviewed
            type: string
            default: all
            title: Queue
        - name: order
          in: query
          required: false
          schema:
            enum:
              - newest
              - oldest
            type: string
            default: newest
            title: Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentProductionTraceListResponse'
        '400':
          description: The request is malformed or cannot be processed.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestErrorResponse'
        '404':
          description: >-
            The requested resource does not exist or is not visible to the
            caller.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundErrorResponse'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AgentProductionTraceListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AgentProductionTrace'
          type: array
          title: Items
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
        total_count:
          type: integer
          title: Total Count
        reviewed_count:
          type: integer
          title: Reviewed Count
      type: object
      required:
        - items
        - has_more
        - total_count
        - reviewed_count
      title: AgentProductionTraceListResponse
    InvalidRequestErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/InvalidRequestErrorBody'
      type: object
      required:
        - error
      title: InvalidRequestErrorResponse
    ResourceNotFoundErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ResourceNotFoundErrorBody'
      type: object
      required:
        - error
      title: ResourceNotFoundErrorResponse
    AgentProductionTrace:
      properties:
        agent_id:
          type: string
          title: Agent Id
        trajectory:
          $ref: '#/components/schemas/TrajectoryMetadata'
        attached_at:
          type: string
          title: Attached At
          description: Time the canonical trajectory was recorded.
        updated_at:
          type: string
          title: Updated At
        task_preview:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Preview
          description: First user message preview used as the inbox and table title.
        feedback_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Feedback Score
        feedback_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedback Text
        reviewer_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviewer Email
          description: Email of the authenticated reviewer who last recorded this feedback.
      type: object
      required:
        - agent_id
        - trajectory
        - attached_at
        - updated_at
      title: AgentProductionTrace
    InvalidRequestErrorBody:
      properties:
        type:
          type: string
          const: invalid_request_error
          title: Type
        code:
          type: string
          const: invalid_request
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: InvalidRequestErrorBody
    ResourceNotFoundErrorBody:
      properties:
        type:
          type: string
          const: invalid_request_error
          title: Type
        code:
          type: string
          const: resource_not_found
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ResourceNotFoundErrorBody
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    TrajectoryMetadata:
      properties:
        trajectory_id:
          type: string
          title: Trajectory Id
          description: Trajectory ID, returned as tid by the create endpoint.
        organization_id:
          type: string
          title: Organization Id
        dataset_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Id
        dataset_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Name
        dataset_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Source
        dataset_gcs_prefix:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Gcs Prefix
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Trace Id
        model_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Id
        model_association_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Association Source
        model_association_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Model Association Metadata
        source:
          type: string
          title: Source
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        termination_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Termination Reason
          description: >-
            Recorded reason the trajectory ended, independent of rollout state;
            null when not recorded.
        termination_subreason:
          anyOf:
            - $ref: '#/components/schemas/TrajectoryTerminationSubreason'
            - type: 'null'
        reward:
          anyOf:
            - type: number
            - type: 'null'
          title: Reward
        num_steps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Steps
        created_at:
          type: string
          title: Created At
        training_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Training Run Id
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
        policy_step:
          anyOf:
            - type: integer
            - type: 'null'
          title: Policy Step
          description: Sampled policy step, not optimizer step.
        rollout:
          anyOf:
            - $ref: '#/components/schemas/TrajectoryRolloutStatus'
            - type: 'null'
      type: object
      required:
        - trajectory_id
        - organization_id
        - source
        - created_at
      title: TrajectoryMetadata
    EmptyErrorContext:
      properties: {}
      additionalProperties: false
      type: object
      title: EmptyErrorContext
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          additionalProperties: true
          title: Context
          type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ApiErrorBody
      type: object
    TrajectoryTerminationSubreason:
      properties:
        reason:
          type: string
          title: Reason
        scope:
          anyOf:
            - type: string
            - type: 'null'
          title: Scope
          description: Scope of the limiting budget, not which execution remains open.
      type: object
      required:
        - reason
        - scope
      title: TrajectoryTerminationSubreason
    TrajectoryRolloutStatus:
      properties:
        rollout_id:
          type: string
          title: Rollout Id
        status:
          type: string
          title: Status
          description: Recorded Rollout Service state, such as IN_PROGRESS or FAILED.
        termination_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Termination Reason
          description: Recorded rollout termination enum.
        harness_diagnostic:
          anyOf:
            - $ref: '#/components/schemas/HarnessDiagnostic'
            - type: 'null'
      type: object
      required:
        - rollout_id
        - status
      title: TrajectoryRolloutStatus
    ErrorType:
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - conflict_error
        - billing_error
        - rate_limit_error
        - dependency_error
        - api_error
      title: ErrorType
      type: string
    HarnessDiagnostic:
      properties:
        exception_chain:
          items:
            type: string
          type: array
          maxItems: 4
          title: Exception Chain
          default: []
        locations:
          items:
            type: string
          type: array
          maxItems: 4
          title: Locations
          default: []
        category:
          type: string
          enum:
            - timeout
            - connection
            - rate_limit
            - authentication
            - server
            - other
          title: Category
        preceding_tracebacks:
          items:
            $ref: '#/components/schemas/TracebackDiagnostic'
          type: array
          maxItems: 4
          title: Preceding Tracebacks
          default: []
        exit_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Exit Code
        exception_messages:
          items:
            type: string
            maxLength: 2048
          type: array
          maxItems: 4
          title: Exception Messages
          default: []
      additionalProperties: false
      type: object
      required:
        - category
      title: HarnessDiagnostic
    TracebackDiagnostic:
      properties:
        exception_chain:
          items:
            type: string
          type: array
          maxItems: 4
          title: Exception Chain
          default: []
        locations:
          items:
            type: string
          type: array
          maxItems: 4
          title: Locations
          default: []
      additionalProperties: false
      type: object
      title: TracebackDiagnostic
  headers:
    RequestId:
      schema:
        type: string
    TrajectoryShouldRetry:
      schema:
        type: boolean
    RetryAfter:
      schema:
        type: string
  responses:
    ApiErrorResponse:
      description: >-
        Common API error. Possible codes: `authentication_required`,
        `permission_denied`, `validation_error`, `rate_limited`,
        `internal_error`, `service_unavailable`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Trajectory-Should-Retry:
          $ref: '#/components/headers/TrajectoryShouldRetry'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorEnvelope'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.