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

# Read sandbox CPU, memory, and GPU usage for a session tree

> Returns the tree's sandbox attachments and one page of per-minute resource usage buckets for them, ordered by attachment then time. Each bucket carries the minute's average and peak; resolution=raw adds the individual samples as parallel arrays indexed by offsets_ms. A tree whose compute was released and revived has several attachments; follow revived_from_sandbox_id to connect them. live reports whether a sandbox is still attached, which is the cue to keep polling. An empty sandboxes list means the tree never ran in a sandbox or sampling is disabled; an attachment with sampling_source=unsupported means the sandbox could not measure itself.



## OpenAPI

````yaml /recursion/openapi.yaml get /managed-agents/v1/sessions/{sessionId}/resource-samples
openapi: 3.1.0
info:
  title: Managed Agents API
  version: 0.14.0
  description: >-
    The Recursion Managed Agents REST API. Authenticate with a Recursion API key
    as a bearer token. An organization-scoped key acts in its own organization
    and needs nothing else; a tenant-scoped key must also send
    `x-organization-id` with an organization id or `default`. Field names follow
    each operation's published schema.
servers:
  - url: https://api.recursion.labelbox.com
security:
  - bearerAuth: []
paths:
  /managed-agents/v1/sessions/{sessionId}/resource-samples:
    get:
      tags:
        - Sessions
      summary: Read sandbox CPU, memory, and GPU usage for a session tree
      description: >-
        Returns the tree's sandbox attachments and one page of per-minute
        resource usage buckets for them, ordered by attachment then time. Each
        bucket carries the minute's average and peak; resolution=raw adds the
        individual samples as parallel arrays indexed by offsets_ms. A tree
        whose compute was released and revived has several attachments; follow
        revived_from_sandbox_id to connect them. live reports whether a sandbox
        is still attached, which is the cue to keep polling. An empty sandboxes
        list means the tree never ran in a sandbox or sampling is disabled; an
        attachment with sampling_source=unsupported means the sandbox could not
        measure itself.
      operationId: managedAgentsListSessionResourceSamples
      parameters:
        - description: >-
            Inclusive lower bound on bucket_start, RFC 3339. Omit for the start
            of the tree.
          in: query
          name: from
          schema:
            description: >-
              Inclusive lower bound on bucket_start, RFC 3339. Omit for the
              start of the tree.
            format: date-time
            type: string
        - description: Exclusive upper bound on bucket_start, RFC 3339. Omit for now.
          in: query
          name: to
          schema:
            description: Exclusive upper bound on bucket_start, RFC 3339. Omit for now.
            format: date-time
            type: string
        - description: >-
            minute returns per-minute summaries only; raw also includes each
            bucket's per-sample arrays at the producer's cadence (five seconds
            by default). Use raw for the window on screen and minute for the
            overview.
          in: query
          name: resolution
          schema:
            default: minute
            description: >-
              minute returns per-minute summaries only; raw also includes each
              bucket's per-sample arrays at the producer's cadence (five seconds
              by default). Use raw for the window on screen and minute for the
              overview.
            enum:
              - minute
              - raw
            type: string
        - description: >-
            Maximum buckets per page, across all of the tree's sandbox
            attachments.
          in: query
          name: limit
          schema:
            default: 120
            description: >-
              Maximum buckets per page, across all of the tree's sandbox
              attachments.
            maximum: 720
            minimum: 1
            type: integer
        - description: >-
            Signed continuation token from a previous page's next_page_token.
            Bound to the organization, session, and filters it was issued for.
          in: query
          name: page_token
          schema:
            description: >-
              Signed continuation token from a previous page's next_page_token.
              Bound to the organization, session, and filters it was issued for.
            type: string
        - description: >-
            Any session id (UUID) in the tree. The sandbox is shared by the
            whole tree, so every id in it returns the same usage.
          in: path
          name: sessionId
          required: true
          schema:
            description: >-
              Any session id (UUID) in the tree. The sandbox is shared by the
              whole tree, so every id in it returns the same usage.
            format: uuid
            type: string
        - $ref: '#/components/parameters/RecursionTenantId'
        - $ref: '#/components/parameters/RecursionOrganizationId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResourceSamplesResponse'
          description: >-
            Sandbox CPU, memory, and accelerator usage for a session tree, as
            minute buckets per sandbox attachment. Samples are what the sandbox
            measured of itself, collected on tool calls and on read.
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
                x-recursion-error-codes:
                  - invalid_request
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnauthorized'
                x-recursion-error-codes:
                  - unauthorized
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorForbidden'
                x-recursion-error-codes:
                  - forbidden
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorNotFound'
                x-recursion-error-codes:
                  - not_found
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '413':
          description: Payload Too Large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorPayloadTooLarge'
                x-recursion-error-codes:
                  - payload_too_large
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '429':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: Too Many Requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorRateLimitExceeded'
                x-recursion-error-codes:
                  - rate_limit_exceeded
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorInternalError'
                x-recursion-error-codes:
                  - internal_error
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '502':
          description: A dependent service returned an invalid response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorDependencyFailure'
                x-recursion-error-codes:
                  - bad_gateway
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '503':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: Service Unavailable.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                discriminator:
                  propertyName: code
                  mapping:
                    managed_agents_unavailable: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                    service_unavailable: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                x-recursion-error-codes:
                  - managed_agents_unavailable
                  - service_unavailable
        '504':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: A dependent service timed out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorDependencyTimeout'
                x-recursion-error-codes:
                  - gateway_timeout
components:
  parameters:
    RecursionTenantId:
      name: x-tenant-id
      in: header
      required: false
      description: >-
        Optional tenant consistency check. When present, it must name the tenant
        bound to the API key, including when x-organization-id is `default`.
      schema:
        type: string
        minLength: 1
    RecursionOrganizationId:
      name: x-organization-id
      in: header
      required: false
      description: >-
        Organization in which to act. Required for a tenant-scoped API key.
        Optional for an organization-scoped key, where it must name that same
        organization. The value may be an organization id or `default`.
      schema:
        type: string
        minLength: 1
  schemas:
    SessionResourceSamplesResponse:
      description: >-
        Sandbox CPU, memory, and accelerator usage for a session tree, as minute
        buckets per sandbox attachment. Samples are what the sandbox measured of
        itself, collected on tool calls and on read.
      properties:
        as_of:
          description: RFC 3339 server time at which the page was read.
          format: date-time
          type: string
        buckets:
          description: >-
            One page of minute buckets ordered by (sandbox_id, bucket_start).
            Each bucket names its attachment; join on sandboxes to place it on a
            lane.
          items:
            $ref: '#/components/schemas/ResourceSampleBucket'
          type: array
        live:
          description: >-
            True while a sandbox that can be sampled is still attached to the
            tree. A client keeps polling while this is true and stops once it
            turns false; an attached sandbox that cannot measure itself does not
            keep it true.
          type: boolean
        next_page_token:
          description: >-
            Present when more buckets remain. Pass as page_token with the same
            query to continue.
          type: string
        resolution:
          description: Resolution the buckets were read at.
          enum:
            - minute
            - raw
          type: string
        root_session_id:
          description: Root of the tree the usage belongs to.
          type: string
        sandboxes:
          description: >-
            Every sandbox attachment the tree has had, oldest first, including
            ones that have since been released or closed. Empty when the tree
            never had a sandbox or sampling is disabled. Complete on every page.
          items:
            $ref: '#/components/schemas/SessionSandbox'
          type: array
        session_id:
          description: Session id named in the request.
          type: string
      required:
        - session_id
        - root_session_id
        - resolution
        - live
        - sandboxes
        - buckets
        - as_of
      type: object
      additionalProperties: false
    ManagedAgentsApiErrorInvalidRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invalid_request
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorUnauthorized:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - unauthorized
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorForbidden:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - forbidden
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorNotFound:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - not_found
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorPayloadTooLarge:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - payload_too_large
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorRateLimitExceeded:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - rate_limit_exceeded
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorInternalError:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - internal_error
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorDependencyFailure:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - bad_gateway
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorManagedAgentsUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - managed_agents_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorServiceUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - service_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorDependencyTimeout:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - gateway_timeout
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ResourceSampleBucket:
      description: >-
        One sandbox attachment's resource usage for one minute. Per-sample CPU,
        memory, and disk readings are parallel arrays indexed by offsets_ms; the
        average and peak columns summarize the minute and are all a
        summary-resolution read returns. Capacities and limits give each series
        its denominator.
      properties:
        bucket_start:
          description: RFC 3339 timestamp of the minute's start, on the producer's clock.
          format: date-time
          type: string
        complete:
          description: >-
            True once the producer has moved past this minute. An incomplete
            bucket is the one being filled and is rewritten by the next drain.
          type: boolean
        cpu_capacity_millicores:
          description: >-
            CPU the container could use in millicores: its quota when set,
            otherwise the CPUs its cpuset allows. Divide cpu_millicores by this
            for utilization percent.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        cpu_limit_millicores:
          description: CPU quota of the container in millicores, when one is set.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        cpu_millicores:
          description: >-
            Per-sample CPU consumption in millicores; 1000 is one core fully
            busy.
          items:
            format: int64
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          type: array
        cpu_millicores_avg:
          description: Mean CPU millicores over the minute.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        cpu_millicores_peak:
          description: Highest sampled CPU millicores in the minute.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        disk_capacity_bytes:
          description: >-
            Bytes the workspace volume can hold for an unprivileged writer (size
            less the root reserve). Divide disk_used by this for utilization
            percent.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        disk_used_avg_bytes:
          description: >-
            Mean bytes in use on the workspace volume over the minute. Absent
            without a disk reading.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        disk_used_bytes:
          description: >-
            Per-sample bytes in use on the volume holding the workspace. -1
            marks a sample without a disk reading. Absent when the producer
            never saw the volume.
          items:
            format: int64
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          type: array
        disk_used_peak_bytes:
          description: >-
            Highest sampled bytes in use on the workspace volume in the minute.
            Absent without a disk reading.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        gpu_count:
          description: >-
            Number of accelerators visible to the container. Absent without
            accelerators.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        gpu_devices:
          description: Per-device summary for the minute. Absent without accelerators.
          items:
            $ref: '#/components/schemas/GPUDeviceMinute'
          type: array
        gpu_memory_total_bytes:
          description: >-
            Total accelerator memory in bytes across devices. Absent without
            accelerators.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        gpu_memory_used_bytes:
          description: >-
            Per-sample GPU memory in use, summed across devices. Absent without
            accelerators.
          items:
            format: int64
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          type: array
        gpu_memory_used_peak_bytes:
          description: >-
            Highest sampled GPU memory in use during the minute, in bytes.
            Absent without accelerators.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        gpu_utilization_avg:
          description: >-
            Mean GPU utilization percent over the minute. Absent without
            accelerators.
          type: number
        gpu_utilization_peak:
          description: >-
            Highest sampled GPU utilization percent in the minute. Absent
            without accelerators.
          type: number
        gpu_utilization_percent:
          description: >-
            Per-sample GPU utilization percent, mean across devices. Absent
            without accelerators.
          items:
            format: double
            type: number
          type: array
        interval_ms:
          description: Producer sampling cadence in milliseconds.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        memory_capacity_bytes:
          description: >-
            Memory the container could use in bytes: its limit when set,
            otherwise the machine's total. Divide the working set by this for
            utilization percent.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        memory_limit_bytes:
          description: Memory limit of the container in bytes, when one is set.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        memory_working_set_avg_bytes:
          description: Mean memory working set over the minute, in bytes.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        memory_working_set_bytes:
          description: >-
            Per-sample memory working set in bytes (resident less reclaimable
            file cache).
          items:
            format: int64
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          type: array
        memory_working_set_peak_bytes:
          description: Highest sampled memory working set in the minute, in bytes.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        offsets_ms:
          description: >-
            Sample times as milliseconds after bucket_start, ascending. Indexes
            the other per-sample arrays.
          items:
            format: int64
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          type: array
        received_at:
          description: >-
            RFC 3339 commit timestamp of the write that last touched this
            bucket.
          format: date-time
          type: string
        sample_count:
          description: >-
            Number of samples in the minute; twelve at the default five-second
            cadence.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        sandbox_id:
          description: Attachment the bucket belongs to.
          type: string
        shared_slots:
          description: >-
            Historical count of sessions that shared the retired environment
            worker's process boundary, including this one. Absent on samples
            from active providers.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - sandbox_id
        - bucket_start
        - complete
        - sample_count
        - interval_ms
        - cpu_millicores_avg
        - cpu_millicores_peak
        - memory_working_set_avg_bytes
        - memory_working_set_peak_bytes
        - received_at
      type: object
      additionalProperties: false
    SessionSandbox:
      description: >-
        One continuous residency of a sandbox container in a session tree: when
        it was bound, when and why it stopped serving, which attachment it
        continues if the compute was revived from a snapshot, and the state of
        resource sampling for it.
      properties:
        attached_at:
          description: RFC 3339 timestamp at which the container was bound to the tree.
          format: date-time
          type: string
        detach_reason:
          description: >-
            Why the attachment ended: released (compute given back, workspace
            kept), closed (session ended), replaced (a different container took
            over), idle_stopped (the provider stopped an idle compute, workspace
            kept), or lost (the sandbox binding was found gone).
          type: string
        detached_at:
          description: >-
            RFC 3339 timestamp at which the container stopped serving the tree.
            Absent while attached.
          format: date-time
          type: string
        last_drained_at:
          description: RFC 3339 timestamp of the last successful drain from the producer.
          format: date-time
          type: string
        owner_session_path:
          description: >-
            Tree path of the session that attached the container. '/' for the
            root.
          type: string
        revived_from_sandbox_id:
          description: >-
            Attachment this one continues, when the container was restored from
            the previous attachment's snapshot.
          type: string
        role:
          description: What the container is to the session. Always primary today.
          type: string
        sample_interval_ms:
          description: Producer sampling cadence in milliseconds.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        sample_rows:
          description: Number of minute buckets stored for this attachment.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        sample_watermark_at:
          description: >-
            Start of the newest minute bucket with samples. Absent until the
            first drain lands data.
          format: date-time
          type: string
        sampling_scope:
          description: >-
            What the samples describe: cgroup for one container or host for the
            whole machine.
          type: string
        sampling_source:
          description: >-
            Producer of this attachment's resource samples: rma_worker or
            agent_service_daemon. Absent until the first drain, and
            'unsupported' when the sandbox cannot measure itself.
          type: string
        sandbox_id:
          description: >-
            Tree-local identifier of this attachment (UUIDv7). A
            released-and-revived compute is a new attachment; follow
            revived_from_sandbox_id for its predecessor.
          type: string
        sandbox_instance_id:
          description: >-
            Provider-assigned identity of the container: a compute id or
            container id. Historical self_hosted rows may contain a daemon id.
          type: string
        sandbox_provider:
          description: >-
            Sandbox runtime that provided the container: runs or docker.
            Historical rows may report the retired self_hosted value.
          type: string
      required:
        - sandbox_id
        - sandbox_provider
        - sandbox_instance_id
        - role
        - owner_session_path
        - attached_at
        - sample_rows
      type: object
      additionalProperties: false
    ManagedAgentsApiErrorDetails:
      type: object
      properties:
        field:
          description: >-
            Request field or header responsible for the error, when one can be
            identified.
          type: string
        issues:
          description: >-
            Boundary-validation failures as path-prefixed human-readable
            messages.
          type: array
          items:
            type: string
        requestId:
          description: Request correlation identifier for support and log lookup.
          type: string
        retryable:
          description: >-
            Server advice about failure transience. `true` means transient,
            `false` means non-transient, and absence gives no advice. Automatic
            replay is allowed only when this field is not `false` and the
            operation-specific retry and idempotency contract permits replay.
          type: boolean
      additionalProperties:
        $ref: '#/components/schemas/PlatformSafeJsonValue'
      description: >-
        Optional structured error details. Reserved transport fields are typed;
        code-specific fields remain forward compatible.
    GPUDeviceMinute:
      description: >-
        One accelerator's summary for a minute bucket: its driver index, average
        and peak utilization, peak memory used, and total memory. The per-sample
        GPU arrays, and the -1 holes for samples the device did not report, live
        on the bucket itself.
      properties:
        index:
          description: Device index as the driver reports it.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        memory_total_bytes:
          description: Device memory capacity in bytes.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        memory_used_peak_bytes:
          description: Highest sampled device memory in use during the minute, in bytes.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        utilization_avg:
          description: Mean utilization percent across the minute's samples.
          format: double
          type: number
        utilization_peak:
          description: Highest sampled utilization percent in the minute.
          format: double
          type: number
      required:
        - index
        - utilization_avg
        - utilization_peak
        - memory_used_peak_bytes
        - memory_total_bytes
      type: object
      additionalProperties: false
    PlatformSafeJsonValue:
      description: >-
        A JSON value whose integer members stay within the exact ECMAScript
        safe-integer range at every nesting level.
      oneOf:
        - type: 'null'
        - type: boolean
        - type: string
        - type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        - type: number
          not:
            type: integer
        - type: array
          items:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
        - additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          type: object
  headers:
    RecursionOrganizationId:
      description: Organization id resolved for this request.
      schema:
        type: string
        minLength: 1
    RecursionTenantId:
      description: Tenant id resolved for this request.
      schema:
        type: string
        minLength: 1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````