{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getorquesta-com/json-schema/getorquesta-com-workstream-input-schema.json",
  "title": "WorkstreamInput",
  "description": "camelCase spellings (workingDirectory, systemPrompt, autoMerge, agentTokenId, runOnMicroVm, cliPreference) and `cli` are accepted too.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getorquesta-com-openapi.json#/components/schemas/WorkstreamInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100,
      "description": "Unique per agent."
    },
    "kind": {
      "type": "string",
      "enum": [
        "code",
        "analysis",
        "action"
      ],
      "default": "code"
    },
    "branch": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200
    },
    "working_directory": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 500
    },
    "system_prompt": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 20000,
      "description": "Purpose / standing instructions for the stream."
    },
    "auto_merge": {
      "type": "boolean",
      "default": false
    },
    "agent_token_id": {
      "type": "string",
      "format": "uuid",
      "description": "Agent of the project that runs it."
    },
    "run_on_microvm": {
      "type": "boolean"
    },
    "cli_preference": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "orquesta",
        "claude",
        "kimi",
        "cursor",
        "kiro",
        null
      ],
      "description": "Engine for this workstream's prompts; null/empty inherits the project's."
    },
    "model": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 120,
      "pattern": "^[A-Za-z0-9._:/@\\\\[\\\\]-]{1,120}$",
      "description": "For claude a --model name or alias (sonnet",
      "opus": null,
      "haiku); for orquesta an endpoint (batuta or a config name/id). Cleared when the engine does not take a model.": null
    }
  }
}