> ## 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 a session's outcomes and grading history

> Returns the session's outcomes and their grading history, so a caller can see what "done" was defined as and how each attempt was scored.



## OpenAPI

````yaml /managed-agents/openapi.yaml get /managed-agents/v1/sessions/{session_id}/outcomes
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/{session_id}/outcomes:
    get:
      tags:
        - Sessions
      summary: List a session's outcomes and grading history
      description: >-
        Returns the session's outcomes and their grading history, so a caller
        can see what "done" was defined as and how each attempt was scored.
      operationId: managedAgentsListSessionOutcomes
      parameters:
        - description: Session id (UUID) as returned by startSession or listSessions.
          in: path
          name: session_id
          required: true
          schema:
            description: Session id (UUID) as returned by startSession or listSessions.
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsOutcomeListResponse'
          description: >-
            Response body of GET /v1/sessions/{session_id}/outcomes. An outcome
            is the structured verdict a grader or the agent itself writes for a
            session; a session may accumulate more than one, so this is a list
            rather than a single object.
        '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/ManagedAgentsApiError'
        '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:
    ManagedAgentsOutcomeListResponse:
      description: >-
        Response body of GET /v1/sessions/{session_id}/outcomes. An outcome is
        the structured verdict a grader or the agent itself writes for a
        session; a session may accumulate more than one, so this is a list
        rather than a single object.
      properties:
        outcomes:
          description: >-
            Outcomes recorded against the session named in the path. Null rather
            than an empty array when none has been recorded, which is the normal
            state for a session that is still running.
          items:
            $ref: '#/components/schemas/ManagedAgentsOutcome'
          type:
            - array
            - 'null'
      required:
        - outcomes
      type: object
      example:
        outcomes:
          - agent_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            created_at: '2026-02-18T09:30:00.000Z'
            defined_by_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            description: example
            ended_at: '2026-02-18T09:30:00.000Z'
            evaluations:
              - agent_version_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
                cache_read_tokens: 1
                cache_write_tokens: 1
                cost_micros: 1
                criteria:
                  - criterion_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
                    criterion_text: example
                    evidence_event_ids:
                      - example
                    rationale: example
                    section: example
                    verdict: example
                    weight: 1.5
                end_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
                ended_at: '2026-02-18T09:30:00.000Z'
                explanation: example
                grader_model_ref_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
                grader_thread_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
                input_tokens: 1
                iteration: 1
                outcome_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
                output_tokens: 1
                result: satisfied
                start_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
                started_at: '2026-02-18T09:30:00.000Z'
            grader_model_ref_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            max_iterations: 1
            organization_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            outcome_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            rubric: example
            rubric_ref: example
            rubric_sha256: example
            session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            status: pending
            terminal_result: satisfied
            updated_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
            - 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.
    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.
    ManagedAgentsOutcome:
      description: >-
        A session's definition of done: the task to achieve plus a rubric a
        grader scores the work against, tracked through its own grading
        lifecycle. Defined when the session starts, and read back to see whether
        the work was accepted.
      properties:
        agent_id:
          description: >-
            Agent this outcome belongs to (UUID), copied from the session that
            defined it.
          type: string
        created_at:
          description: RFC 3339 timestamp of when this record was created. Server-assigned.
          format: date-time
          type: string
        defined_by_event_id:
          description: Event in the session's log that defined this outcome (UUID).
          type: string
        description:
          description: >-
            Objective the agent works toward, in prose, and the statement of it
            quoted to the grader. Opens the session when the start request
            carries no message.
          type: string
        ended_at:
          description: >-
            RFC 3339 timestamp of when grading reached a terminal result. Absent
            while the outcome is still open.
          format: date-time
          type: string
        evaluations:
          description: >-
            Grader passes in order, newest last. Returned only by reads that ask
            for evaluations, and empty until a grader has run.
          items:
            $ref: '#/components/schemas/ManagedAgentsOutcomeEvaluation'
          type: array
        grader_model_ref_id:
          description: >-
            Model reference the grader runs on (UUID), letting grading use a
            different model than the agent doing the work. Defaults to the
            session's model.
          type: string
        max_iterations:
          description: >-
            Ceiling on grader passes before the outcome ends as
            max_iterations_reached. Zero means unbounded, which is the default:
            the loop runs until the grader is satisfied.
          format: int64
          type: integer
        organization_id:
          description: >-
            Organization that owns this record. Resolved from the API key; never
            accepted from the caller.
          type: string
        outcome_id:
          description: Identifier for this outcome (UUID). Server-assigned.
          type: string
        rubric:
          description: >-
            Markdown rubric the grader scores the work against. Write
            independently checkable criteria; vague criteria produce noisy
            revision loops.
          type: string
        rubric_ref:
          description: >-
            Where the rubric text came from when it was not sent inline:
            file:<file_id> for a rubric read from a file when the outcome was
            defined. rubric always carries the text; later changes to the file
            do not move the bar.
          type: string
        rubric_sha256:
          description: >-
            Lowercase SHA-256 digest of the uploaded file the rubric was read
            from, for matching it to the file. Not a digest of rubric: the
            recorded text is the file's minus a byte-order mark and with line
            endings normalized.
          type: string
        session_id:
          description: Session this outcome belongs to (UUID).
          type: string
        status:
          description: >-
            Where the outcome is in its grading lifecycle: pending (no grader
            has looked at it), running (the agent is working toward it),
            evaluating (a grader pass is in flight), or terminal (grading
            finished; read terminal_result).
          enum:
            - pending
            - running
            - evaluating
            - terminal
          type: string
        terminal_result:
          description: >-
            Final verdict, set only once status is terminal: satisfied,
            max_iterations_reached, failed, or interrupted. Empty before then.
          enum:
            - satisfied
            - max_iterations_reached
            - failed
            - interrupted
          type: string
        updated_at:
          description: >-
            RFC 3339 timestamp of the last change to this record.
            Server-assigned.
          format: date-time
          type: string
      required:
        - organization_id
        - session_id
        - outcome_id
        - description
        - rubric
        - max_iterations
        - status
        - created_at
        - updated_at
      type: object
      example:
        agent_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        created_at: '2026-02-18T09:30:00.000Z'
        defined_by_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        description: example
        ended_at: '2026-02-18T09:30:00.000Z'
        evaluations:
          - agent_version_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            cache_read_tokens: 1
            cache_write_tokens: 1
            cost_micros: 1
            criteria:
              - criterion_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
                criterion_text: example
                evidence_event_ids:
                  - example
                rationale: example
                section: example
                verdict: example
                weight: 1.5
            end_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            ended_at: '2026-02-18T09:30:00.000Z'
            explanation: example
            grader_model_ref_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            grader_thread_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            input_tokens: 1
            iteration: 1
            outcome_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            output_tokens: 1
            result: satisfied
            start_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            started_at: '2026-02-18T09:30:00.000Z'
        grader_model_ref_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        max_iterations: 1
        organization_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        outcome_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        rubric: example
        rubric_ref: example
        rubric_sha256: example
        session_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        status: pending
        terminal_result: satisfied
        updated_at: '2026-02-18T09:30:00.000Z'
    ManagedAgentsOutcomeEvaluation:
      description: >-
        One grader pass over the work, with its verdict, its per-criterion
        scoring, and what it cost. A caller sees these in an outcome's
        evaluations list, one per revision round.
      properties:
        agent_version_id:
          description: >-
            Agent version whose work this pass judged (UUID), denormalized onto
            the criteria so cross-session criterion history is served by an
            index.
          type: string
        cache_read_tokens:
          description: >-
            Prompt tokens served from the provider's cache for this unit of
            work.
          format: int64
          type: integer
        cache_write_tokens:
          description: Prompt tokens written to the provider's cache for this unit of work.
          format: int64
          type: integer
        cost_micros:
          description: >-
            Accrued cost in micro-USD (1,000,000 = 1 USD). Integer to avoid
            float rounding across many small charges.
          format: int64
          type: integer
        criteria:
          description: >-
            Per-criterion verdicts this pass produced, in rubric order. Empty
            when the grader returned only an overall result.
          items:
            $ref: '#/components/schemas/ManagedAgentsOutcomeCriterion'
          type: array
        end_event_id:
          description: >-
            Event on the graded session's own transcript that recorded this
            pass's verdict. Locates where the pass landed.
          type: string
        ended_at:
          description: >-
            RFC 3339 timestamp of when this grader pass finished. Absent while
            the pass is still in flight.
          format: date-time
          type: string
        explanation:
          description: >-
            Grader's message to the agent. For needs_revision this is the
            per-criterion gap list the next turn has to close.
          type: string
        grader_model_ref_id:
          description: Model reference the grader actually ran on for this pass (UUID).
          type: string
        grader_thread_id:
          description: >-
            Thread the grader ran in (UUID), so its own reasoning can be read
            back separately from the agent's transcript.
          type: string
        input_tokens:
          description: Prompt tokens billed for this unit of work.
          format: int64
          type: integer
        iteration:
          description: >-
            0-indexed pass number: 0 is the first evaluation, 1 the
            re-evaluation after the first revision.
          format: int64
          type: integer
        outcome_id:
          description: Outcome this evaluation belongs to (UUID).
          type: string
        output_tokens:
          description: Completion tokens billed for this unit of work.
          format: int64
          type: integer
        result:
          description: >-
            Verdict of this pass. needs_revision is the only non-terminal value
            and sends the agent back for another turn; the rest end the outcome.
          enum:
            - satisfied
            - needs_revision
            - max_iterations_reached
            - failed
            - interrupted
          type: string
        start_event_id:
          description: >-
            First event of the grader thread for this pass, which is the packet
            the harness handed it. Locates where the pass began.
          type: string
        started_at:
          description: RFC 3339 timestamp of when this grader pass began.
          format: date-time
          type: string
      required:
        - outcome_id
        - iteration
        - result
      type: object
      example:
        agent_version_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        cache_read_tokens: 1
        cache_write_tokens: 1
        cost_micros: 1
        criteria:
          - criterion_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            criterion_text: example
            evidence_event_ids:
              - example
            rationale: example
            section: example
            verdict: example
            weight: 1.5
        end_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        ended_at: '2026-02-18T09:30:00.000Z'
        explanation: example
        grader_model_ref_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        grader_thread_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        input_tokens: 1
        iteration: 1
        outcome_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        output_tokens: 1
        result: satisfied
        start_event_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        started_at: '2026-02-18T09:30:00.000Z'
    ManagedAgentsOutcomeCriterion:
      description: >-
        One scored line of a rubric: the criterion, the grader's verdict on it,
        and the events cited as evidence. Read these to see why an outcome
        passed or failed rather than only that it did.
      properties:
        criterion_id:
          description: >-
            Identifies a criterion as its rubric's digest plus its ordinal, so
            the same rubric reused across sessions scores comparable criteria.
            Any edit to the rubric changes every id in it.
          type: string
        criterion_text:
          description: The rubric line this verdict scores, as written in the rubric.
          type: string
        evidence_event_ids:
          description: >-
            Session events (UUIDs) the grader cites as justification, so a
            reviewer can check the verdict against the transcript instead of
            trusting it.
          items:
            type: string
          type: array
        rationale:
          description: Grader's reasoning for the verdict on this criterion.
          type: string
        section:
          description: >-
            Rubric heading this criterion sits under, when the rubric is
            organized into sections.
          type: string
        verdict:
          description: >-
            Grader's judgment on this criterion, conventionally pass, fail, or
            not_applicable when the criterion did not apply to this run. Not a
            closed set: the value is recorded as the grader wrote it.
          type: string
        weight:
          description: >-
            Relative importance the rubric gives this criterion when aggregating
            a score.
          format: double
          type: number
      required:
        - criterion_id
        - criterion_text
        - weight
        - verdict
      type: object
      example:
        criterion_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        criterion_text: example
        evidence_event_ids:
          - example
        rationale: example
        section: example
        verdict: example
        weight: 1.5
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````