{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetai-com/json-schema/fleetai-com-job-create-request-payload-schema.json",
  "title": "JobCreateRequestPayload",
  "description": "Request body for creating a job via the API.\n\nMatches the JobParams TypedDict used by Temporal workflows.\nExactly one of env_key, project_key, task_keys, or task_group_id must be provided.",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fleetai-com-openapi.yml#/components/schemas/JobCreateRequestPayload",
  "properties": {
    "name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "models": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "minItems": 1,
      "title": "Models"
    },
    "pass_k": {
      "type": "integer",
      "minimum": 1.0,
      "title": "Pass K",
      "default": 1
    },
    "cluster_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100,
          "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cluster Name",
      "description": "Fleet-only exact cluster placement for every environment in this job. Omission preserves normal routing."
    },
    "environment_overrides": {
      "anyOf": [
        {
          "additionalProperties": {
            "$ref": "#/$defs/JobEnvironmentOverride"
          },
          "type": "object",
          "maxProperties": 100,
          "minProperties": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Environment Overrides",
      "description": "Fleet-only runtime settings keyed by unversioned environment key. Requires an explicit fleet-dev-*, fleet-sandbox-*, or fleet-prod-* cluster; task versions and seeds stay pinned."
    },
    "unrestricted_tools_reason": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000,
          "minLength": 10
        },
        {
          "type": "null"
        }
      ],
      "title": "Unrestricted Tools Reason",
      "description": "Admin-only diagnostic override of task tool policies; reason and exact versions are recorded with the run."
    },
    "scoring_mode": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "binary",
            "partial"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Scoring Mode",
      "description": "How each verifier scores its own checks. 'binary' requests strict 0/1 grading; 'partial' allows partial credit when the verifier supports it. Omitted (the default) means the job states no preference: the mode is not forwarded to the verifier at all, and each verifier keeps its own grading. Only set this when the verifiers being run are known to accept a scoring_mode argument."
    },
    "multi_app_aggregation_mode": {
      "type": "string",
      "enum": [
        "binary",
        "fractional"
      ],
      "title": "Multi App Aggregation Mode",
      "description": "How a generated multi-app verifier combines its per-app scores. 'binary' returns 1 only when every app receives a full score; 'fractional' returns the arithmetic mean of the individual app verifier scores.",
      "default": "fractional"
    },
    "agent_runtime": {
      "type": "boolean",
      "title": "Agent Runtime",
      "description": "Run supported sessions on the hosted Agent Runtime instead of executing the agent harness inside the Temporal worker. When omitted, compatible Fleet-hosted models default to true except Gemini models, which default to the Temporal harness. This is resolved per model in mixed-model jobs. BYOK, full-conversation verification, and local jobs also stay on the Temporal harness. An explicit true or false applies to every model in the job.",
      "default": true
    },
    "browser_harness_computer": {
      "type": "boolean",
      "title": "Browser Harness Computer",
      "description": "With browser_harness=true, also expose the task computer tool. Native CLI tools remain disabled.",
      "default": false
    },
    "browser_harness": {
      "type": "boolean",
      "title": "Browser Harness",
      "description": "Computer-use on Agent Runtime with Grok Build, Codex, Claude Code, or Antigravity: expose a single browser-harness Python tool using the task browser CDP endpoint. Native CLI tools remain disabled. Other MCP tools are disabled, except computer when browser_harness_computer is also enabled.",
      "default": false
    },
    "native_workspace": {
      "type": "boolean",
      "title": "Native Workspace",
      "description": "Opt-in Codex native Bash in the bound approved Cyber workspace. cyber-safety@2 selects cyber-native@1; cyber-safety@3 selects cyber-native@2; explicit native versions are preserved. Requires an approved cluster and ctf_only Cyber workspace tasks. Existing task definitions remain unchanged.",
      "default": false
    },
    "tools": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "enum": [
              "subagents",
              "web_search",
              "bash",
              "filesystem",
              "skills",
              "planning",
              "image",
              "browser",
              "computer_use",
              "apps",
              "plugins",
              "goals"
            ]
          },
          "type": "array",
          "maxItems": 12
        },
        {
          "type": "null"
        }
      ],
      "title": "Tools",
      "description": "Optional native CLI capability whitelist for agent_runtime=true. Omit, pass null, or pass [] to disable native CLI tools; Fleet MCP servers remain available. A nonempty list explicitly enables the supported capabilities. Antigravity never enables native bash. Computer-use sessions never enable native shell tools. OpenCode tool-use and computer-use evals always disable native CLI tools, including explicit whitelists. Grok harnesses support only an empty whitelist."
    },
    "env_key": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Env Key"
    },
    "project_key": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Key"
    },
    "task_keys": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array",
          "minItems": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Keys"
    },
    "task_group_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Group Id",
      "description": "Task group UUID selector. Runs exactly the group's pinned eval_task_version_id members instead of resolving a task key's current version."
    },
    "project_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Id",
      "description": "Project ID (UUID) to associate with this job for tracking and analytics"
    },
    "excluded_task_keys": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Excluded Task Keys"
    },
    "max_steps": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Steps",
      "description": "Maximum steps (tool calls) per session. If omitted, defaults to 500."
    },
    "max_duration_minutes": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Duration Minutes",
      "description": "Deprecated: prefer max_steps as the session budget. Still ENFORCED (contrary to earlier docs): a hard wall clock measured from the session's original start that also caps each activity timeout and provisions matching lease time for external harnesses, so a session stops mid-turn when it expires. Defaults to 2880 minutes; set it explicitly only as a runaway backstop.",
      "deprecated": true
    },
    "max_concurrent_per_model": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Concurrent Per Model",
      "description": "Deprecated: Concurrency is now controlled at the Temporal worker level. This field is ignored for new jobs.",
      "deprecated": true
    },
    "mode": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(tool-use|computer-use)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Mode"
    },
    "parallel_tool_calls": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Parallel Tool Calls",
      "description": "Optional OpenAI tool-call batching override. Set false to force one tool call per model turn, which is useful for stateful computer-use flows that must observe each action before planning the next. Omit to preserve the provider/model default. Agent Runtime supports only false because some Codex transports force serialization. Hardening profiles also force false even when a native-loop job explicitly requests true."
    },
    "codex_runtime": {
      "anyOf": [
        {
          "$ref": "#/$defs/CodexRuntimeConfig"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional Codex app-server controls. Applies to OpenAI models run through Agent Runtime or the explicit Codex harness. Omit every field to preserve the installed Codex/model defaults."
    },
    "antigravity_runtime": {
      "anyOf": [
        {
          "$ref": "#/$defs/AntigravityRuntimeConfig"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional Antigravity controls for Google Gemini models run through Agent Runtime. Omit every field to preserve standard Gemini processing."
    },
    "browser_tool_surface": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "default",
            "dom",
            "full"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Browser Tool Surface",
      "description": "For mode='computer-use' browser sessions, selects the model-facing browser surface: default=computer/screenshot only, dom=DOM tools only, full=computer plus DOM. Prefer this over browser aliases in job_type so analytics job_type can remain meaningful."
    },
    "flagging_policy": {
      "anyOf": [
        {
          "$ref": "#/$defs/FlaggingPolicy"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional native environment flagging policy. When omitted, job creation and environment startup are unchanged. When provided, the orchestrator passes a deterministic policy envelope to flagging-capable envs."
    },
    "task_flagging_policies": {
      "anyOf": [
        {
          "additionalProperties": {
            "$ref": "#/$defs/FlaggingPolicy"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Flagging Policies",
      "description": "Optional per-task flagging policy overrides keyed by task key. Each matched task receives its override in the job's generated task_specs. Overrides take precedence over the job-level flagging_policy for matched tasks."
    },
    "reasoning_effort": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(none|minimal|low|medium|high|xhigh|max)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reasoning Effort",
      "description": "Reasoning effort for reasoning-capable models (OpenAI, xAI grok, Z.AI GLM, native Gemini 3, and native Claude). Supported values depend on the model: gpt-6-astra accepts {low,medium,high,xhigh,max}; gpt-5.6-sol (alias gpt-5.6) accepts {none,low,medium,high,xhigh,max} in native Temporal; Agent Runtime Codex does not accept none. New Jobs API evals default Astra, Sol, Claude Opus 5, Sonnet 5, and Fable 5.1 (including its claude-fable-5.1 alias) to xhigh unless an explicit effort is provided, for both native Temporal and Agent Runtime. Direct Agent Runtime calls are unchanged. Per-model defaults are persisted in model_reasoning_efforts in the job input; other models in a mixed job retain their existing defaults. gpt-5.5/5.4/5.2 accept {none,low,medium,high,xhigh}; gpt-5.4-pro and gpt-5.2-pro accept {medium,high,xhigh}; gpt-5.3-codex/gpt-5.2-codex accept {low,medium,high,xhigh}; gpt-5.1 accepts {none,low,medium,high}; gpt-5 accepts {minimal,low,medium,high}; gpt-5-pro only supports {high}; o-series accepts {low,medium,high}; grok-4.7 and grok-4.6 accept {low,medium,high,xhigh}; grok-4.5 accepts {low,medium,high,xhigh} but xAI treats xhigh as high; grok-4.3 accepts {none,low,medium,high}; glm-5.2 accepts {none,minimal,low,medium,high,xhigh,max}; glm-5.3 accepts {low,high,max}. Native Gemini 3 maps the value to thinking_level (none/minimal->MINIMAL, low->LOW, medium->MEDIUM, high/xhigh/max->HIGH). Native Claude maps the value to adaptive thinking output_config.effort where supported. If the value is unsupported by a specific model the harness falls back to that model's documented default; otherwise when omitted, native gpt-5* models that support xhigh default to xhigh, gpt-5-pro defaults to high, and older gpt-5* models fall back to medium, while Claude adaptive thinking models default to max where supported; non-reasoning models (incl. non-native Gemini such as 2.5) ignore it."
    },
    "turn_budget_tokens": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 20000.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Turn Budget Tokens",
      "description": "Per-turn advisory token budget (Anthropic Task Budgets beta) that steers task-budget-capable Claude models (Opus 5, Fable 5, Mythos 5, Opus 4.8, Opus 4.7) to finish each response before the max_tokens hard cap. Advisory (soft) and reset every request; silently ignored on other models/providers. Minimum 20,000."
    },
    "context_management": {
      "anyOf": [
        {
          "$ref": "#/$defs/ContextManagementConfig"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional per-run context management. It defaults on for Meta-only computer-use jobs and off otherwise; set enabled=false to opt out. Provider-specific implementations bound old screenshots or tool results. Direct Meta filesystem spill is a separate opt-in."
    },
    "max_screenshot_history": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Screenshot History",
      "description": "Keep only this many most-recent screenshots in each model request for computer-use sessions, replacing older screenshot image blocks with a short text placeholder so long sessions do not exhaust the model context window. The persisted session transcript stays full (pruning is per-API-call only). Omit for the current behavior of sending the full screenshot history."
    },
    "compaction_threshold_tokens": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Compaction Threshold Tokens",
      "description": "Opt-in in-loop context compaction for computer-use sessions. When the last model call's input tokens exceed this threshold, the session summarizes its work so far with its own model and the model-facing context resets to [system prompt, original task prompt + auto-summary, latest screenshot]. The persisted transcript keeps the full history plus the compaction message. Composes with max_screenshot_history (pruning caps steady-state growth; compaction handles resets). Omit to disable."
    },
    "adaptive_resolution": {
      "anyOf": [
        {
          "$ref": "#/$defs/AdaptiveResolutionConfig"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional model-facing screenshot resolution for computer-use browser sessions. The browser viewport remains native; screenshots are resized to this width/height and coordinates are scaled back to native pixels. Required for meta/spiffy_blimp350 computer-use jobs on Agent Runtime; omitting it or passing null returns HTTP 422. DOM-only Spiffy browser sessions must omit it or pass null. Mobile sessions accept the required value without desktop scaling."
    },
    "tool_selection_mode": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(none|similarity|environment)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tool Selection Mode",
      "description": "Optional MCP tool-selection strategy for tool-use sessions. 'none' exposes the full tool list, 'similarity' starts with the tool-selection helper and retrieves a top-k tool subset, and 'environment' defers selection to the environment."
    },
    "tool_selection_top_k": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Tool Selection Top K",
      "description": "Top-k MCP tools to retrieve when tool_selection_mode is 'similarity'. If omitted, the session workflow default is used."
    },
    "system_prompt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "System Prompt"
    },
    "model_prompts": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Prompts"
    },
    "model_tool_formats": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Tool Formats",
      "description": "Tool format per model (e.g., {'x-ai/grok-4': 'openai', 'qwen/qwen3-vl-8b-thinking': 'qwen'}). Only x-ai and qwen models allowed. Values: 'default' (passthrough — tools sent as discovered, in OpenAI shape), 'openai' (simplified), or 'qwen' (qwen-agent ComputerUse schema, 0-1000 normalized coords). 'claude' is accepted as a legacy alias for 'default'."
    },
    "model_qwen_cua_profiles": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string",
            "const": "qwen3-cua-v1"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Qwen Cua Profiles",
      "description": "Opt-in Qwen computer-use serving contract per exact model id. Omitted models retain the historical Qwen schema and dispatcher."
    },
    "model_spiffy_cua_profiles": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string",
            "const": "spiffy-normalized-v1"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Spiffy Cua Profiles",
      "description": "Deprecated compatibility field. Spiffy desktop computer-use jobs automatically use normalized coordinates.",
      "deprecated": true
    },
    "model_agent_runtime_spiffy_cua_profiles": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string",
            "const": "spiffy-normalized-v1"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Agent Runtime Spiffy Cua Profiles",
      "description": "Deprecated compatibility field. Spiffy Agent Runtime desktop computer-use jobs automatically use normalized coordinates.",
      "deprecated": true
    },
    "ci": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ci"
    },
    "task_version_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Version Id"
    },
    "cost_team_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cost Team Id",
      "description": "Optional team UUID used for keyring/rate-limit tenant routing. Defaults to the owning team's configured payer (normally the job team_id) when omitted. Bad UUIDs return HTTP 422; the team must also be on the cost_team_id allowlist (teams.cost_team_billing_enabled = true) or the request returns 403."
    },
    "cost_team_id_pinned": {
      "type": "boolean",
      "title": "Cost Team Id Pinned",
      "description": "Set when cost_team_id is a deliberate, human-configured billing choice rather than a default the caller happened to compute. A pinned cost_team_id is used verbatim and is NEVER remapped through the operator's COST_TEAM_DEFAULT_OVERRIDES table, even when it names the job's own owning team. Without this flag, asking to bill your own team is indistinguishable from omitting cost_team_id, so the operator default silently reroutes the spend to a different payer and the configured choice is lost. Ignored when cost_team_id is omitted. The cross-team membership and cost_team_billing_enabled gates still apply.",
      "default": false
    },
    "sales_product_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Sales Product Id",
      "description": "Sales product UUID for internal cost allocation. It is propagated to every session and emitted with workload cost events; it does not change job ownership or customer billing."
    },
    "sales_product_key": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Sales Product Key",
      "description": "Human-readable active sales product key. The API resolves it to the canonical sales_product_id before creating the job."
    },
    "require_sales_product": {
      "type": "boolean",
      "title": "Require Sales Product",
      "description": "Optional caller-side tightening of the server policy. When true, omitting both sales_product_id and sales_product_key returns the same structured error as server-enforced attribution. It cannot relax server enforcement.",
      "default": false
    },
    "required_key_capabilities": {
      "items": {
        "type": "string",
        "const": "cyber"
      },
      "type": "array",
      "title": "Required Key Capabilities",
      "description": "Fleet/admin-only key capabilities required for model key selection. Leave empty for default keys."
    },
    "created_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created By",
      "description": "ADMIN-ONLY override for the job's created_by (submitter) user. Defaults to the authenticated principal. Used by service callers (e.g. the cross-session meta-investigator job loop) to stamp jobs with the human/principal who submitted the parent run, so the per-user pending-approval gate is scoped per submitter instead of collapsing every run onto the shared service key. Non-admin callers passing this get HTTP 403; bad UUIDs return HTTP 422."
    },
    "approval_exempt": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Approval Exempt",
      "description": "ADMIN-ONLY. When true, the job bypasses the cost-approval gate entirely (like local/byok jobs): it is never blocked by another pending job and never itself parked in awaiting_approval. For internal, already-authorized service fan-outs (the cross-session meta-investigator job loop launches one child job per task) where the per-user pending-approval gate would otherwise serialize the whole fan-out through a single approval slot. Non-admin callers passing this get HTTP 403."
    },
    "byok_keys": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Byok Keys",
      "description": "Map of provider names to API keys for BYOK (e.g., {'openai': 'sk-...'})"
    },
    "byok_ttl_minutes": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Byok Ttl Minutes",
      "description": "TTL in minutes for BYOK key validity (defaults to 60 minutes)"
    },
    "harness": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Harness",
      "description": "Opt into a special session harness ('codex', 'grok', 'grok-bot', 'claude_code', 'muse', 'antigravity', or 'opencode') for every model in the job. Explicit only: when omitted, every model runs through the native harness. The selected harness is pre-validated against each requested model. To mix harnesses within one job (e.g. an external harness for one model and the native loop for another), use `model_harnesses` instead."
    },
    "model_harnesses": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ModelHarnessAssignment"
          },
          "type": "array",
          "minItems": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Harnesses",
      "description": "Explicit (model, harness) run assignments, for jobs that mix harnesses across models — e.g. one model on an external harness and another on the native loop in a single job. Model and harness are paired explicitly rather than inferred from one another. When set, this supersedes the job-level `harness` for fan-out: each assignment runs `pass_k` attempts of its model under its harness (null harness = native loop). Assignments and `models` must cover the same set of models — every model in `models` is assigned exactly once — and each non-null harness is pre-validated against its model. A model may take at most one harness per job (sessions are keyed by (task, model, attempt)); to run one model under several harnesses, use separate jobs."
    },
    "codex": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Codex",
      "description": "Codex app-server runner overrides when harness='codex' (for example mcp_auth, initial_navigate, final_answer_json). Executable paths and SDK locations are configured by the worker runtime."
    },
    "grok": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Grok",
      "description": "Grok Build runner overrides when harness='grok' (for example mcp_auth, timeout_seconds). timeout_seconds narrows the job's max_duration_minutes budget and its matching environment lease. disabled_tools maps MCP server name to tool names hidden from the agent; applied only when mode='computer-use'. Executable paths and credentials are configured by the worker runtime."
    },
    "claude_code": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Claude Code",
      "description": "Claude Code runner overrides when harness='claude_code' (for example mcp_auth, timeout_seconds, allowed_tools, disallowed_tools). Executable paths and credentials are configured by the worker runtime."
    },
    "scripted_network_probe": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "positive",
            "negative",
            "fubspot_login_positive",
            "fubspot_login_negative"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Scripted Network Probe",
      "description": "Staging-only, exact-version synthetic network diagnostic. Requires harness='scripted_network_probe'; actions are fixed server-side."
    },
    "enable_bug_report": {
      "type": "boolean",
      "title": "Enable Bug Report",
      "description": "Enable the report_environment_bug tool and include instructions in the system prompt",
      "default": false
    },
    "enable_final_answer_tool": {
      "type": "boolean",
      "title": "Enable Final Answer Tool",
      "description": "Enable the submit_final_answer tool (default: True). Set to false to remove the tool from the agent's toolset.",
      "default": true
    },
    "pass_conversation_to_verifier": {
      "type": "boolean",
      "title": "Pass Conversation To Verifier",
      "description": "Pass the full conversation history in JSON serialized format to the verifier, under parameter 'conversation' for verification",
      "default": false
    },
    "disable_live_mcp_recovery": {
      "type": "boolean",
      "title": "Disable Live Mcp Recovery",
      "description": "Disable the one-time live MCP environment reprovisioning fallback after persistent transport failure. Use this when a run must retain one immutable environment/evidence provenance chain.",
      "default": false
    },
    "post_summarization_setting": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(first_session_per_task|first_failure_per_task|all)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Post Summarization Setting",
      "description": "Summarization mode: 'first_session_per_task' summarizes the first session for each task, 'first_failure_per_task' summarizes the first failure for each task, 'all' summarizes every session"
    },
    "xsa_on_completion": {
      "type": "boolean",
      "title": "Xsa On Completion",
      "description": "Register the job for one cross-session analysis pipeline after it reaches completed state. The same request can be registered later with POST /v1/jobs/{job_id}/xsa-on-completion.",
      "default": false
    },
    "keep_instance_alive": {
      "type": "boolean",
      "title": "Keep Instance Alive",
      "description": "If True, do not close the instance after the session completes. Useful for debugging or manual investigation.",
      "default": false
    },
    "local": {
      "type": "boolean",
      "title": "Local",
      "description": "Local tracking mode: creates job record only, skips task loading and workflow execution",
      "default": false
    },
    "job_type": {
      "anyOf": [
        {
          "$ref": "#/$defs/JobType"
        },
        {
          "type": "string",
          "enum": [
            "default",
            "dom",
            "full"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Job Type",
      "description": "Job type for filtering and analytics. Defaults to 'manual' if not specified, or 'ci' if ci=True. For mode='computer-use', the legacy public-only values 'default', 'dom', and 'full' select the browser tool surface: default=computer/screenshot only, dom=DOM tools only, full=computer plus DOM. Prefer browser_tool_surface for new callers. These aliases are stored as job_type='manual'."
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata",
      "description": "Arbitrary metadata to store in the job's input JSON (e.g., github_commit_url, run_id)"
    },
    "capture_db_diff": {
      "type": "boolean",
      "title": "Capture Db Diff",
      "description": "Capture database diff after each session for reproducible verifier re-runs.",
      "default": false
    },
    "consumer_psi_startup_state_receipt": {
      "type": "boolean",
      "title": "Consumer Psi Startup State Receipt",
      "description": "Consumer PSI only: capture the healthy post-startup database boundary and provide it to an explicitly compatible verifier. Requires capture_db_diff=true.",
      "default": false
    },
    "enable_step_checkpoints": {
      "type": "boolean",
      "title": "Enable Step Checkpoints",
      "description": "Deprecated and disabled. New jobs cannot enable step checkpoints.",
      "default": false,
      "deprecated": true
    },
    "local_image": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Local Image",
      "description": "Local Docker image to run (e.g., 'my-image:tag'). When provided, data_key/env_key become optional and the container runs locally."
    },
    "local_task": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Local Task",
      "description": "Full task dict with prompt, verifier, env_variables, etc. Used with local_image to run without database task loading. Required fields: 'prompt'. Optional: 'verifier' (dict with 'code' field), 'env_variables', 'output_json_schema'. Mutually exclusive with local_tasks."
    },
    "local_tasks": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Local Tasks",
      "description": "List of task dicts for running multiple tasks with local_image. Each task requires 'prompt'. Optional per task: 'key' (auto-generated if missing), 'verifier', 'env_variables', 'output_json_schema'. Mutually exclusive with local_task."
    },
    "mcp_port": {
      "type": "integer",
      "title": "Mcp Port",
      "description": "MCP server port inside the container for local_image mode.",
      "default": 3003
    },
    "local_mcp_expected_tool_count": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Local Mcp Expected Tool Count",
      "description": "Wait up to 60 seconds for exactly this many MCP tools in local_image mode. Task tool policies additionally require matching pinned names and raw schemas."
    },
    "seed_database": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Seed Database",
      "description": "Path to a local SQLite database file to mount into the container at /alloc/data/current.sqlite. Used with local_image for local testing with real data."
    },
    "skill_bundle_ids": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Skill Bundle Ids",
      "description": "List of skill bundle UUIDs to load for this job"
    },
    "memory_bundle_ids": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Memory Bundle Ids",
      "description": "List of memory bundle UUIDs to load for this job"
    },
    "memory": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Memory",
      "description": "Memory strategy version (e.g., 'openclaw-v1')"
    },
    "skills_root": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Skills Root",
      "description": "Parallel list of filesystem roots (absolute paths inside the running env pod) for runner-fs skills — `skills_root[i]` is the path for `task_keys[i]`. Length must equal `len(task_keys)`. Each entry is a directory containing `<skill_name>/SKILL.md` subfolders. Takes precedence over per-task SKILLS_ROOT env var."
    },
    "memory_root": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Memory Root",
      "description": "Parallel list of filesystem roots (absolute paths inside the running env pod) for runner-fs memory — `memory_root[i]` is the path for `task_keys[i]`. Length must equal `len(task_keys)`. Each entry is a directory containing MEMORY.md plus `memory/*.md` daily notes. Takes precedence over per-task MEMORY_ROOT env var."
    }
  },
  "type": "object",
  "required": [
    "models"
  ],
  "$defs": {
    "AdaptiveResolutionConfig": {
      "properties": {
        "width_px": {
          "type": "integer",
          "maximum": 8192.0,
          "exclusiveMinimum": 0.0,
          "title": "Width Px",
          "description": "Width in pixels for model-facing screenshot observations."
        },
        "height_px": {
          "type": "integer",
          "maximum": 8192.0,
          "exclusiveMinimum": 0.0,
          "title": "Height Px",
          "description": "Height in pixels for model-facing screenshot observations."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "width_px",
        "height_px"
      ],
      "title": "AdaptiveResolutionConfig",
      "description": "Model-facing screenshot resolution for computer-use browser sessions."
    },
    "AntigravityRuntimeConfig": {
      "properties": {
        "service_tier": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "default",
                "flex"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Service Tier",
          "description": "Gemini processing tier for Agent Runtime Antigravity turns. Set flex for lower token prices with variable latency and occasional resource unavailability; omit or set default for standard processing."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "AntigravityRuntimeConfig",
      "description": "Per-job Antigravity controls for Gemini API requests."
    },
    "CodexRuntimeConfig": {
      "properties": {
        "service_tier": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "default",
                "flex"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Service Tier",
          "description": "OpenAI Responses processing tier for Agent Runtime Codex turns. Orchestrator Jobs API launches default to flex when this field is omitted; set default to opt back into standard processing. Flex lowers token cost in exchange for slower responses and occasional resource unavailability."
        },
        "code_mode_enabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Code Mode Enabled",
          "description": "Override Codex's features.code_mode.enabled setting."
        },
        "direct_only_tool_namespaces": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array",
              "maxItems": 64
            },
            {
              "type": "null"
            }
          ],
          "title": "Direct Only Tool Namespaces",
          "description": "Tool namespaces that remain top-level direct calls instead of being exposed through Codex code mode (for example mcp__fleet_environment)."
        },
        "excluded_tool_namespaces": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array",
              "maxItems": 64
            },
            {
              "type": "null"
            }
          ],
          "title": "Excluded Tool Namespaces",
          "description": "Tool namespaces omitted from Codex code-mode guidance and nested executor exposure."
        },
        "auto_compact_token_limit": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Auto Compact Token Limit",
          "description": "Token threshold that triggers Codex history compaction."
        },
        "auto_compact_token_limit_scope": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "total",
                "body_after_prefix"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Auto Compact Token Limit Scope",
          "description": "Token accounting scope for the auto-compaction threshold."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "CodexRuntimeConfig",
      "description": "Per-job Codex app-server configuration shared by both harness paths."
    },
    "ContextManagementConfig": {
      "properties": {
        "enabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Enabled",
          "description": "Override context management for this run. Omit or set null to enable it for computer-use and disable it otherwise; set false to opt out."
        },
        "strategy": {
          "type": "string",
          "enum": [
            "auto",
            "client_eviction"
          ],
          "title": "Strategy",
          "description": "Which mechanism to use. 'auto' (default): each provider uses its best native server-side option where it has one (Anthropic clear_tool_uses, GPT-5.5/5.6 compaction) and client-side screenshot eviction otherwise. 'client_eviction': force client-side screenshot eviction — for native OpenAI compaction this also turns OFF resumable mode (the full, evicted history is sent each turn, trading resumable's token savings for eviction). No effect on Anthropic (clear_tool_uses is already eviction) or providers that only have the client-side path.",
          "default": "auto"
        },
        "trigger_tool_uses": {
          "type": "integer",
          "maximum": 500.0,
          "minimum": 1.0,
          "title": "Trigger Tool Uses",
          "description": "Clear once this many tool-results (~= screenshots) have accumulated. On Sonnet runs the effective window is automatically clamped below Sonnet's 100-image-per-request cap; Opus/Fable use the value as-is.",
          "default": 60
        },
        "keep_tool_uses": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Keep Tool Uses",
          "description": "Retain this many most-recent tool-result pairs after a clear.",
          "default": 20
        },
        "tool_output_spill": {
          "type": "boolean",
          "title": "Tool Output Spill",
          "description": "For direct Meta models, preserve large tool outputs on the runner filesystem. Requires a surfaced bash tool and runner filesystem.",
          "default": false
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "ContextManagementConfig",
      "description": "Per-run context management for computer-use rollouts (provider-agnostic).\n\nBounds accumulated screenshots in long computer-use runs, mapped to the best\nmechanism per provider: Anthropic server-side clear_tool_uses, OpenAI native\ncompaction, client-side screenshot eviction (Gemini, non-resumable GPT,\nQwen), or client compaction for direct Meta models.\n``keep_tool_uses`` doubles as \"keep last N screenshots\" on client-side paths.\nSee ``strategy`` to override the native OpenAI default."
    },
    "FlaggingPolicy": {
      "properties": {
        "version": {
          "type": "integer",
          "const": 1,
          "title": "Version",
          "default": 1
        },
        "mode": {
          "type": "string",
          "enum": [
            "required",
            "best_effort"
          ],
          "title": "Mode",
          "default": "required"
        },
        "env_key": {
          "type": "string",
          "maxLength": 80,
          "minLength": 1,
          "title": "Env Key"
        },
        "rules": {
          "items": {
            "$ref": "#/$defs/FlaggingPolicyRule"
          },
          "type": "array",
          "maxItems": 20,
          "minItems": 1,
          "title": "Rules"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "env_key",
        "rules"
      ],
      "title": "FlaggingPolicy",
      "description": "Optional feature-flagging policy for environments with native support."
    },
    "FlaggingPolicyBehavior": {
      "type": "string",
      "enum": [
        "disabled",
        "hidden"
      ],
      "title": "FlaggingPolicyBehavior"
    },
    "FlaggingPolicyRule": {
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 120,
          "minLength": 1,
          "title": "Id"
        },
        "target": {
          "type": "string",
          "maxLength": 160,
          "minLength": 1,
          "title": "Target"
        },
        "behavior": {
          "$ref": "#/$defs/FlaggingPolicyBehavior",
          "default": "hidden"
        },
        "surfaces": {
          "items": {
            "$ref": "#/$defs/FlaggingPolicySurface"
          },
          "type": "array",
          "maxItems": 3,
          "minItems": 1,
          "title": "Surfaces"
        },
        "message": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 300
            },
            {
              "type": "null"
            }
          ],
          "title": "Message"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "target"
      ],
      "title": "FlaggingPolicyRule",
      "description": "One deterministic env flagging rule passed to a native env runtime."
    },
    "FlaggingPolicySurface": {
      "type": "string",
      "enum": [
        "ui",
        "api",
        "mcp"
      ],
      "title": "FlaggingPolicySurface"
    },
    "JobEnvironmentOverride": {
      "properties": {
        "image_url": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[^\\s@]+@sha256:[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Image Url",
          "description": "Immutable image to run in place of the task's environment release."
        },
        "review_environment_version_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Review Environment Version Id",
          "description": "Exact Environment release that human reviewers should recreate this instance from, such as the unguarded parent of a guarded eval image. Recorded only; it never changes what this instance runs."
        },
        "env_variables": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "maxProperties": 100,
          "title": "Env Variables"
        },
        "ttl_seconds": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 604800.0,
              "minimum": 60.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Ttl Seconds",
          "description": "Initial bounded instance lifetime, including certificate validity. Set to cover the experiment; normal session cleanup still applies."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "JobEnvironmentOverride",
      "description": "Per-job runtime settings; never writes to the selected task version."
    },
    "JobType": {
      "type": "string",
      "enum": [
        "canary",
        "ci",
        "local",
        "manual",
        "evaluation",
        "project-auto",
        "pre-qa"
      ],
      "title": "JobType",
      "description": "Job type classification for filtering and analytics."
    },
    "ModelHarnessAssignment": {
      "properties": {
        "model": {
          "type": "string",
          "title": "Model",
          "description": "Model id in 'provider/model' form, also present in `models`."
        },
        "harness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Harness",
          "description": "Registered harness name for this model's sessions, or null for the native loop. Pre-validated for compatibility with `model`."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "model"
      ],
      "title": "ModelHarnessAssignment",
      "description": "One (model, harness) run assignment for a mixed-harness job.\n\nPairs one requested model with its single harness assignment.\n`harness=None` means the native loop."
    }
  }
}