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

# List sessions

> Returns sessions visible to the caller in the calling organization, most recent first, filtered by any combination of status, kind, agent_id, current agent tag_ids, and external source. kind accepts a comma-separated list, while tag_ids uses AND semantics. Capped by limit (default 100, max 1000) rather than cursor-paginated. Ordinary callers receive only unclassified public trees; callers with elevated classified-data access can receive classified rows allowed by their scope.



## OpenAPI

````yaml /managed-agents/openapi.yaml get /managed-agents/v1/sessions
openapi: 3.1.0
info:
  title: Managed Agents API
  version: 0.13.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:
    get:
      tags:
        - Sessions
      summary: List sessions
      description: >-
        Returns sessions visible to the caller in the calling organization, most
        recent first, filtered by any combination of status, kind, agent_id,
        current agent tag_ids, and external source. kind accepts a
        comma-separated list, while tag_ids uses AND semantics. Capped by limit
        (default 100, max 1000) rather than cursor-paginated. Ordinary callers
        receive only unclassified public trees; callers with elevated
        classified-data access can receive classified rows allowed by their
        scope.
      operationId: managedAgentsListSessions
      parameters:
        - description: Filter by session status.
          in: query
          name: status
          schema:
            description: Filter by session status.
            type: string
        - description: >-
            Filter by session kind. Accepts a comma-separated list
            (kind=chat,api_call) to match any of several kinds, which is how a
            caller selects agent sessions without RL rollouts. A kind filter
            never widens visibility. session_analyst rows are hidden by default;
            naming that kind returns them only when the caller's scope permits
            the classified sessions.
          in: query
          name: kind
          schema:
            description: >-
              Filter by session kind. Accepts a comma-separated list
              (kind=chat,api_call) to match any of several kinds, which is how a
              caller selects agent sessions without RL rollouts. A kind filter
              never widens visibility. session_analyst rows are hidden by
              default; naming that kind returns them only when the caller's
              scope permits the classified sessions.
            type: string
        - description: Filter by agent id.
          in: query
          name: agent_id
          schema:
            description: Filter by agent id.
            type: string
        - description: >-
            Comma-separated current agent tag ids, with at most 32 distinct ids.
            A session row's agent must carry every requested tag (AND
            semantics). Unknown or cross-organization ids return 404. Tags are
            resolved at read time, not from the session snapshot.
          in: query
          name: tag_ids
          schema:
            description: >-
              Comma-separated current agent tag ids, with at most 32 distinct
              ids. A session row's agent must carry every requested tag (AND
              semantics). Unknown or cross-organization ids return 404. Tags are
              resolved at read time, not from the session snapshot.
            type: string
        - in: query
          name: external_source_type
          schema:
            type: string
        - in: query
          name: external_source_id
          schema:
            type: string
        - description: >-
            Exact-match filter on caller-defined session metadata as key:value,
            split at the first colon. Repeat the parameter to require several
            pairs; a session's root must carry every one (AND semantics).
            Children of a matching root match too, so combine with root_only to
            list only the roots.
          in: query
          name: metadata
          schema:
            description: >-
              Exact-match filter on caller-defined session metadata as
              key:value, split at the first colon. Repeat the parameter to
              require several pairs; a session's root must carry every one (AND
              semantics). Children of a matching root match too, so combine with
              root_only to list only the roots.
            items:
              type: string
            maxItems: 32
            type: array
        - description: >-
            Require the root session to carry this caller-defined metadata key
            with any value. Repeatable; every listed key must be present.
          in: query
          name: metadata_key
          schema:
            description: >-
              Require the root session to carry this caller-defined metadata key
              with any value. Repeatable; every listed key must be present.
            items:
              type: string
            maxItems: 32
            type: array
        - description: >-
            Return only root sessions. Use this for model-cost list rows so
            children cannot consume the bounded page before their tree root.
          in: query
          name: root_only
          schema:
            description: >-
              Return only root sessions. Use this for model-cost list rows so
              children cannot consume the bounded page before their tree root.
            type: boolean
        - description: >-
            Return only root sessions whose active browser handoff is awaiting a
            person (not already being driven or resolved). Applied before
            ordering and pagination.
          in: query
          name: needs_user
          schema:
            description: >-
              Return only root sessions whose active browser handoff is awaiting
              a person (not already being driven or resolved). Applied before
              ordering and pagination.
            type: boolean
        - description: >-
            Filter root sessions by their newest immutable evaluation verdict
            before pagination. evaluated matches any verdict; none matches
            sessions with no evaluation.
          in: query
          name: evaluation_result
          schema:
            description: >-
              Filter root sessions by their newest immutable evaluation verdict
              before pagination. evaluated matches any verdict; none matches
              sessions with no evaluation.
            enum:
              - pass
              - fail
              - not_applicable
              - evaluated
              - none
            type: string
        - description: >-
            Page size. When more rows match, the response carries
            next_page_token; pass it back as page_token with the same filters
            and limit to read the next page.
          in: query
          name: limit
          schema:
            default: 100
            description: >-
              Page size. When more rows match, the response carries
              next_page_token; pass it back as page_token with the same filters
              and limit to read the next page.
            maximum: 1000
            type: integer
        - description: >-
            Signed continuation token from a previous page's next_page_token.
            Bound to the organization and to the exact filters and limit it was
            issued for; valid for one hour.
          in: query
          name: page_token
          schema:
            description: >-
              Signed continuation token from a previous page's next_page_token.
              Bound to the organization and to the exact filters and limit it
              was issued for; valid for one hour.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsSessionListResponse'
          description: >-
            Response body of GET /v1/sessions. Keyset-paginated over
            (updated_at, id): a page is a stable window at the moment it is
            read, but a session updated between two page reads moves to the
            front of the list, so a live list may show it twice or skip it once.
            Ordinary callers receive only unclassified public session trees;
            callers with elevated classified-data access can receive classified
            rows allowed by their scope. Each row is a summary without the
            start-time snapshots; read one session for those. Token and cost
            totals are not included; fetch them for a batch of ids via GET
            /v1/sessions/usage and GET /v1/sessions/costs.
        '400':
          description: The request was rejected by schema or semantic validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '401':
          description: The caller is unauthenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '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'
        '429':
          headers:
            Retry-After:
              description: Seconds the caller should wait before retrying.
              schema:
                type: string
              style: simple
          description: A rate limit is exhausted. Honor `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '500':
          description: An unexpected server-side failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '502':
          description: The service returned an invalid response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorBadGateway'
        '503':
          headers:
            Retry-After:
              description: Seconds the caller should wait before retrying.
              schema:
                type: string
              style: simple
          description: A dependency is unavailable. Retryable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '504':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
          description: The service did not respond before the timeout. Retryable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorGatewayTimeout'
components:
  schemas:
    ManagedAgentsSessionListResponse:
      additionalProperties: false
      description: >-
        Response body of GET /v1/sessions. Keyset-paginated over (updated_at,
        id): a page is a stable window at the moment it is read, but a session
        updated between two page reads moves to the front of the list, so a live
        list may show it twice or skip it once. Ordinary callers receive only
        unclassified public session trees; callers with elevated classified-data
        access can receive classified rows allowed by their scope. Each row is a
        summary without the start-time snapshots; read one session for those.
        Token and cost totals are not included; fetch them for a batch of ids
        via GET /v1/sessions/usage and GET /v1/sessions/costs.
      properties:
        next_page_token:
          description: >-
            Present when more sessions match. Pass it as page_token with the
            same filters and limit to read the next page. Absent on the last
            page.
          type: string
        sessions:
          description: >-
            Sessions visible to the caller and matching the query filters, most
            recently updated first, at most limit (default 100) per page. An
            empty array means nothing matched. Ordinary callers receive a row
            only when access_policy is omitted/null on both it and its root;
            callers with elevated classified-data access can receive classified
            rows. Each row includes current evaluation eligibility and its
            newest immutable evaluation, when any. Rows are summaries:
            agent_snapshot and model_snapshot are omitted and config is an empty
            object; GET /v1/sessions/{session_id} returns them.
          items:
            $ref: '#/components/schemas/ManagedAgentsSessionListItem'
          type: array
      required:
        - sessions
      type: object
      example:
        next_page_token: example
        sessions:
          - access_policy: admin_only
            active_handoff:
              access_expires_at: '2026-02-18T09:30:00.000Z'
              deadline_at: '2026-02-18T09:30:00.000Z'
              handoff_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
              reason: example
              requested_at: '2026-02-18T09:30:00.000Z'
              state: awaiting_user
              wake_cause: example
            agent_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            agent_snapshot:
              key: example
            agent_version_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            computer_use: true
            concurrency_slot_held: true
            config:
              key: example
            created_at: '2026-02-18T09:30:00.000Z'
            credential_refs:
              - credential_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
                vault_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            credential_refs_configured: true
            effective_model: example
            environment_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            evaluation_eligibility:
              eligible: true
              reason: not_root
              snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            execution_state: provisioning
            external_source_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            external_source_type: example
            failure:
              at: '2026-02-18T09:30:00.000Z'
              category: transient
              code: example
              message: example
              phase: example
              retryable: true
            forked_at_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            kind: api_call
            last_activity_at: '2026-02-18T09:30:00.000Z'
            latest_evaluation: null
            metadata:
              key: example
            model_ref_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            model_snapshot:
              key: example
            organization_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            parent_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            root_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            sandbox_instance_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            sandbox_provider: example
            session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            session_path: example
            source_refs:
              key: example
            status: active
            stop_reason: example
            tenant_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            updated_at: '2026-02-18T09:30:00.000Z'
            user_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            vault_ids:
              - example
            wake_at: '2026-02-18T09:30:00.000Z'
    ManagedAgentsApiError:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - analytics
            - analytics_not_ready
            - artifact_fetch_unavailable
            - artifact_generation_mismatch
            - artifact_hash_mismatch
            - artifact_invalid_events
            - artifact_invalid_json
            - artifact_not_allowlisted
            - artifact_size_mismatch
            - atlassian_rate_limited
            - atlassian_unavailable
            - atomic_ingest_timeout
            - auth_unavailable
            - automation_event_source_invalid
            - automation_memory_unavailable
            - automation_reference_invalid
            - automation_runs_unconfigured
            - automations_unconfigured
            - bad_gateway
            - built_in_catalog_unavailable
            - built_in_integrations_disabled
            - built_in_integrations_unconfigured
            - compute_offerings_unavailable
            - conflict
            - content_store_request_canceled
            - content_store_unavailable
            - content_store_upload_timeout
            - credential_encryption_unconfigured
            - delegate_preparation_failed
            - entity_family_not_permitted
            - environment_not_verified
            - evaluation_cancellation_pending
            - evaluation_deletion_pending
            - event_admission_unavailable
            - event_ingress_unavailable
            - event_source_verification_credential_invalid
            - event_sources_unconfigured
            - execution_unconfigured
            - file_quota_exceeded
            - file_storage_unconfigured
            - forbidden
            - gateway_timeout
            - gestalt_unconfigured
            - github_rate_limited
            - github_unavailable
            - handoff_access_invalid
            - handoff_access_unavailable
            - handoff_access_unsupported
            - handoff_capture_unavailable
            - handoff_requires_retest
            - handoff_revoke_unavailable
            - handoff_signal_unavailable
            - idempotency_conflict
            - idempotency_in_progress
            - idempotency_unavailable
            - ingest_policy_changed
            - ingest_policy_not_found
            - ingest_policy_revoked
            - integrations_unconfigured
            - internal_error
            - invalid_json
            - invalid_pull_request_review_result
            - invalid_request
            - invalid_scope
            - invariant_violation
            - launchdarkly_rate_limited
            - launchdarkly_unavailable
            - live_fleet_unconfigured
            - managed_agents_unavailable
            - merge_key_rejected
            - merge_link_unavailable
            - merge_rate_limited
            - merge_unavailable
            - missing_dependency
            - model_gateway_metadata_missing
            - model_gateway_unconfigured
            - model_gateway_unreachable
            - mutation_transaction_budget_exceeded
            - not_found
            - page_token_expired
            - payload_too_large
            - persistence_busy
            - precondition_failed
            - precondition_required
            - provider_registration_unsupported
            - provider_selection_unsupported
            - rate_limit_exceeded
            - rate_limited
            - repository_automation_unconfigured
            - request_too_large
            - reserved_source_type
            - revision_conflict
            - run_log_store_unavailable
            - runner_image_resolution_failed
            - sandbox_provider_disabled
            - service_unavailable
            - session_analyst_busy
            - session_analyst_model_unavailable
            - session_analyst_unconfigured
            - session_start_admission_unavailable
            - session_start_not_admitted
            - setup_fallback_environment_unsafe
            - setup_run_finished
            - setup_run_in_progress
            - setup_run_limit
            - setup_run_not_started
            - setup_runs_unavailable
            - skill_storage_unconfigured
            - slack_channels_rejected
            - slack_channels_unavailable
            - slack_channels_unconfigured
            - slack_connection_malformed
            - slack_event_intake_unavailable
            - slack_installation_mismatch
            - slack_missing_scope
            - slack_rate_limited
            - slack_reapproval_required
            - source_ownership_mismatch
            - source_revision_conflict
            - spanner_unavailable
            - streaming_unsupported
            - submission_transaction_budget_exceeded
            - task_version_number_conflict
            - team_board_unconfigured
            - too_many_streams
            - unauthorized
            - unsupported_media_type
            - vault_creation_retired
            - version_content_conflict
            - webhook_delivery_too_large
            - workspace_boundary_denied
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      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:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      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:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      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:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      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:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsSessionListItem:
      additionalProperties: false
      description: >-
        Public session-list summary extended with current evaluation eligibility
        and newest verdict.
      properties:
        access_policy:
          description: >-
            Explicit access classification. Omitted/null is the ordinary
            behavior. admin_only requires elevated classified-data access and
            the current Admin organization role on public APIs.
            platform_internal is the service's own session over this
            organization's data: it is readable in-organization when addressed
            directly, but list and gestalt views include it only for callers
            with elevated classified-data access.
          enum:
            - admin_only
            - platform_internal
          type: string
        active_handoff:
          $ref: '#/components/schemas/ManagedAgentsActiveHandoff'
          description: >-
            Current browser handoff, including its exclusive driver claim and
            deadline. Absent when no browser handoff is active. Never contains
            the short-lived access URL.
        agent_id:
          description: >-
            Agent this session runs (UUID). Empty for imported sessions that
            were not started from an agent.
          type: string
        agent_snapshot:
          additionalProperties: {}
          description: >-
            The agent version's definition as it stood when the session started,
            frozen so later edits to the agent cannot change this session's
            behavior.
          type: object
        agent_version_id:
          description: >-
            Agent version this session runs (UUID), pinned at start so a later
            edit to the agent cannot change a running session.
          type: string
        computer_use:
          description: >-
            Whether this session has a computer-enabled environment and a
            display that passed its readiness probe.
          type: boolean
        concurrency_slot_held:
          description: >-
            Whether this root session currently occupies the agent's
            max_concurrent_sessions slot. True while admitted and non-terminal.
            False exclusively while an active queued root waits to start.
            Omitted for unlimited agents, child sessions, legacy rows, and
            terminal or deleted sessions.
          type: boolean
        config:
          additionalProperties: {}
          description: >-
            Resolved per-session runtime settings written at start, including
            the snapshotted MCP servers and tool bindings, multi-agent roster,
            and delegation depth limits. Read-only to callers.
          type:
            - object
            - 'null'
        created_at:
          description: RFC 3339 timestamp of when this record was created. Server-assigned.
          format: date-time
          type: string
        credential_refs:
          description: >-
            Explicit allowlist of individual credentials the session may use.
            Read credential_refs_configured to tell an intentionally empty
            allowlist from a legacy session granted whole vaults.
          items:
            $ref: '#/components/schemas/ManagedAgentsVaultCredentialRef'
          type:
            - array
            - 'null'
        credential_refs_configured:
          description: >-
            True when credential_refs is an explicit allowlist. False on legacy
            sessions granted every credential in their vaults, which would
            otherwise be indistinguishable from an empty allowlist.
          type: boolean
        effective_model:
          description: >-
            Provider-qualified model string frozen for this session, including
            any per-session model override. Prefer this over resolving
            model_ref_id or the current agent version when displaying what
            actually ran.
          type: string
        environment_id:
          description: Environment whose sandbox definition this session runs in (UUID).
          type: string
        evaluation_eligibility:
          $ref: '#/components/schemas/ManagedAgentsSessionEligibility'
          description: Current server-owned Evaluate-now decision for this session.
        execution_state:
          description: >-
            Where the agent loop is. Empty for sessions without a loop, such as
            imported rollouts. provisioning normally clears in under a minute
            and is bounded: a sandbox that does not become ready within the
            deployment's compute-ready timeout (five minutes by default) fails
            the session with sandbox_provision_timeout, so a session is never
            stuck here indefinitely. This field, read from the session itself,
            is the authoritative status -- a session's event stream is written
            on a separate path and can lag it, so an empty event list does not
            mean the session is still starting. When a session leaves
            provisioning by failing, failure carries the reason.
          enum:
            - provisioning
            - queued
            - running
            - idle
            - completed
          type: string
        external_source_id:
          description: >-
            Identifier of the session's counterpart in the external_source_type
            system, so a caller can find the session again from that side. Set
            together with external_source_type.
          type: string
        external_source_type:
          description: >-
            Kind of external system this session is correlated to, e.g.
            slack_thread. Set together with external_source_id and filterable
            when listing sessions.
          type: string
        failure:
          $ref: '#/components/schemas/ManagedAgentsSessionFailure'
          description: >-
            Structured terminal failure. Omitted for healthy sessions and legacy
            rows.
        forked_at_event_id:
          description: >-
            Event in the parent session (UUID) this session was forked from, so
            the fork's starting context is identifiable. Set only on forks.
          type: string
        kind:
          description: >-
            What produced the session: api_call, chat, rollout (an imported RL
            rollout), subagent (delegated by another session), benchmark,
            evaluation (a platform-started evaluation run over other session
            snapshots), reflection (a platform-started memory consolidation), or
            session_analyst (a platform-started read-only assistant that answers
            questions about another session tree).
          enum:
            - api_call
            - chat
            - rollout
            - subagent
            - benchmark
            - evaluation
            - reflection
            - session_analyst
          type: string
        last_activity_at:
          description: >-
            RFC 3339 timestamp of when the agent loop last made progress.
            Distinct from updated_at, which any metadata write touches. Absent
            for sessions that run no loop.
          format: date-time
          type: string
        latest_evaluation:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/ManagedAgentsLatestEvaluation'
          description: >-
            Newest immutable evaluation summary, or null when the session has
            none.
        metadata:
          additionalProperties:
            type: string
          description: >-
            Caller-defined string key/value pairs supplied when the session was
            started, e.g. ids from your own system. Immutable, present on root
            sessions only, and filterable with metadata=key:value or
            metadata_key=key on GET /v1/sessions. At most 32 entries; keys use
            letters, digits, '_', '.', and '-' up to 64 characters; values are
            1-512 characters.
          type: object
        model_ref_id:
          description: >-
            Model reference the session's turns run on (UUID), resolved at start
            from the agent version or the start request.
          type: string
        model_snapshot:
          additionalProperties: {}
          description: >-
            The resolved model reference and inference settings as they stood
            when the session started, frozen for the same reason as
            agent_snapshot.
          type: object
        organization_id:
          description: >-
            Organization that owns this record. Resolved from the API key; never
            accepted from the caller.
          type: string
        parent_session_id:
          description: >-
            Session that created this one (UUID) — the delegating session for a
            subagent, or the source session for a fork. Empty on a root session.
          type: string
        root_session_id:
          description: >-
            Root session of the multi-agent tree this session belongs to (UUID).
            Equal to session_id for a root session.
          type: string
        sandbox_instance_id:
          description: >-
            Provider-assigned id of the sandbox instance serving this session.
            Empty before provisioning finishes; historical self_hosted sessions
            may also have no instance id.
          type: string
        sandbox_provider:
          description: >-
            Sandbox runtime that provisioned this session's compute, from the
            supported sandbox providers list.
          type: string
        session_id:
          description: Identifier for this session (UUID). Server-assigned.
          type: string
        session_path:
          description: >-
            Position of this session within its tree, as a slash-delimited path
            of session ids. "/" for a root session.
          type: string
        source_refs:
          additionalProperties: {}
          description: >-
            Secondary provenance ids from the originating system beyond the
            primary external source, e.g. an imported rollout's problem,
            problem-version, and run ids.
          type: object
        status:
          $ref: '#/components/schemas/ManagedAgentsSessionStatus'
          description: >-
            Coarse session state shared with RL rollout imports: active,
            awaiting_human (for a rollout, carries no score), completed, failed,
            or cancelled. For where a running agent loop is, read
            execution_state instead.
        stop_reason:
          description: >-
            Why the loop is not running. Set whenever execution_state is idle or
            completed. sleeping means the agent chose to wait and the session
            resumes on the next message or at wake_at; awaiting_subagents means
            a coordinator is waiting on delegated work.
          type: string
        tenant_id:
          description: >-
            Data-residency tenant the session's content is stored under,
            resolved from the request scope. A child session inherits its
            parent's value.
          type: string
        updated_at:
          description: >-
            RFC 3339 timestamp of the last change to this record.
            Server-assigned.
          format: date-time
          type: string
        user_id:
          description: >-
            User the session was started on behalf of, resolved from the request
            scope. Empty for sessions started by a service credential.
          type: string
        vault_ids:
          description: >-
            Vaults (UUIDs) the session may draw credentials from. Combine with
            credential_refs to narrow the grant to specific credentials.
          items:
            type: string
          type: array
        wake_at:
          description: >-
            RFC 3339 timestamp at which a sleeping session wakes itself if
            nobody messages it first. Absent unless the agent scheduled a timed
            wait.
          format: date-time
          type: string
      required:
        - root_session_id
        - session_path
        - session_id
        - organization_id
        - kind
        - status
        - computer_use
        - credential_refs
        - credential_refs_configured
        - config
        - created_at
        - updated_at
        - evaluation_eligibility
        - latest_evaluation
      type: object
      example:
        access_policy: admin_only
        active_handoff:
          access_expires_at: '2026-02-18T09:30:00.000Z'
          deadline_at: '2026-02-18T09:30:00.000Z'
          handoff_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
          reason: example
          requested_at: '2026-02-18T09:30:00.000Z'
          state: awaiting_user
          wake_cause: example
        agent_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        agent_snapshot:
          key: example
        agent_version_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        computer_use: true
        concurrency_slot_held: true
        config:
          key: example
        created_at: '2026-02-18T09:30:00.000Z'
        credential_refs:
          - credential_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            vault_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        credential_refs_configured: true
        effective_model: example
        environment_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        evaluation_eligibility:
          eligible: true
          reason: not_root
          snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        execution_state: provisioning
        external_source_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        external_source_type: example
        failure:
          at: '2026-02-18T09:30:00.000Z'
          category: transient
          code: example
          message: example
          phase: example
          retryable: true
        forked_at_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        kind: api_call
        last_activity_at: '2026-02-18T09:30:00.000Z'
        latest_evaluation: null
        metadata:
          key: example
        model_ref_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        model_snapshot:
          key: example
        organization_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        parent_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        root_session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        sandbox_instance_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        sandbox_provider: example
        session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        session_path: example
        source_refs:
          key: example
        status: active
        stop_reason: example
        tenant_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        updated_at: '2026-02-18T09:30:00.000Z'
        user_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        vault_ids:
          - example
        wake_at: '2026-02-18T09:30:00.000Z'
    ManagedAgentsActiveHandoff:
      description: >-
        Public, credential-free state of a browser handoff that is awaiting a
        person, currently driven by one, or being resolved back to the agent.
      properties:
        access_expires_at:
          description: >-
            Latest time the current display access remains usable; never later
            than deadline_at.
          format: date-time
          type: string
        deadline_at:
          description: When the handoff automatically expires and the agent resumes.
          format: date-time
          type: string
        handoff_id:
          description: Stable identifier for this browser handoff.
          type: string
        reason:
          description: Why the agent asked a person to take over the shared browser.
          type: string
        requested_at:
          description: When the agent requested the handoff.
          format: date-time
          type: string
        state:
          description: >-
            Whether nobody has opened access yet, one person currently owns the
            display, or hand-back/deadline resolution is being delivered.
          enum:
            - awaiting_user
            - user_driving
            - resolved
          type: string
        wake_cause:
          description: >-
            Resolution cause once resolved: user_handed_back, deadline_elapsed,
            cancelled, or interrupted.
          type: string
      required:
        - handoff_id
        - reason
        - requested_at
        - deadline_at
        - state
      type: object
      example:
        access_expires_at: '2026-02-18T09:30:00.000Z'
        deadline_at: '2026-02-18T09:30:00.000Z'
        handoff_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        reason: example
        requested_at: '2026-02-18T09:30:00.000Z'
        state: awaiting_user
        wake_cause: example
    ManagedAgentsVaultCredentialRef:
      description: >-
        A pointer to one credential inside one vault. Used to grant a session
        specific credentials rather than every credential in a vault.
      properties:
        credential_id:
          description: Credential to select inside vault_id.
          type: string
        vault_id:
          description: >-
            Vault holding the credential. Required, because credential ids are
            unique only within a vault.
          type: string
      required:
        - vault_id
        - credential_id
      type: object
      example:
        credential_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        vault_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
    ManagedAgentsSessionEligibility:
      additionalProperties: false
      description: >-
        Current domain-owned Evaluate-now decision and immutable transcript
        snapshot boundary for one session.
      properties:
        eligible:
          description: Whether this session may be selected for Evaluate now.
          type: boolean
        reason:
          description: >-
            Stable reason the session is currently ineligible; omitted when
            eligible.
          enum:
            - not_root
            - non_public_access
            - missing_agent_attribution
            - unsupported_kind
            - no_snapshot_event
          type: string
        snapshot_event_id:
          description: >-
            Newest durable canonical UUID event boundary frozen if evaluation
            starts now.
          format: uuid
          type: string
      required:
        - eligible
      type: object
      example:
        eligible: true
        reason: not_root
        snapshot_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
    ManagedAgentsSessionFailure:
      description: >-
        Structured, sanitized reason a session terminated abnormally. Present on
        a session only after a terminal failure; healthy and legacy sessions
        omit it.
      properties:
        at:
          description: Time the terminal failure was persisted.
          format: date-time
          type: string
        category:
          description: >-
            Who can act on this failure: transient (wait or retry), caller_error
            (change the request or configuration, retrying as-is will not help),
            or internal (report it). retryable=false with category=caller_error
            is a fixable mistake, not an outage. A retryable failure is never
            caller_error: if the platform will retry, changing the request is
            not the fix.
          enum:
            - transient
            - caller_error
            - internal
          type: string
        code:
          description: Stable machine-readable failure code.
          type: string
        message:
          description: >-
            Sanitized bounded operator-facing message; never contains raw
            provider response bodies or credentials.
          type: string
        phase:
          description: >-
            Lifecycle phase that failed, such as provisioning, setup, workflow,
            or model.
          type: string
        retryable:
          description: >-
            Whether the platform will retry, or a retry of the same request may
            succeed on its own. False does not mean permanently broken -- read
            category to tell a transient condition from a request the caller
            must change.
          type: boolean
      required:
        - phase
        - code
        - message
        - retryable
        - category
        - at
      type: object
      example:
        at: '2026-02-18T09:30:00.000Z'
        category: transient
        code: example
        message: example
        phase: example
        retryable: true
    ManagedAgentsLatestEvaluation:
      additionalProperties: false
      description: Compact newest immutable evaluation projected onto a session-list row.
      properties:
        created_at:
          description: UTC timestamp when the newest evaluation was recorded.
          format: date-time
          type: string
        evaluation_id:
          description: Stable identity of the newest immutable evaluation for this session.
          format: uuid
          type: string
        result:
          description: Overall pass, fail, or not-applicable verdict.
          enum:
            - pass
            - fail
            - not_applicable
          type: string
      required:
        - evaluation_id
        - result
        - created_at
      type: object
      example:
        created_at: '2026-02-18T09:30:00.000Z'
        evaluation_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        result: pass
    ManagedAgentsSessionStatus:
      description: Coarse session state shared by Managed Agents and imported RL rollouts.
      enum:
        - active
        - awaiting_human
        - completed
        - failed
        - cancelled
      type: string
      example: active
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````