Runloop Scenario API

The Scenario API from Runloop — 17 operation(s) for scenario.

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-devbox-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-execution-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-snapshot-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-tunnel-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-launch-parameters-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-structure/runloop-devbox-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-blueprint-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-benchmark-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-benchmark-run-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-scenario-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-agent-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-axon-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-object-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-secret-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-network-policy-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-gateway-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-mcp-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-api-key-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-restricted-key-schema.json

Other Resources

OpenAPI Specification

runloop-ai-scenario-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Runloop agents Scenario API
  version: '0.1'
  description: Register, version, and mount Agents — packaged agent definitions sourced from Git, npm, pip, or storage objects that can be installed on Devboxes for fast, reproducible agent execution.
  contact:
    name: Runloop AI Support
    url: https://runloop.ai
    email: support@runloop.ai
servers:
- url: https://api.runloop.ai
  description: Runloop API
  variables: {}
security:
- bearerAuth: []
tags:
- name: Scenario
paths:
  /v1/scenarios:
    post:
      tags:
      - Scenario
      summary: Create a Scenario.
      description: Create a Scenario, a repeatable AI coding evaluation test that defines the starting environment as well as evaluation success criteria.
      operationId: createScenario
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioCreateParameters'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
      deprecated: false
    get:
      tags:
      - Scenario
      summary: List Scenarios.
      description: List all Scenarios matching filter.
      operationId: listScenarios
      parameters:
      - name: name
        in: query
        description: Query for Scenarios with a given name.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: benchmark_id
        in: query
        description: Filter scenarios by benchmark ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: validation_type
        in: query
        description: Filter by validation type
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionListView'
      deprecated: false
  /v1/scenarios/list_public:
    get:
      tags:
      - Scenario
      summary: List Public Scenarios.
      description: List all public scenarios matching filter.
      operationId: listPublicScenarios
      parameters:
      - name: name
        in: query
        description: Query for Scenarios with a given name.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionListView'
      deprecated: false
  /v1/scenarios/metadata/keys:
    get:
      tags:
      - Scenario
      summary: List available scenario metadata keys.
      description: Returns a list of all available metadata keys that can be used for filtering scenarios.
      operationId: getScenarioMetadataKeys
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataKeysView'
      deprecated: false
  /v1/scenarios/metadata/keys/{key}/values:
    get:
      tags:
      - Scenario
      summary: List values for a specific scenario metadata key.
      description: Returns a list of all values that exist for a specific metadata key across all scenarios.
      operationId: getScenarioMetadataValues
      parameters:
      - name: key
        in: path
        description: The metadata key to get values for.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataValuesView'
        '400':
          description: Invalid metadata key provided.
      deprecated: false
  /v1/scenarios/runs:
    get:
      tags:
      - Scenario
      summary: List ScenarioRuns.
      description: List all ScenarioRuns matching filter.
      operationId: listScenarioRuns
      parameters:
      - name: name
        in: query
        description: Filter by name
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: state
        in: query
        description: Filter by state
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: benchmark_run_id
        in: query
        description: Filter by benchmark run ID
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: scenario_id
        in: query
        description: Filter runs associated to Scenario given ID
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunListView'
      deprecated: false
  /v1/scenarios/runs/{id}:
    get:
      tags:
      - Scenario
      summary: Get a previously created ScenarioRun.
      description: Get a ScenarioRun given ID.
      operationId: getScenarioRun
      parameters:
      - name: id
        in: path
        description: The ScenarioRun ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/runs/{id}/cancel:
    post:
      tags:
      - Scenario
      summary: Cancel a Scenario run.
      description: Cancel a currently running Scenario run. This will shutdown the underlying Devbox resource.
      operationId: cancelScenarioRun
      parameters:
      - name: id
        in: path
        description: The Scenario Run ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/runs/{id}/complete:
    post:
      tags:
      - Scenario
      summary: Complete a ScenarioRun.
      description: Complete a currently running ScenarioRun. Calling complete will shutdown underlying Devbox resource.
      operationId: completeScenarioRun
      parameters:
      - name: id
        in: path
        description: The ScenarioRun ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/runs/{id}/download_logs:
    post:
      tags:
      - Scenario
      summary: Download logs for a Scenario run.
      description: Download a zip file containing all logs for a Scenario run from the associated devbox.
      operationId: downloadScenarioRunLogs
      parameters:
      - name: id
        in: path
        description: The ScenarioRun ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/zip:
              schema:
                format: binary
          headers:
            Content-Type:
              description: application/zip
              required: true
              schema:
                type: string
            Content-Disposition:
              description: attachment; filename="scenario_run_logs.zip"
              required: true
              schema:
                type: string
      deprecated: false
  /v1/scenarios/runs/{id}/score:
    post:
      tags:
      - Scenario
      summary: Score a ScenarioRun.
      description: Score a currently running ScenarioRun.
      operationId: scoreScenarioRun
      parameters:
      - name: id
        in: path
        description: The ScenarioRun ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/scorers:
    post:
      tags:
      - Scenario
      summary: Create a custom scenario scorer.
      description: Create a custom scenario scorer.
      operationId: createCustomScorer
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomScorerParams'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScorerView'
        '400':
          description: Custom scorer type already exists.
      deprecated: false
    get:
      tags:
      - Scenario
      summary: List Scenario Scorers.
      description: List all Scenario Scorers matching filter.
      operationId: listScenarioScorers
      parameters:
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScorersListView'
      deprecated: false
  /v1/scenarios/scorers/{id}:
    post:
      tags:
      - Scenario
      summary: Update a custom scenario scorer.
      description: Update a scenario scorer.
      operationId: updateCustomScorer
      parameters:
      - name: id
        in: path
        description: The Scorer ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomScorerParams'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScorerView'
      deprecated: false
    get:
      tags:
      - Scenario
      summary: Retrieve Scenario Scorer.
      description: Retrieve Scenario Scorer.
      operationId: retrieveScenarioScorers
      parameters:
      - name: id
        in: path
        description: The Scorer ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScorerView'
      deprecated: false
  /v1/scenarios/start_run:
    post:
      tags:
      - Scenario
      summary: Start a new ScenarioRun.
      description: Start a new ScenarioRun based on the provided Scenario.
      operationId: startScenarioRun
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartScenarioRunParameters'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/{id}:
    post:
      tags:
      - Scenario
      summary: Update a Scenario.
      description: Update a Scenario. Fields that are null will preserve the existing value. Fields that are provided (including empty values) will replace the existing value entirely.
      operationId: updateScenario
      parameters:
      - name: id
        in: path
        description: The Scenario ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioUpdateParameters'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
      deprecated: false
    get:
      tags:
      - Scenario
      summary: Get a Scenario.
      description: Get a previously created scenario.
      operationId: getScenario
      parameters:
      - name: id
        in: path
        description: The Scenario ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
      deprecated: false
  /v1/scenarios/{id}/archive:
    post:
      tags:
      - Scenario
      summary: Archive a Scenario.
      description: Archive a previously created Scenario. The scenario will no longer appear in list endpoints but can still be retrieved by ID.
      operationId: archiveScenario
      parameters:
      - name: id
        in: path
        description: The ID of the Scenario to archive.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
        '403':
          description: Cannot archive public scenarios.
        '404':
          description: Scenario not found.
      deprecated: false
  /v1/scenarios/{id}/runs:
    get:
      tags:
      - Scenario
      summary: Get the runs for a Scenario.
      description: Get a previously created scenario.
      operationId: getScenarioRuns
      parameters:
      - name: id
        in: path
        description: The Scenario ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
      deprecated: false
  /v1/scenarios/{id}/unarchive:
    post:
      tags:
      - Scenario
      summary: Unarchive a Scenario.
      description: Unarchive a previously archived Scenario. The scenario will appear in list endpoints again.
      operationId: unarchiveScenario
      parameters:
      - name: id
        in: path
        description: The ID of the Scenario to unarchive.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
        '403':
          description: Cannot unarchive public scenarios.
        '404':
          description: Scenario not found.
      deprecated: false
components:
  schemas:
    TestBasedScoringFunction:
      type: object
      additionalProperties: false
      description: TestBasedScoringFunction writes test files to disk and executes a test command to verify the solution.
      properties:
        test_files:
          type: array
          items:
            $ref: '#/components/schemas/TestFile'
          description: List of test files to create
        test_command:
          type: string
          description: The command to execute for running the tests
        type:
          type: string
          enum:
          - test_based_scorer
          default: test_based_scorer
      required:
      - type
    ScoringFunctionResultView:
      type: object
      additionalProperties: false
      description: A ScoringFunctionResultView represents the result of running a single scoring function on a given input context.
      properties:
        score:
          type: number
          format: float
          description: Final score for the given scoring function.
        scoring_function_name:
          type: string
          description: Scoring function name that ran.
        output:
          type: string
          description: Log output of the scoring function.
        state:
          $ref: '#/components/schemas/ScoringFunctionResultViewState'
          description: The state of the scoring function application.
      required:
      - score
      - scoring_function_name
      - output
      - state
    PythonScriptScoringFunction:
      type: object
      additionalProperties: false
      description: PythonScriptScoringFunction will run a python script in the context of your environment as a ScoringFunction.
      properties:
        requirements_contents:
          type: string
          nullable: true
          description: Package dependencies to be installed. The requirements should be a valid requirements.txt file.
        python_script:
          type: string
          description: Python script to be run. The script should output the score to standard out as a float between 0.0 and 1.0.
        python_version_constraint:
          type: string
          nullable: true
          description: Python version  to run scoring. Default is "==3.12.10"
        type:
          type: string
          enum:
          - python_script_scorer
          default: python_script_scorer
      required:
      - python_script
      - type
    BrokerMountProtocol:
      type: string
      enum:
      - acp
      - claude_json
    ScenarioCreateParameters:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          description: Name of the scenario.
        input_context:
          $ref: '#/components/schemas/InputContext'
          description: The input context for the Scenario.
        scoring_contract:
          $ref: '#/components/schemas/ScoringContract'
          description: The scoring contract for the Scenario.
        environment_parameters:
          $ref: '#/components/schemas/ScenarioEnvironment'
          nullable: true
          description: The Environment in which the Scenario will run.
        metadata:
          type: object
          additionalProperties:
            type: string
          nullable: true
          description: User defined metadata to attach to the scenario for organization.
        reference_output:
          type: string
          nullable: true
          description: A string representation of the reference output to solve the scenario. Commonly can be the result of a git diff or a sequence of command actions to apply to the environment.
        required_environment_variables:
          type: array
          items:
            type: string
          nullable: true
          description: Environment variables required to run the scenario. If these variables are not provided, the scenario will fail to start.
        required_secret_names:
          type: array
          items:
            type: string
          nullable: true
          description: Secrets required to run the scenario (user secret name to scenario required secret name). If these secrets are not provided or the mapping is incorrect, the scenario will fail to start.
        validation_type:
          $ref: '#/components/schemas/ValidationType'
          nullable: true
          description: Validation strategy.
        scorer_timeout_sec:
          type: integer
          format: int32
          nullable: true
          description: Timeout for scoring in seconds. Default 30 minutes (1800s).
      required:
      - name
      - input_context
      - scoring_contract
    CommandScoringFunction:
      type: object
      additionalProperties: false
      description: CommandScoringFunction executes a single command and checks the result.The output of the command will be printed. Scoring will passed if the command returns status code 0, otherwise it will be failed.
      properties:
        command:
          type: string
          description: The command to execute.
        type:
          type: string
          enum:
          - command_scorer
          default: command_scorer
      required:
      - type
    ValidationType:
      type: string
      enum:
      - UNSPECIFIED
      - FORWARD
      - REVERSE
      - EVALUATION
    ScenarioUpdateParameters:
      type: object
      additionalProperties: false
      description: ScenarioUpdateParameters contain the set of parameters to update a Scenario. All fields are optional - null fields preserve existing values, provided fields replace entirely.
      properties:
        name:
          type: string
          nullable: true
          description: Name of the scenario. Cannot be blank.
        input_context:
          $ref: '#/components/schemas/InputContextUpdate'
          nullable: true
          description: The input context for the Scenario.
        scoring_contract:
          $ref: '#/components/schemas/ScoringContractUpdate'
          nullable: true
          description: The scoring contract for the Scenario.
        environment_parameters:
          $ref: '#/components/schemas/ScenarioEnvironment'
          nullable: true
          description: The Environment in which the Scenario will run.
        metadata:
          type: object
          additionalProperties:
            type: string
          nullable: true
          description: User defined metadata to attach to the scenario. Pass in empty map to clear.
        required_environment_variables:
          type: array
          items:
            type: string
          nullable: true
          description: Environment variables required to run the scenario. Pass in empty list to clear.
        required_secret_names:
          type: array
          items:
            type: string
          nullable: true
          description: Secrets required to run the scenario. Pass in empty list to clear.
        reference_output:
          type: string
          nullable: true
          description: A string representation of the reference output to solve the scenario. Commonly can be the result of a git diff or a sequence of command actions to apply to the environment. Pass in empty string to clear.
        validation_type:
          $ref: '#/components/schemas/ValidationType'
          nullable: true
          description: Validation strategy. Pass in empty string to clear.
        scorer_timeout_sec:
          type: integer
          format: int32
          nullable: true
          description: Timeout for scoring in seconds. Default 30 minutes (1800s).
    IdleConfigurationParameters:
      type: object
      additionalProperties: false
      properties:
        idle_time_seconds:
          type: integer
          format: int32
          description: After idle_time_seconds, on_idle action will be taken.
        on_idle:
          $ref: '#/components/schemas/IdleAction'
          description: Action to take after Devbox becomes idle.
      required:
      - idle_time_seconds
      - on_idle
    LaunchParameters:
      type: object
      additionalProperties: false
      description: LaunchParameters enable you to customize the resources available to your Devbox as well as the environment set up that should be completed before the Devbox is marked as 'running'.
      properties:
        launch_commands:
          type: array
          items:
            type: string
          nullable: true
          description: Set of commands to be run at launch time, before the entrypoint process is run.
        resource_size_request:
          $ref: '#/components/schemas/ResourceSize'
          nullable: true
          description: 'Preset Devbox resources (vCPU, RAM in GiB, ephemeral disk in GiB). If not set, SMALL is used. X_SMALL: 0.5 vCPU, 1 GiB RAM, 4 GiB disk. SMALL: 1 vCPU, 2 GiB RAM, 4 GiB disk. MEDIUM: 2 vCPU, 4 GiB RAM, 8 GiB disk. LARGE: 2 vCPU, 8 GiB RAM, 16 GiB disk. X_LARGE: 4 vCPU, 16 GiB RAM, 16 GiB disk. XX_LARGE: 8 vCPU, 32 GiB RAM, 16 GiB disk. CUSTOM_SIZE: set custom_cpu_cores, custom_gb_memory, and optionally custom_disk_size.'
        available_ports:
          type: array
          items:
            type: integer
            format: int32
          nullable: true
          description: '[Deprecated] A list of ports to make available on the Devbox. This field is ignored.'
        keep_alive_time_seconds:
          type: integer
          format: int64
          nullable: true
          description: Time in seconds after which Devbox will automatically shutdown. Default is 1 hour. Maximum is 48 hours (172800 seconds).
        after_idle:
          $ref: '#/components/schemas/IdleConfigurationParameters'
          nullable: true
          description: Configure Devbox lifecycle based on idle activity. If after_idle is set, Devbox will ignore keep_alive_time_seconds. If both after_idle and lifecycle.after_idle are set, they must have the same value. Use lifecycle.after_idle instead.
        custom_cpu_cores:
          type: integer
          format: int32
          nullable: true
          description: Custom CPU cores. Must be 0.5, 1, or a multiple of 2. Max is 16.
        custom_gb_memory:
          type: integer
          format: int32
          nullable: true
          description: Custom memory size in GiB. Must be 1 or a multiple of 2. Max is 64GiB.
        custom_disk_size:
          type: integer
          format: int32
          nullable: true
          description: Custom disk size in GiB. Must be a multiple of 2. Min is 2GiB, max is 64GiB.
        architecture:
          $ref: '#/components/schemas/Architecture'
          nullable: true
          description: The target architecture for the Devbox. If unset, defaults to x86_64.
        user_parameters:
          $ref: '#/components/schemas/UserParameters'
          nullable: true
          description: Specify the user for execution on Devbox. If not set, default `user` will be used.
        required_services:
          type: array
          items:
            type: string
          nullable: true
          description: A list of ContainerizedService names to be started when a Devbox is created. A valid ContainerizedService must be specified in Blueprint to be started.
        network_policy_id:
          type: string
          nullable: true
          description: (Optional) ID of the network policy to apply to Devboxes launched with these parameters. When set on a Blueprint launch parameters, Devboxes created from it will inherit this policy unless explicitly overridden.
        lifecycle:
          $ref: '#/components/schemas/LifecycleConfigurationParameters'
          nullable: true
          description: Lifecycle configuration for idle and resume behavior. Configure idle policy via lifecycle.after_idle (if both this and the top-level after_idle are set, they must match) and resume triggers via lifecycle.resume_triggers.
    RunProfile:
      type: object
      additionalProperties: false
      properties:
        purpose:
          type: string
          nullable: true
          description: Purpose of the run.
        envVars:
          type: object
          additionalProperties:
            type: string
          nullable: true
          description: 'Mapping of Environment Variable to Value. May be shown in devbox logging. Example: {"DB_PASS": "DATABASE_PASSWORD"} would set the envir

# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/openapi/runloop-ai-scenario-api-openapi.yml