> ## 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.

# Stream one authenticated complete event content document

> Streams the complete stored content document for one event as application/json, for events whose payload was externalized instead of inlined in the timeline. The event must belong to the session in the path. The response carries an ETag over the content's SHA-256 and is privately cacheable.



## OpenAPI

````yaml /managed-agents/openapi.yaml get /managed-agents/v1/sessions/{session_id}/events/{event_id}/content
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/{session_id}/events/{event_id}/content:
    get:
      tags:
        - Sessions
      summary: Stream one authenticated complete event content document
      description: >-
        Streams the complete stored content document for one event as
        application/json, for events whose payload was externalized instead of
        inlined in the timeline. The event must belong to the session in the
        path. The response carries an ETag over the content's SHA-256 and is
        privately cacheable.
      operationId: managedAgentsGetSessionEventContent
      parameters:
        - description: Session id (UUID) the event belongs to.
          in: path
          name: session_id
          required: true
          schema:
            description: Session id (UUID) the event belongs to.
            format: uuid
            type: string
        - description: >-
            Event id, a lowercase canonical UUIDv7 taken from an event returned
            by listSessionEvents. Event ids sort chronologically.
          in: path
          name: event_id
          required: true
          schema:
            description: >-
              Event id, a lowercase canonical UUIDv7 taken from an event
              returned by listSessionEvents. Event ids sort chronologically.
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsEventContent'
          description: >-
            The body of a session event, shaped like a provider message: content
            blocks plus the stop reason and token usage the provider returned.
            Every event in a session transcript carries one.
        '400':
          description: The request was rejected by schema or semantic validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
        '401':
          description: The caller is unauthenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnauthorized'
        '403':
          description: The caller lacks a required permission or capability.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorForbidden'
        '404':
          description: No such resource is reachable for this caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorNotFound'
        '409':
          description: >-
            The request conflicts with the resource state, or with an in-flight
            idempotent replay.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ManagedAgentsApiErrorIosClientUpdateRequired
        '429':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
          description: A rate limit is exhausted. Honor `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorRateLimitExceeded'
        '500':
          description: An unexpected server-side failure.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorInternalError'
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorInvariantViolation
                discriminator:
                  propertyName: code
                  mapping:
                    internal_error:
                      $ref: '#/components/schemas/ManagedAgentsApiErrorInternalError'
                    invariant_violation:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorInvariantViolation
        '502':
          description: The service returned an invalid response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorBadGateway'
        '503':
          description: >-
            A dependency is unavailable. Consult details.retryable and
            Retry-After when present before retrying.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorContentStoreUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorContentStoreUnconfigured
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                discriminator:
                  propertyName: code
                  mapping:
                    content_store_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorContentStoreUnavailable
                    content_store_unconfigured:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorContentStoreUnconfigured
                    managed_agents_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                    service_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
        '504':
          description: The service did not respond before the timeout.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorGatewayTimeout'
components:
  schemas:
    ManagedAgentsEventContent:
      description: >-
        The body of a session event, shaped like a provider message: content
        blocks plus the stop reason and token usage the provider returned. Every
        event in a session transcript carries one.
      properties:
        blocks:
          description: >-
            Ordered content blocks of this message, in the provider's
            content-block form. Empty for events that carry no message body.
          items:
            $ref: '#/components/schemas/ManagedAgentsContentBlock'
          type:
            - array
            - 'null'
        evaluation_budget_reached:
          $ref: '#/components/schemas/ManagedAgentsEvaluationBudgetReached'
          description: >-
            Cost cap and targets stopped or left unadmitted when the run reached
            it.
        evaluation_plan_frozen:
          $ref: '#/components/schemas/ManagedAgentsEvaluationPlanFrozen'
          description: >-
            Frozen target, rubric, concurrency, and cost plan for an evaluation
            run.
        evaluation_run_finished:
          $ref: '#/components/schemas/ManagedAgentsEvaluationRunFinished'
          description: Terminal counts and systemic failure state for the evaluation run.
        evaluation_target_skipped:
          $ref: '#/components/schemas/ManagedAgentsEvaluationTargetSkipped'
          description: >-
            Sanitized outcome for a target whose processing ended without a
            completed verdict audit.
        evaluation_target_started:
          $ref: '#/components/schemas/ManagedAgentsEvaluationTargetStarted'
          description: Identity and clone state for one admitted evaluation target.
        evaluation_verdict_recorded:
          $ref: '#/components/schemas/ManagedAgentsEvaluationVerdictRecorded'
          description: Audit reference to one authoritative immutable evaluation verdict.
        metadata:
          additionalProperties: {}
          description: >-
            Extra key/value detail about this event that is not part of the
            message body, such as the ingest subtype or the sandbox working
            directory.
          type: object
        plan:
          description: Plan items reported by the agent, present on a plan_update event.
          items:
            $ref: '#/components/schemas/ManagedAgentsPlanItem'
          type: array
        stop_reason:
          description: >-
            The provider's own stop_reason for the assistant turn, recorded
            verbatim, e.g. end_turn, tool_use, or max_tokens. Absent on events
            that are not a model response.
          type: string
        tools:
          description: >-
            Tool definitions that were in scope for the turn, as sent to the
            provider. Recorded on the session's system message so a transcript
            shows what the model could call.
          items:
            $ref: '#/components/schemas/ManagedAgentsToolDefinition'
          type: array
        usage:
          $ref: '#/components/schemas/ManagedAgentsUsage'
          description: >-
            Token counts the provider reported for the call that produced this
            message. Absent when the event is not a model response.
      required:
        - blocks
      type: object
      example:
        blocks:
          - byte_size: 1
            content: []
            context: example
            data: example
            encrypted_content: example
            height: 1
            id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            input:
              key: example
            is_error: true
            media_type: example
            name: example-name
            omitted_bytes: 1
            payload: example
            provider: example
            provider_payload: example
            redacted: true
            semantic_hint: example
            sha256: example
            signature: example
            source:
              file_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
              type: file
            summary: []
            text: example
            title: example
            tool_use_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            type: example
            uri: example
            url: https://example.com
            url_expires_at: '2026-02-18T09:30:00.000Z'
            width: 1
        evaluation_budget_reached:
          affected_target_session_ids:
            - 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          max_tree_cost_usd: example
        evaluation_plan_frozen:
          criteria:
            - criterion_key: example
              criterion_text: example
          max_concurrent_threads: 1
          max_tree_cost_usd: example
          targets:
            - snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
              target_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        evaluation_run_finished:
          failure_code: plan_failed
          failure_message: example
          targets_budget_reached: 1
          targets_skipped: 1
          targets_total: 1
          terminal_status: completed
          verdicts_recorded: 1
        evaluation_target_skipped:
          child_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          reason: example
          reason_code: child_create_failed
          snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          target_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        evaluation_target_started:
          child_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          clone_state: ready
          evaluation_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          sandbox_provider: example
          snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          target_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        evaluation_verdict_recorded:
          child_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          cost_completeness: complete
          cost_usd: example
          evaluation_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          failed_criterion_keys:
            - example
          result: pass
          snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          target_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        metadata:
          key: example
        plan:
          - content: example
            id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            status: example
        stop_reason: example
        tools:
          - description: example
            input_schema:
              key: example
            name: example-name
        usage:
          cache_read_tokens: 1
          cache_write_tokens: 1
          cost_usd: 1.5
          input_tokens: 1
          output_tokens: 1
    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.
    ManagedAgentsApiErrorIosClientUpdateRequired:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - ios_client_update_required
        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.
    ManagedAgentsApiErrorInvariantViolation:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invariant_violation
        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.
    ManagedAgentsApiErrorBadGateway:
      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.
    ManagedAgentsApiErrorContentStoreUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - content_store_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.
    ManagedAgentsApiErrorContentStoreUnconfigured:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - content_store_unconfigured
        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.
    ManagedAgentsApiErrorGatewayTimeout:
      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.
    ManagedAgentsContentBlock:
      description: >-
        One block of message content: text, image, tool_use, tool_result,
        thinking, or a provider passthrough. The type field says which fields
        apply, and provider-native payloads are carried through verbatim.
      properties:
        byte_size:
          description: Decoded image byte size.
          format: int64
          type: integer
        content:
          description: >-
            Nested blocks carrying a tool_result payload, so a tool can return
            both text and images.
          items:
            $ref: '#/components/schemas/ManagedAgentsContentBlock'
          type: array
        context:
          description: >-
            A document block's context: what the model should know about the
            document before reading it, disclosed as its first paragraph.
          type: string
        data:
          description: >-
            Base64 image bytes. Omitted from default reads and present only for
            legacy storage or explicit hydrate=images responses.
          type: string
        encrypted_content:
          description: >-
            Sealed reasoning payload for providers that return reasoning
            encrypted. Opaque to clients; replay it verbatim.
          type: string
        height:
          description: Validated image height in pixels.
          type: integer
        id:
          description: >-
            Provider-assigned id of a tool_use block. Echo it back as
            tool_use_id on the matching tool_result.
          type: string
        input:
          additionalProperties: {}
          description: >-
            Tool arguments the model produced for a tool_use block, matching
            that tool's input schema.
          type: object
        is_error:
          description: >-
            True when a tool_result reports that the tool call failed; the
            nested content then carries the error detail.
          type: boolean
        media_type:
          description: >-
            Declared media type; inline computer-use images allow image/jpeg,
            image/png, and image/webp.
          type: string
        name:
          description: Name of the tool the model is invoking, on a tool_use block.
          type: string
        omitted_bytes:
          description: Original byte count reported by a redacted image placeholder.
          format: int64
          type: integer
        payload:
          description: >-
            Provider-native block body, stored verbatim for block types this
            schema does not model. Passed through unchanged.
        provider:
          description: >-
            Provider that emitted a passthrough block, e.g. anthropic or openai,
            telling readers how to interpret payload.
          type: string
        provider_payload:
          description: >-
            Original provider block exactly as received, kept alongside the
            normalized fields for lossless replay.
        redacted:
          description: >-
            True when the block's content was withheld (redacted thinking, or an
            image dropped by redaction); the remaining fields describe what was
            removed.
          type: boolean
        semantic_hint:
          description: >-
            Coarse hint about what an unmodeled provider block represents, so a
            reader can render it without provider-specific logic.
          type: string
        sha256:
          description: Lowercase SHA-256 digest of decoded image bytes.
          type: string
        signature:
          description: >-
            Provider-issued signature over a thinking block, or the thought
            signature a Gemini tool_use block was issued with, required for the
            provider to accept that block on a later turn. Opaque; replay it
            verbatim.
          type: string
        source:
          $ref: '#/components/schemas/ManagedAgentsContentBlockSource'
          description: >-
            Where a user-sent image or document block's bytes came from when
            they were named rather than sent inline: {type: "file", file_id}.
            Kept on the stored block as provenance after the bytes were copied
            into the session; an image block then also carries the session's own
            uri.
        summary:
          description: >-
            Readable summary blocks a provider returns alongside sealed or
            long-form reasoning.
          items:
            $ref: '#/components/schemas/ManagedAgentsContentBlock'
          type: array
        text:
          description: Text of a text block, or the reasoning text of a thinking block.
          type: string
        title:
          description: >-
            A document block's title, disclosed to the model beside the
            document.
          type: string
        tool_use_id:
          description: Id of the tool_use block that this tool_result answers.
          type: string
        type:
          description: >-
            Block discriminator: text, image, document (a user-sent block naming
            a file by id, inlined as text when the message is accepted),
            tool_use, tool_result, thinking, redacted_thinking, or a provider
            passthrough type. Which of the other fields apply depends on this
            value.
          type: string
        uri:
          description: >-
            Private typed content reference. Fetch it through getSessionImage;
            clients cannot read this URI directly.
          type: string
        url:
          description: >-
            Short-lived HTTPS URL for the image bytes. Present only when the
            read asked for image_urls=signed and the deployment has signing
            configured. Never stored; fetch a fresh read after url_expires_at.
          type: string
        url_expires_at:
          description: When url stops working. Absent whenever url is.
          format: date-time
          type: string
        width:
          description: Validated image width in pixels.
          type: integer
      required:
        - type
      type: object
      example:
        byte_size: 1
        content: []
        context: example
        data: example
        encrypted_content: example
        height: 1
        id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        input:
          key: example
        is_error: true
        media_type: example
        name: example-name
        omitted_bytes: 1
        payload: example
        provider: example
        provider_payload: example
        redacted: true
        semantic_hint: example
        sha256: example
        signature: example
        source:
          file_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          type: file
        summary: []
        text: example
        title: example
        tool_use_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        type: example
        uri: example
        url: https://example.com
        url_expires_at: '2026-02-18T09:30:00.000Z'
        width: 1
    ManagedAgentsEvaluationBudgetReached:
      additionalProperties: false
      description: >-
        Audit event payload listing targets stopped or left unadmitted when the
        evaluation tree reached its exact USD cap.
      properties:
        affected_target_session_ids:
          description: Target sessions stopped or not admitted because the cap was reached.
          items:
            format: uuid
            type: string
          minItems: 1
          type: array
        max_tree_cost_usd:
          description: Exact decimal USD tree cap that stopped further admission.
          type: string
      required:
        - max_tree_cost_usd
        - affected_target_session_ids
      type: object
      example:
        affected_target_session_ids:
          - 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        max_tree_cost_usd: example
    ManagedAgentsEvaluationPlanFrozen:
      additionalProperties: false
      description: >-
        Audit event payload that freezes the complete target set, rubric,
        concurrency, and cost cap before child work starts.
      properties:
        criteria:
          description: Ordered rubric criteria frozen from the evaluator version.
          items:
            $ref: '#/components/schemas/ManagedAgentsEvaluationPlanCriterion'
          type: array
        max_concurrent_threads:
          description: Maximum evaluation children admitted concurrently for this run.
          minimum: 1
          type: integer
        max_tree_cost_usd:
          description: >-
            Optional exact decimal USD cap on billed cost shared by the
            evaluation tree.
          type: string
        targets:
          description: Ordered target sessions and their immutable transcript snapshots.
          items:
            $ref: '#/components/schemas/ManagedAgentsEvaluationPlanTarget'
          type: array
      required:
        - targets
        - criteria
        - max_concurrent_threads
      type: object
      example:
        criteria:
          - criterion_key: example
            criterion_text: example
        max_concurrent_threads: 1
        max_tree_cost_usd: example
        targets:
          - snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            target_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
    ManagedAgentsEvaluationRunFinished:
      additionalProperties: false
      description: >-
        Terminal audit payload summarizing planned targets, completed verdict
        audits, skips, budget stops, and any systemic failure.
      properties:
        failure_code:
          description: Stable systemic failure classification for a failed run.
          enum:
            - plan_failed
            - cleanup_failed
            - accounting_failed
            - audit_failed
            - finalization_failed
          type: string
        failure_message:
          description: Sanitized explanation of the systemic run failure.
          type: string
        targets_budget_reached:
          description: >-
            Number of targets stopped or not admitted after the cost cap was
            reached.
          minimum: 0
          type: integer
        targets_skipped:
          description: >-
            Number of targets whose processing ended without a completed verdict
            audit.
          minimum: 0
          type: integer
        targets_total:
          description: Number of target snapshots frozen in the plan.
          minimum: 0
          type: integer
        terminal_status:
          description: Final lifecycle state of the evaluation run.
          enum:
            - completed
            - failed
            - cancelled
          type: string
        verdicts_recorded:
          description: Number of completed verdict audit events recorded for this run.
          minimum: 0
          type: integer
      required:
        - terminal_status
        - targets_total
        - verdicts_recorded
        - targets_skipped
        - targets_budget_reached
      type: object
      example:
        failure_code: plan_failed
        failure_message: example
        targets_budget_reached: 1
        targets_skipped: 1
        targets_total: 1
        terminal_status: completed
        verdicts_recorded: 1
    ManagedAgentsEvaluationTargetSkipped:
      additionalProperties: false
      description: >-
        Audit event payload for a target whose processing ended without a
        completed verdict audit.
      properties:
        child_session_id:
          description: Evaluation child identity when creation reached that stage.
          format: uuid
          type: string
        reason:
          description: Sanitized operator-readable explanation of the skip.
          type: string
        reason_code:
          description: Stable machine-readable classification of the skipped target.
          enum:
            - child_create_failed
            - child_run_failed
            - verdict_invalid
            - cleanup_or_accounting_failed
          type: string
        snapshot_event_id:
          description: Canonical transcript event boundary frozen for the skipped target.
          format: uuid
          type: string
        target_session_id:
          description: >-
            Root target whose processing ended without a completed verdict
            audit.
          format: uuid
          type: string
      required:
        - target_session_id
        - snapshot_event_id
        - reason_code
        - reason
      type: object
      example:
        child_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        reason: example
        reason_code: child_create_failed
        snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        target_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
    ManagedAgentsEvaluationTargetStarted:
      additionalProperties: false
      description: >-
        Audit event payload linking one frozen target to its isolated evaluation
        child and reserved verdict identity.
      properties:
        child_session_id:
          description: Evaluation child session created for this target.
          format: uuid
          type: string
        clone_state:
          description: Whether the child received a ready clone or needed no sandbox.
          enum:
            - ready
            - sandboxless
          type: string
        evaluation_id:
          description: Immutable verdict identity reserved for this target.
          format: uuid
          type: string
        sandbox_provider:
          description: Provider of the isolated clone when the target has a sandbox.
          type: string
        snapshot_event_id:
          description: >-
            Canonical event id bounding the immutable target transcript
            snapshot.
          format: uuid
          type: string
        target_session_id:
          description: Root session whose frozen snapshot is being evaluated.
          format: uuid
          type: string
      required:
        - target_session_id
        - snapshot_event_id
        - child_session_id
        - evaluation_id
        - clone_state
      type: object
      example:
        child_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        clone_state: ready
        evaluation_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        sandbox_provider: example
        snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        target_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
    ManagedAgentsEvaluationVerdictRecorded:
      additionalProperties: false
      description: >-
        Audit event payload emitted after the authoritative immutable verdict
        and clone cost are recorded.
      properties:
        child_session_id:
          description: Evaluation child session that produced the verdict.
          format: uuid
          type: string
        cost_completeness:
          description: Whether every cost component is final and priced.
          enum:
            - complete
            - pending
            - unpriced
            - partial
            - legacy_partial
            - indeterminate
          type: string
        cost_usd:
          description: Exact canonical decimal USD attributed to this evaluation.
          type: string
        evaluation_id:
          description: Immutable evaluation row that remains authoritative.
          format: uuid
          type: string
        failed_criterion_keys:
          description: Sorted unique rubric keys whose verdict is fail.
          items:
            type: string
          type: array
          uniqueItems: true
        result:
          description: Overall verdict derived from the frozen criterion results.
          enum:
            - pass
            - fail
            - not_applicable
          type: string
        snapshot_event_id:
          description: Canonical event id bounding the transcript evidence considered.
          format: uuid
          type: string
        target_session_id:
          description: Root session evaluated by this immutable verdict.
          format: uuid
          type: string
      required:
        - target_session_id
        - snapshot_event_id
        - child_session_id
        - evaluation_id
        - result
        - failed_criterion_keys
        - cost_usd
        - cost_completeness
      type: object
      example:
        child_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        cost_completeness: complete
        cost_usd: example
        evaluation_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        failed_criterion_keys:
          - example
        result: pass
        snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        target_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
    ManagedAgentsPlanItem:
      description: >-
        One step of a plan or to-do list an agent reported while working.
        Appears on an event's content when the agent's harness emits a plan; the
        service records it without acting on it.
      properties:
        content:
          description: Text of the planned step as the agent wrote it.
          type: string
        id:
          description: >-
            Identifier for this plan entry, stable across the turns that update
            it.
          type: string
        status:
          description: >-
            Progress value the agent reported for this step. Passed through as
            written and not interpreted by the service.
          type: string
      required:
        - id
        - content
        - status
      type: object
      example:
        content: example
        id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        status: example
    ManagedAgentsToolDefinition:
      description: >-
        One tool as it was offered to the model, in the Anthropic and OpenAI
        tool-definition vocabulary. Recorded on the event for a model turn so a
        reader can see exactly what the model could call.
      properties:
        description:
          description: >-
            Natural-language explanation of what the tool does and when to use
            it, supplied to the model verbatim.
          type: string
        input_schema:
          additionalProperties: {}
          description: >-
            JSON Schema for the tool's arguments. Passed to the model provider
            unchanged.
          type:
            - object
            - 'null'
        name:
          description: >-
            Tool name the model calls, matching the name on the resulting
            tool_use content block.
          type: string
      required:
        - name
        - description
        - input_schema
      type: object
      example:
        description: example
        input_schema:
          key: example
        name: example-name
    ManagedAgentsUsage:
      description: >-
        Token counts and cost for a single unit of work, in the provider's usage
        vocabulary. Attached to an event's content for the model turn that
        produced it; see session usage for whole-session totals.
      properties:
        cache_read_tokens:
          description: >-
            Prompt tokens served from the provider's prompt cache, billed at the
            cached rate.
          format: int64
          type: integer
        cache_write_tokens:
          description: Prompt tokens written into the provider's prompt cache.
          format: int64
          type: integer
        cost_usd:
          description: Accrued cost in USD, derived from cost_micros for display.
          format: double
          type: number
        input_tokens:
          description: Prompt tokens billed for this unit of work.
          format: int64
          type: integer
        output_tokens:
          description: Completion tokens billed for this unit of work.
          format: int64
          type: integer
      type: object
      example:
        cache_read_tokens: 1
        cache_write_tokens: 1
        cost_usd: 1.5
        input_tokens: 1
        output_tokens: 1
    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: {}
      description: >-
        Optional structured error details. Reserved transport fields are typed;
        code-specific fields remain forward compatible.
    ManagedAgentsContentBlockSource:
      description: >-
        Where a user-sent image or document block takes its bytes from when the
        caller names a file instead of carrying them: a file from the
        organization's catalog, read and copied into the session when the
        message is accepted, so the block the transcript keeps names both the
        source and the copy.
      properties:
        file_id:
          description: >-
            The file whose bytes the block carries, from the caller's
            organization, unexpired.
          type: string
        type:
          description: Always file.
          enum:
            - file
          type: string
      required:
        - type
        - file_id
      type: object
      example:
        file_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        type: file
    ManagedAgentsEvaluationPlanCriterion:
      additionalProperties: false
      description: >-
        One stable rubric criterion frozen from the evaluator version for the
        complete run.
      properties:
        criterion_key:
          description: Stable rubric key used to join verdicts across the run.
          type: string
        criterion_text:
          description: Frozen rubric instruction evaluated for every target.
          type: string
      required:
        - criterion_key
        - criterion_text
      type: object
      example:
        criterion_key: example
        criterion_text: example
    ManagedAgentsEvaluationPlanTarget:
      additionalProperties: false
      description: >-
        One root target and the immutable transcript boundary frozen into an
        evaluation plan.
      properties:
        snapshot_event_id:
          description: >-
            Canonical event id at or before which the target transcript is
            frozen.
          format: uuid
          type: string
        target_session_id:
          description: Root session selected as an immutable evaluation target.
          format: uuid
          type: string
      required:
        - target_session_id
        - snapshot_event_id
      type: object
      example:
        snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        target_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````