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

# Decide on an assistant interaction

> Records the caller's decision on the pending interaction an assistant put in front of them -- answers to its questions, acceptance of a blueprint, approval of a plan, a revision request, or dismissal -- and delivers it to the assistant as the caller's next message. Only the person who opened the assistant may decide, and only on the exact revision and digest they were shown (409 otherwise). Approving a plan requires a signed-in user holding every permission its enabled steps need; the plan then runs in the background, one existing operation per step, under the caller's permissions, and its progress is appended to the assistant's events. The response is the interaction after the decision.



## OpenAPI

````yaml /managed-agents/openapi.yaml post /managed-agents/v1/sessions/{sessionId}/interactions/{interactionId}/decide
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}/interactions/{interactionId}/decide:
    post:
      tags:
        - Sessions
      summary: Decide on an assistant interaction
      description: >-
        Records the caller's decision on the pending interaction an assistant
        put in front of them -- answers to its questions, acceptance of a
        blueprint, approval of a plan, a revision request, or dismissal -- and
        delivers it to the assistant as the caller's next message. Only the
        person who opened the assistant may decide, and only on the exact
        revision and digest they were shown (409 otherwise). Approving a plan
        requires a signed-in user holding every permission its enabled steps
        need; the plan then runs in the background, one existing operation per
        step, under the caller's permissions, and its progress is appended to
        the assistant's events. The response is the interaction after the
        decision.
      operationId: managedAgentsSubmitAssistantInteractionDecision
      parameters:
        - description: The assistant session (UUID) that made the interaction.
          in: path
          name: sessionId
          required: true
          schema:
            description: The assistant session (UUID) that made the interaction.
            format: uuid
            type: string
        - description: The interaction id, from the interaction's event.
          in: path
          name: interactionId
          required: true
          schema:
            description: The interaction id, from the interaction's event.
            maxLength: 128
            type: string
        - $ref: '#/components/parameters/RecursionTenantId'
        - $ref: '#/components/parameters/RecursionOrganizationId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitAssistantInteractionDecisionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantInteraction'
          description: >-
            A typed request for the reader's input that an assistant put in
            front of them: questions, a solution blueprint, or a plan of
            changes. Each state is recorded as one event; the latest event per
            interactionId is the current state.
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidJson'
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
                discriminator:
                  propertyName: code
                  mapping:
                    invalid_json:
                      $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidJson'
                    invalid_request:
                      $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
                x-recursion-error-codes:
                  - invalid_json
                  - 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:
                oneOf:
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorForbidden'
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorSessionStartNotAdmitted
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorWorkspaceBoundaryDenied
                discriminator:
                  propertyName: code
                  mapping:
                    forbidden:
                      $ref: '#/components/schemas/ManagedAgentsApiErrorForbidden'
                    session_start_not_admitted:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorSessionStartNotAdmitted
                    workspace_boundary_denied:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorWorkspaceBoundaryDenied
                x-recursion-error-codes:
                  - forbidden
                  - session_start_not_admitted
                  - workspace_boundary_denied
          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'
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorConflict'
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorInteractionNotPending
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorInteractionRevisionStale
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorPlanPrerequisitesUnmet
                discriminator:
                  propertyName: code
                  mapping:
                    conflict:
                      $ref: '#/components/schemas/ManagedAgentsApiErrorConflict'
                    interaction_not_pending:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorInteractionNotPending
                    interaction_revision_stale:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorInteractionRevisionStale
                    plan_prerequisites_unmet:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorPlanPrerequisitesUnmet
                x-recursion-error-codes:
                  - conflict
                  - interaction_not_pending
                  - interaction_revision_stale
                  - plan_prerequisites_unmet
          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'
        '415':
          description: Unsupported Media Type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnsupportedMediaType'
                x-recursion-error-codes:
                  - unsupported_media_type
          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':
          description: Service Unavailable.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorAssistantDecisionsUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorContentStoreUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorContentStoreUnconfigured
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorPersistenceBusy'
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorSessionStartAdmissionUnavailable
                discriminator:
                  propertyName: code
                  mapping:
                    assistant_decisions_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorAssistantDecisionsUnavailable
                    content_store_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorContentStoreUnavailable
                    content_store_unconfigured:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorContentStoreUnconfigured
                    managed_agents_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                    persistence_busy:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorPersistenceBusy
                    service_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                    session_start_admission_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorSessionStartAdmissionUnavailable
                x-recursion-error-codes:
                  - assistant_decisions_unavailable
                  - content_store_unavailable
                  - content_store_unconfigured
                  - managed_agents_unavailable
                  - persistence_busy
                  - service_unavailable
                  - session_start_admission_unavailable
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '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:
    SubmitAssistantInteractionDecisionRequest:
      description: >-
        Request body of managedAgentsSubmitAssistantInteractionDecision: one
        decision on the exact revision of an assistant interaction the caller
        was shown.
      properties:
        answers:
          description: >-
            Answers, with decision answer. Every non-optional question needs
            one.
          items:
            $ref: '#/components/schemas/AssistantQuestionAnswerInput'
          maxItems: 4
          type: array
          x-recursion-omission:
            strategy: absent
        comments:
          description: Comments pinned to steps or fields, with decision request_revision.
          items:
            $ref: '#/components/schemas/AssistantCommentInput'
          maxItems: 30
          type: array
          x-recursion-omission:
            strategy: absent
        decision:
          description: >-
            The decision: answer a question interaction, accept a blueprint,
            approve a plan, ask for a revision of a blueprint or plan, or
            dismiss any pending interaction.
          enum:
            - answer
            - accept
            - approve
            - request_revision
            - cancel
          type: string
        digest:
          description: The digest of that revision, as shown. A mismatch is a 409.
          maxLength: 128
          type: string
        disabledSteps:
          description: 'With decision approve: optional steps to turn off.'
          items:
            type: string
          maxItems: 12
          type: array
          x-recursion-omission:
            strategy: absent
        edits:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/PlatformSafeJsonValue'
            type: object
          description: >-
            With decision approve: replacement values for editable step fields,
            keyed by stepId and then field name. Any edit records a new revision
            written by the person.
          maxProperties: 12
          type: object
          x-recursion-omission:
            strategy: absent
        note:
          description: >-
            A note for the assistant. Required for request_revision unless
            comments are given.
          maxLength: 4000
          type: string
          x-recursion-omission:
            strategy: absent
        revision:
          description: >-
            The interaction revision being decided, as shown. A stale revision
            is a 409.
          minimum: 1
          type: integer
          maximum: 9007199254740991
      required:
        - decision
        - revision
        - digest
      type: object
      additionalProperties: false
    AssistantInteraction:
      description: >-
        A typed request for the reader's input that an assistant put in front of
        them: questions, a solution blueprint, or a plan of changes. Each state
        is recorded as one event; the latest event per interactionId is the
        current state.
      properties:
        blueprint:
          $ref: '#/components/schemas/AssistantBlueprint'
          description: The solution design, on a blueprint interaction.
        decision:
          $ref: '#/components/schemas/AssistantDecision'
          description: The person's decision, once one was made.
        digest:
          description: >-
            Digest of this revision's content. A decision names it so a person
            decides exactly what they were shown.
          type: string
        interactionId:
          description: >-
            Stable id of the interaction. Revisions of a blueprint or plan keep
            it.
          type: string
        kind:
          description: >-
            What is being asked: questions, a solution blueprint, or a plan of
            changes.
          enum:
            - question
            - blueprint
            - plan
          type: string
        origin:
          description: >-
            Who wrote this revision: the assistant, or the person through an
            inline edit.
          enum:
            - assistant
            - user
          type: string
        plan:
          $ref: '#/components/schemas/AssistantPlan'
          description: The changes, on a plan interaction.
        questions:
          description: The questions, on a question interaction.
          items:
            $ref: '#/components/schemas/AssistantQuestion'
          type: array
        requestedAt:
          description: When this revision was put in front of the reader.
          format: date-time
          type: string
        revision:
          description: >-
            Revision number, starting at 1. Only the latest revision of a
            pending interaction can be decided.
          minimum: 1
          type: integer
          maximum: 9007199254740991
        status:
          description: Lifecycle state of the interaction.
          enum:
            - pending
            - answered
            - accepted
            - revision_requested
            - cancelled
            - superseded
            - executing
            - completed
            - failed
          type: string
        stepResults:
          description: What each approved step did, once a plan executes.
          items:
            $ref: '#/components/schemas/AssistantPlanStepResult'
          type: array
        summary:
          description: One or two sentences on why this is being asked.
          type: string
        title:
          description: Short heading for the interaction.
          type: string
      required:
        - interactionId
        - kind
        - revision
        - digest
        - status
        - origin
        - title
        - requestedAt
      type: object
      additionalProperties: false
    ManagedAgentsApiErrorInvalidJson:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invalid_json
        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.
    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.
    ManagedAgentsApiErrorSessionStartNotAdmitted:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - session_start_not_admitted
        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.
    ManagedAgentsApiErrorWorkspaceBoundaryDenied:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - workspace_boundary_denied
        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.
    ManagedAgentsApiErrorConflict:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - conflict
        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.
    ManagedAgentsApiErrorInteractionNotPending:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - interaction_not_pending
        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.
    ManagedAgentsApiErrorInteractionRevisionStale:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - interaction_revision_stale
        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.
    ManagedAgentsApiErrorPlanPrerequisitesUnmet:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - plan_prerequisites_unmet
        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.
    ManagedAgentsApiErrorUnsupportedMediaType:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - unsupported_media_type
        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.
    ManagedAgentsApiErrorAssistantDecisionsUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - assistant_decisions_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.
    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.
    ManagedAgentsApiErrorPersistenceBusy:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - persistence_busy
        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.
    ManagedAgentsApiErrorSessionStartAdmissionUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - session_start_admission_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.
    AssistantQuestionAnswerInput:
      description: The caller's answer to one question.
      properties:
        optionIds:
          description: >-
            Selected option ids, for select, picker and confirm questions
            (confirm answers with yes or no).
          items:
            type: string
          type: array
          x-recursion-omission:
            strategy: absent
        questionId:
          description: The question answered.
          type: string
        text:
          description: Free text, for text questions or an Other answer.
          maxLength: 4000
          type: string
          x-recursion-omission:
            strategy: absent
      required:
        - questionId
      type: object
      additionalProperties: false
    AssistantCommentInput:
      description: A comment pinned to a step or field of a blueprint or plan.
      properties:
        field:
          description: The field commented on.
          type: string
          x-recursion-omission:
            strategy: absent
        stepId:
          description: The step commented on.
          type: string
          x-recursion-omission:
            strategy: absent
        text:
          description: The comment.
          maxLength: 2000
          type: string
      required:
        - text
      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
    AssistantBlueprint:
      description: >-
        A solution design for the reader's use case: what starts the work, the
        agents, the capabilities it uses and what it produces.
      properties:
        agents:
          description: The agents and the part each plays.
          items:
            $ref: '#/components/schemas/AssistantBlueprintAgent'
          type: array
        capabilities:
          description: >-
            Platform capabilities the design uses, each resolved against the
            capability catalog.
          items:
            $ref: '#/components/schemas/AssistantBlueprintCapability'
          type: array
        checkpoints:
          description: Where a person reviews or decides.
          items:
            type: string
          type: array
        costClass:
          description: Rough running cost.
          enum:
            - low
            - medium
            - high
          type: string
        environment:
          description: The environment the agents run in, in words.
          type: string
        gaps:
          description: What the platform cannot do directly, said plainly.
          items:
            type: string
          type: array
        outputs:
          description: What the work produces.
          items:
            type: string
          type: array
        trigger:
          $ref: '#/components/schemas/AssistantBlueprintTrigger'
          description: What starts the work.
      required:
        - trigger
        - agents
        - capabilities
      type: object
      additionalProperties: false
    AssistantDecision:
      description: The reader's decision on an interaction.
      properties:
        answers:
          description: Answers, on a question interaction.
          items:
            $ref: '#/components/schemas/AssistantQuestionAnswer'
          type: array
        comments:
          description: Comments pinned to steps or fields, with a revision request.
          items:
            $ref: '#/components/schemas/AssistantComment'
          type: array
        decidedAt:
          description: When the decision was recorded.
          format: date-time
          type: string
        decidedBy:
          description: The user who decided.
          type: string
        decision:
          description: >-
            What was decided. superseded_by_interaction means the assistant
            replaced the interaction with a different one before the reader
            decided.
          enum:
            - answered
            - accepted
            - approved
            - revision_requested
            - cancelled
            - superseded_by_interaction
          type: string
        note:
          description: The reader's note.
          type: string
      required:
        - decision
        - decidedAt
      type: object
      additionalProperties: false
    AssistantPlan:
      description: An ordered set of changes the reader approves, edits, or asks to revise.
      properties:
        prerequisites:
          description: >-
            Setup the plan cannot do itself; approval waits for each one the
            server can check.
          items:
            $ref: '#/components/schemas/AssistantPlanPrerequisite'
          type: array
        steps:
          description: Changes in execution order.
          items:
            $ref: '#/components/schemas/AssistantPlanStep'
          type: array
      required:
        - steps
      type: object
      additionalProperties: false
    AssistantQuestion:
      description: One typed question of a question interaction.
      properties:
        allowOther:
          description: Whether a select question also accepts a free-text answer.
          type: boolean
        input:
          description: How the question is answered.
          enum:
            - single_select
            - multi_select
            - short_text
            - long_text
            - confirm
            - picker
          type: string
        multiple:
          description: Whether a picker question accepts more than one resource.
          type: boolean
        optional:
          description: Whether the question may be left unanswered.
          type: boolean
        options:
          description: >-
            The choices of a select or picker question. Picker options are
            resolved by the server from resources the reader can access.
          items:
            $ref: '#/components/schemas/AssistantQuestionOption'
          type: array
        picker:
          description: Which kind of resource a picker question selects.
          enum:
            - agent
            - environment
            - skill
            - vault
            - model
            - agent_template
            - environment_template
          type: string
        prompt:
          description: The question.
          type: string
        questionId:
          description: Id of the question within the interaction.
          type: string
      required:
        - questionId
        - prompt
        - input
      type: object
      additionalProperties: false
    AssistantPlanStepResult:
      description: What one approved plan step did.
      properties:
        link:
          description: Console path to it.
          type: string
        message:
          description: Detail, or the error.
          type: string
        resourceId:
          description: The id of what it created or changed.
          type: string
        resourceKind:
          description: What it created or changed.
          type: string
        status:
          description: >-
            How it ended, or running while it runs. uncertain means the outcome
            could not be confirmed and the step was not retried.
          enum:
            - running
            - completed
            - failed
            - skipped
            - uncertain
          type: string
        stepId:
          description: The plan step this result is for.
          type: string
      required:
        - stepId
        - status
      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.
    AssistantBlueprintAgent:
      description: One agent of a blueprint and the part it plays.
      properties:
        model:
          description: The model it runs on, when chosen.
          type: string
        responsibilities:
          description: What it does.
          type: string
        role:
          description: The agent's role.
          type: string
      required:
        - role
      type: object
      additionalProperties: false
    AssistantBlueprintCapability:
      description: >-
        One platform capability a blueprint uses, resolved against the
        capability catalog.
      properties:
        capabilityId:
          description: Id from the capability catalog.
          type: string
        kind:
          description: Capability kind, resolved by the server.
          type: string
        name:
          description: Customer-facing name, resolved by the server.
          type: string
        purpose:
          description: Why the design uses it.
          type: string
        status:
          description: Its status in this organization, resolved by the server.
          type: string
      required:
        - capabilityId
        - name
        - kind
        - status
      type: object
      additionalProperties: false
    AssistantBlueprintTrigger:
      description: What starts the work a blueprint describes.
      properties:
        detail:
          description: The schedule or the event, in words.
          type: string
        kind:
          description: Manual, on a schedule, or on an outside event.
          enum:
            - manual
            - schedule
            - event
          type: string
      required:
        - kind
      type: object
      additionalProperties: false
    AssistantQuestionAnswer:
      description: The reader's answer to one question.
      properties:
        optionIds:
          description: >-
            Selected option ids, for select, picker and confirm questions
            (confirm answers with yes or no).
          items:
            type: string
          type: array
        questionId:
          description: The question answered.
          type: string
        text:
          description: Free text, for text questions or an Other answer.
          maxLength: 4000
          type: string
      required:
        - questionId
      type: object
      additionalProperties: false
    AssistantComment:
      description: A comment pinned to a step or field of a blueprint or plan.
      properties:
        field:
          description: The field commented on.
          type: string
        stepId:
          description: The step commented on.
          type: string
        text:
          description: The comment.
          maxLength: 2000
          type: string
      required:
        - text
      type: object
      additionalProperties: false
    AssistantPlanPrerequisite:
      description: >-
        Setup a plan cannot do itself; approval waits for it when the server can
        check it.
      properties:
        capabilityId:
          description: The capability it unlocks.
          type: string
        detail:
          description: Why, and anything to choose while doing it.
          type: string
        kind:
          description: >-
            What the reader has to do. The server checks connect_integration and
            needs_admin when they name a capability; add_vault_credential is a
            reminder it cannot check.
          enum:
            - connect_integration
            - add_vault_credential
            - needs_admin
          type: string
        label:
          description: What to do, in words.
          type: string
        link:
          description: Console path that starts the setup.
          type: string
        prerequisiteId:
          description: Id within the plan.
          type: string
        satisfied:
          description: >-
            Whether the server found it done when this revision was written;
            false for a prerequisite it cannot check.
          type: boolean
      required:
        - prerequisiteId
        - kind
        - label
        - satisfied
      type: object
      additionalProperties: false
    AssistantPlanStep:
      description: >-
        One change of a plan: an action and the exact request it runs on
        approval.
      properties:
        action:
          description: The action, from the closed set the assistant can propose.
          type: string
        costClass:
          description: Whether approving the step can spend credit.
          enum:
            - none
            - model_spend
          type: string
        dependsOn:
          description: Earlier steps whose results this step uses.
          items:
            type: string
          type: array
        enabled:
          description: Whether the step runs on approval.
          type: boolean
        fields:
          description: How to render the step's input as a form.
          items:
            $ref: '#/components/schemas/AssistantPlanField'
          type: array
        input:
          additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          description: >-
            The action's request, as the server validated and normalized it. A
            value {"$ref": "steps.<stepId>.<field>"} is filled from an earlier
            step's result.
          type:
            - object
            - 'null'
        optional:
          description: Whether the reader may turn the step off.
          type: boolean
        stepId:
          description: >-
            Id of the step within the plan; later steps refer to its outputs by
            it.
          type: string
        title:
          description: What the step does, in words.
          type: string
        warnings:
          description: Things the reader should know before approving.
          items:
            type: string
          type: array
      required:
        - stepId
        - action
        - title
        - enabled
        - input
        - costClass
      type: object
      additionalProperties: false
    AssistantQuestionOption:
      description: One choice of a select or picker question, or of a plan field.
      properties:
        description:
          description: Optional detail shown under the label.
          type: string
        label:
          description: What the reader sees.
          type: string
        optionId:
          description: Id to answer with.
          type: string
      required:
        - optionId
        - label
      type: object
      additionalProperties: false
    AssistantPlanField:
      description: How a console renders one field of a plan step's input.
      properties:
        help:
          description: Short guidance shown with the field.
          type: string
        label:
          description: Field label.
          type: string
        name:
          description: Top-level key in the step input.
          type: string
        options:
          description: Choices for select and picker widgets, resolved by the server.
          items:
            $ref: '#/components/schemas/AssistantQuestionOption'
          type: array
        required:
          description: Whether the field must have a value.
          type: boolean
        widget:
          description: The control to render.
          enum:
            - text
            - long_text
            - markdown
            - code
            - select
            - multi_select
            - model_picker
            - environment_picker
            - agent_picker
            - skill_picker
            - vault_reference
            - key_list
            - number
            - boolean
            - resources
            - json
          type: string
      required:
        - name
        - label
        - widget
      type: object
      additionalProperties: false
  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.

````