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

# Snapshot every root session created in a window

> Returns a compact projection of every live root session the caller may see that was created at or after since (at most 30 days ago), newest first, read at one instant. Rows carry only identity, agent, state, and timestamps; the response is meant to be drawn whole -- one tile per session -- and then kept current with streamSessionGestalt from as_of, not re-read. Served from a covering index, so its latency is a range scan of the window. Windows with more than 5000 roots are truncated to the newest 5000 and say so.



## OpenAPI

````yaml /managed-agents/openapi.yaml get /managed-agents/v1/sessions/gestalt
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/gestalt:
    get:
      tags:
        - Sessions
      summary: Snapshot every root session created in a window
      description: >-
        Returns a compact projection of every live root session the caller may
        see that was created at or after since (at most 30 days ago), newest
        first, read at one instant. Rows carry only identity, agent, state, and
        timestamps; the response is meant to be drawn whole -- one tile per
        session -- and then kept current with streamSessionGestalt from as_of,
        not re-read. Served from a covering index, so its latency is a range
        scan of the window. Windows with more than 5000 roots are truncated to
        the newest 5000 and say so.
      operationId: managedAgentsListSessionGestalt
      parameters:
        - description: >-
            Limit the snapshot to one agent in the caller workspace, before
            truncation.
          in: query
          name: agent_id
          schema:
            description: >-
              Limit the snapshot to one agent in the caller workspace, before
              truncation.
            type: string
        - description: >-
            RFC 3339 start of the window; sessions created at or after it are
            included. At most 30 days ago globally, or 400 days with agent_id.
          in: query
          name: since
          required: true
          schema:
            description: >-
              RFC 3339 start of the window; sessions created at or after it are
              included. At most 30 days ago globally, or 400 days with agent_id.
            format: date-time
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsSessionGestaltResponse'
          description: >-
            Response body of GET /v1/sessions/gestalt: a compact snapshot of
            every root session an organization created in a window, read at one
            instant. Designed to be drawn whole -- one tile per session -- and
            kept current by streamSessionGestalt rather than re-read.
        '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:
    ManagedAgentsSessionGestaltResponse:
      description: >-
        Response body of GET /v1/sessions/gestalt: a compact snapshot of every
        root session an organization created in a window, read at one instant.
        Designed to be drawn whole -- one tile per session -- and kept current
        by streamSessionGestalt rather than re-read.
      properties:
        as_of:
          description: >-
            Read timestamp of this snapshot. Pass it as after to
            streamSessionGestalt to receive every change since.
          format: date-time
          type: string
        sessions:
          description: >-
            Every live root session created at or after since that the caller
            may see, newest first. Rows the caller's access policy does not
            permit are omitted silently.
          items:
            $ref: '#/components/schemas/ManagedAgentsGestaltSessionRow'
          type:
            - array
            - 'null'
        truncated:
          description: >-
            True when the window held more than 5000 root sessions and only the
            newest 5000 are listed.
          type: boolean
      required:
        - as_of
        - sessions
      type: object
      example:
        as_of: '2026-02-18T09:30:00.000Z'
        sessions:
          - agent_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            created_at: '2026-02-18T09:30:00.000Z'
            deleted: true
            execution_state: provisioning
            failed: true
            last_activity_at: '2026-02-18T09:30:00.000Z'
            session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            status: active
            updated_at: '2026-02-18T09:30:00.000Z'
        truncated: true
    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
            - 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_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
            - live_fleet_unconfigured
            - managed_agents_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.
    ManagedAgentsGestaltSessionRow:
      description: >-
        One root session as the sessions gestalt projects it: identity, agent,
        state, and timestamps. Read the session itself for anything else.
      properties:
        agent_id:
          description: >-
            Agent the session runs (UUID). Absent for imported sessions that
            have none.
          type: string
        created_at:
          description: >-
            RFC 3339 timestamp the session was created at; the gestalt is
            ordered by it, newest first.
          format: date-time
          type: string
        deleted:
          description: >-
            True on a change-feed row for a session that was deleted since the
            previous read. Never set on a snapshot row.
          type: boolean
        execution_state:
          description: >-
            Where the agent loop is, as on the session resource. Absent for
            sessions without a loop.
          enum:
            - provisioning
            - queued
            - running
            - idle
            - completed
          type: string
        failed:
          description: >-
            True when the session carries a terminal failure; GET
            /v1/sessions/{session_id} has the details.
          type: boolean
        last_activity_at:
          description: >-
            RFC 3339 timestamp the agent loop last made progress. Absent for
            sessions that run no loop.
          format: date-time
          type: string
        session_id:
          description: Session id (UUID) of the root session.
          type: string
        status:
          description: Coarse session state, as on the session resource.
          enum:
            - active
            - awaiting_human
            - completed
            - failed
            - cancelled
          type: string
        updated_at:
          description: RFC 3339 timestamp of the row's last change.
          format: date-time
          type: string
      required:
        - session_id
        - status
        - created_at
        - updated_at
      type: object
      example:
        agent_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        created_at: '2026-02-18T09:30:00.000Z'
        deleted: true
        execution_state: provisioning
        failed: true
        last_activity_at: '2026-02-18T09:30:00.000Z'
        session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        status: active
        updated_at: '2026-02-18T09:30:00.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````