{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scale-ai/json-schema/scale-ai-agentex-cloud-build-submit-request-schema.json",
  "title": "AgentexCloudBuildSubmitRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scale-ai-agentex-cloud-build-api-openapi.yml#/components/schemas/AgentexCloudBuildSubmitRequest",
  "properties": {
    "context_archive": {
      "type": "string",
      "title": "Context Archive",
      "description": "tar.gz archive containing the build context (Dockerfile and any files needed for the build)",
      "format": "binary"
    },
    "image_name": {
      "type": "string",
      "title": "Image Name",
      "description": "Name for the built image"
    },
    "agent_name": {
      "title": "Agent Name",
      "description": "Name of the brand-new agent to create from this build",
      "type": "string"
    },
    "agent_id": {
      "title": "Agent Id",
      "description": "ID of the existing agent this build targets",
      "type": "string"
    },
    "image_tag": {
      "type": "string",
      "title": "Image Tag",
      "description": "Tag for the built image",
      "default": "latest"
    },
    "build_args": {
      "title": "Build Args",
      "description": "JSON string of build arguments",
      "type": "string"
    },
    "platform": {
      "title": "Platform",
      "description": "Target platform for the Docker build. Defaults to the build host's native architecture when not specified.",
      "type": "string",
      "enum": [
        "linux/amd64",
        "linux/arm64",
        "linux/arm/v7"
      ]
    },
    "source_repo": {
      "title": "Source Repo",
      "description": "Normalized git remote the build context came from.",
      "type": "string",
      "maxLength": 2048
    },
    "source_commit": {
      "title": "Source Commit",
      "description": "Git commit the build context was at.",
      "type": "string",
      "maxLength": 64,
      "pattern": "^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$"
    },
    "source_ref": {
      "title": "Source Ref",
      "description": "Git branch or tag for source_commit.",
      "type": "string",
      "maxLength": 4096
    },
    "source_subpath": {
      "title": "Source Subpath",
      "description": "Build-context path relative to the repo root.",
      "type": "string",
      "maxLength": 4096
    },
    "working_tree_hash": {
      "title": "Working Tree Hash",
      "description": "Deterministic SHA-256 content hash of the build inputs.",
      "type": "string",
      "maxLength": 64,
      "pattern": "^[0-9a-fA-F]{64}$"
    },
    "source_dirty": {
      "title": "Source Dirty",
      "description": "Whether the work tree had uncommitted changes at build time.",
      "type": "boolean"
    }
  },
  "type": "object",
  "required": [
    "context_archive",
    "image_name"
  ]
}