Alphakdeps.io is experimental and evolving — the registry and packages may change or reset.
Schemakdeps asset

kdeps-schemas-v1

v2.3.0

kdeps schema: v1

set schemas / shelf workflow

PurposeThe JSON schemas a workflow, resource, component and agency must match.

LLM context: none - kdeps uses it without sending it to the model

Where it runs

Part of the schemas set, used in workflow and agent mode. The JSON schemas a workflow, resource, component and agency must match.

  1. kdeps validate, run or build reads the YAML
  2. the schema checks itschemas/v1
  3. the workflow is accepted, or each error is named

Loaded by: kdeps (agent loop), kdeps new, kdeps validate, kdeps run, kdeps bundle package, kdeps env, kdeps export k8s, kdeps test

In the code: kdeps (agent loop)validator.NewSchemaValidatorvalidator.schemaFS

Install

A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.

kdeps install schemas/v1

Pin a version with kdeps install schemas/v1@<version>.

Contents

kdeps
>=3.7.0

agency.json

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "required": ["apiVersion", "kind", "metadata"],
  "properties": {
    "apiVersion": {
      "type": "string",
      "enum": ["kdeps.io/v1"]
    },
    "kind": {
      "type": "string",
      "enum": ["Agency"]
    },
    "metadata": {
      "type": "object",
      "required": ["name"],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "targetAgentId": {
          "type": "string",
          "minLength": 1,
          "description": "Name (metadata.name) of the agent that acts as the agency entry point"
        }
      }
    },
    "agents": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "additionalProperties": false
}

component.json

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "required": ["apiVersion", "kind", "metadata"],
  "properties": {
    "apiVersion": {
      "type": "string",
      "enum": ["kdeps.io/v1"]
    },
    "kind": {
      "type": "string",
      "enum": ["Component"]
    },
    "metadata": {
      "type": "object",
      "required": ["name"],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "targetActionId": {
          "type": "string",
          "minLength": 1,
          "description": "ActionID of the resource that acts as the component entry point"
        }
      },
      "additionalProperties": false
    },
    "interface": {
      "type": "object",
      "properties": {
        "inputs": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["name", "type"],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": ["string", "integer", "number", "boolean", "array", "object"]
              },
              "required": {
                "type": "boolean"
              },
              "description": {
                "type": "string"
              },
              "default": {},
              "connection": {
                "type": "string",
                "enum": ["search", "sql", "smtp", "imap", "http"],
                "description": "The input names a connection of this kind in ~/.kdeps/config.yaml; kdeps run prompts for a missing one."
              }
            },
            "additionalProperties": false
          }
        },
        "output": {
          "description": "The component's result, evaluated after its resources run (expressions resolved, maps and lists walked). Without it the result is the last resource's output."
        }
      },
      "additionalProperties": false
    },
    "pythonPackages": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "description": "Deprecated: use setup.pythonPackages. Python packages merged into workflow agentSettings at load time."
    },
    "setup": {
      "type": "object",
      "properties": {
        "pythonPackages": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 },
          "description": "Python packages installed via 'uv pip install' before component resources run."
        },
        "osPackages": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 },
          "description": "OS packages installed via apt-get/apk/brew before component resources run."
        },
        "provides": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 },
          "description": "Programs the osPackages install (e.g. tesseract). When all are on PATH, the OS package install is skipped."
        },
        "commands": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Shell commands run once before component resources execute."
        }
      },
      "additionalProperties": false
    },
    "teardown": {
      "type": "object",
      "properties": {
        "commands": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Shell commands run after component resources finish executing."
        }
      },
      "additionalProperties": false
    },
    "resources": {
      "type": "array"
    }
  },
  "additionalProperties": false
}

resource.json

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "responseBlock": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "response": {
          "description": "Response data - can be any type: string, array, object, number, etc."
        },
        "headers": {
          "type": "object",
          "description": "HTTP headers for the response"
        },
        "statusCode": {
          "type": "integer",
          "description": "HTTP status code for the response"
        },
        "meta": {
          "type": "object",
          "description": "Model and backend reported in the response _meta; a chat that ran fills them when unset.",
          "properties": {
            "model": {
              "type": "string"
            },
            "backend": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      }
    },
    "fieldRule": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "string",
            "integer",
            "number",
            "boolean",
            "array",
            "object",
            "email",
            "url",
            "uuid",
            "date"
          ]
        },
        "minLength": {
          "type": "integer"
        },
        "maxLength": {
          "type": "integer"
        },
        "pattern": {
          "type": "string"
        },
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        },
        "minimum": {
          "type": "number"
        },
        "maximum": {
          "type": "number"
        },
        "minItems": {
          "type": "integer"
        },
        "maxItems": {
          "type": "integer"
        },
        "enum": {
          "type": "array"
        },
        "message": {
          "type": "string"
        }
      }
    }
  },
  "type": "object",
  "required": [
    "actionId",
    "name"
  ],
  "properties": {
    "validations": {
      "type": "object",
      "description": "Request validations: allowed methods/routes, required fields, rules and checks.",
      "properties": {
        "methods": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "DELETE",
              "PATCH"
            ]
          }
        },
        "routes": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^/"
          }
        },
        "headers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "params": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "skip": {
          "type": "array",
          "description": "OR logic: any true condition skips the resource"
        },
        "check": {
          "type": "array",
          "description": "AND logic: all must be true or error is returned"
        },
        "error": {
          "type": "object",
          "description": "Error returned when check conditions fail",
          "properties": {
            "code": {
              "type": "integer"
            },
            "message": {
              "type": "string"
            }
          }
        },
        "required": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of required field names"
        },
        "rules": {
          "type": "array",
          "description": "Field-specific validation rules",
          "items": {
            "type": "object",
            "properties": {
              "field": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "string",
                  "integer",
                  "number",
                  "boolean",
                  "array",
                  "object",
                  "email",
                  "url",
                  "uuid",
                  "date"
                ]
              },
              "minLength": {
                "type": "integer"
              },
              "maxLength": {
                "type": "integer"
              },
              "pattern": {
                "type": "string"
              },
              "min": {
                "type": "number"
              },
              "max": {
                "type": "number"
              },
              "minimum": {
                "type": "number"
              },
              "maximum": {
                "type": "number"
              },
              "minItems": {
                "type": "integer"
              },
              "maxItems": {
                "type": "integer"
              },
              "enum": {
                "type": "array"
              },
              "message": {
                "type": "string"
              }
            }
          }
        },
        "properties": {
          "type": "object",
          "description": "Alias for rules: map of field name to rule config",
          "additionalProperties": {
            "$ref": "#/definitions/fieldRule"
          }
        },
        "fields": {
          "type": "object",
          "description": "Alias for rules: map of field name to rule config",
          "additionalProperties": {
            "$ref": "#/definitions/fieldRule"
          }
        },
        "expr": {
          "type": "array",
          "description": "Custom expression-based validation rules (bare scalar strings)",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "chat": {
      "type": "object",
      "properties": {
        "model": {
          "type": "object",
          "description": "Which model answers and how it samples.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Model id, \"router\" / \"auto-router\" to delegate to the router, or \"system\" to follow the machine config (~/.kdeps/config.yaml). Empty behaves like \"system\"."
            },
            "backend": {
              "type": "string",
              "description": "LLM backend name (openai, anthropic, ollama, file, ...) or \"system\" to follow the machine config. Usually left unset."
            },
            "streaming": {
              "type": "boolean"
            },
            "timeout": {
              "type": "string"
            },
            "thinking": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "none",
                    "minimal",
                    "low",
                    "medium",
                    "high",
                    "xhigh",
                    "auto"
                  ]
                },
                "budgetTokens": {
                  "type": "integer",
                  "minimum": 0
                },
                "returnOutput": {
                  "type": "boolean"
                },
                "streamThinking": {
                  "type": "boolean"
                },
                "interleaveThinking": {
                  "type": "boolean"
                }
              }
            },
            "promptCaching": {
              "type": "boolean"
            },
            "useCache": {
              "type": "boolean"
            },
            "temperature": {
              "type": "number",
              "minimum": 0,
              "maximum": 2
            },
            "maxTokens": {
              "type": "integer",
              "minimum": 1
            },
            "topP": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "topK": {
              "type": "integer",
              "minimum": 1
            },
            "seed": {
              "type": "integer"
            },
            "frequencyPenalty": {
              "type": "number",
              "minimum": -2,
              "maximum": 2
            },
            "presencePenalty": {
              "type": "number",
              "minimum": -2,
              "maximum": 2
            },
            "repetitionPenalty": {
              "type": "number",
              "minimum": 0
            },
            "stopWords": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "candidateCount": {
              "type": "integer",
              "minimum": 1
            },
            "n": {
              "type": "integer",
              "minimum": 1
            },
            "minLength": {
              "type": "integer",
              "minimum": 0
            },
            "maxLength": {
              "type": "integer",
              "minimum": 1
            },
            "googleCachedContent": {
              "type": "string"
            },
            "googleHarmThreshold": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4
            },
            "googleCloudProject": {
              "type": "string"
            },
            "googleCloudLocation": {
              "type": "string"
            },
            "googleCredentialsJSON": {
              "type": "string"
            },
            "googleCredentialsFile": {
              "type": "string"
            },
            "anthropicExtendedOutput": {
              "type": "boolean"
            },
            "anthropicBetaHeaders": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "openAILegacyMaxTokens": {
              "type": "boolean"
            },
            "openAIWebSearch": {
              "type": "boolean"
            },
            "ollamaThink": {
              "type": "boolean"
            },
            "ollamaKeepAlive": {
              "type": "string"
            },
            "ollamaPullModel": {
              "type": "boolean"
            },
            "ollamaPullTimeout": {
              "type": "string"
            },
            "ollamaNumCtx": {
              "type": "integer",
              "minimum": 0
            },
            "contextSize": {
              "type": "integer",
              "minimum": 0
            },
            "retries": {
              "description": "Retries after a transient failure (rate limit, 5xx, dropped connection). auto (or omitted) uses the chat-retries event; 0 turns retrying off.",
              "oneOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "string",
                  "const": "auto"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "context": {
          "type": "object",
          "description": "What the model sees: prompt, history, files, examples.",
          "properties": {
            "contextLength": {
              "description": "auto (or omitted) sizes it for the backend.",
              "oneOf": [
                {
                  "type": "integer",
                  "enum": [
                    4096,
                    8192,
                    16384,
                    32768,
                    65536,
                    131072,
                    262144
                  ]
                },
                {
                  "type": "string",
                  "const": "auto"
                }
              ]
            },
            "role": {
              "type": "string"
            },
            "prompt": {
              "type": "string"
            },
            "messages": {
              "type": "string"
            },
            "scenario": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string"
                  },
                  "prompt": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "cacheControl": {
                    "type": "string",
                    "enum": [
                      "ephemeral"
                    ]
                  }
                },
                "required": [
                  "role",
                  "prompt"
                ]
              }
            },
            "fewShot": {
              "type": "object",
              "properties": {
                "examples": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string"
                      },
                      "prompt": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "cacheControl": {
                        "type": "string",
                        "enum": [
                          "ephemeral"
                        ]
                      }
                    },
                    "required": [
                      "role",
                      "prompt"
                    ]
                  }
                },
                "selectK": {
                  "type": "integer",
                  "minimum": 0
                },
                "maxTokens": {
                  "type": "integer",
                  "minimum": 0
                },
                "embeddingModel": {
                  "type": "string"
                },
                "embeddingBackend": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "files": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "promptVars": {
              "type": "object"
            },
            "goTemplate": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "harness": {
          "type": "object",
          "description": "System sections, prompt mode, and output format.",
          "properties": {
            "output": {
              "type": "object",
              "properties": {
                "json": {
                  "type": "boolean"
                },
                "keys": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "schema": {
                  "type": "object"
                },
                "parser": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "sections": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "uniqueItems": true
            },
            "promptMode": {
              "type": "string",
              "enum": ["auto", "full", "summary"],
              "description": "How the harness sections go on requests after the first: full (default), summary, or auto."
            },
            "chainOfThought": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "tools": {
          "type": "object",
          "description": "Tools the model may call.",
          "properties": {
            "list": {
              "description": "auto offers every built-in kdeps tool a workflow chat can call.",
              "oneOf": [
                {
                  "type": "array"
                },
                {
                  "type": "string",
                  "const": "auto"
                }
              ]
            },
            "components": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "choice": {
              "type": "string"
            },
            "maxRounds": {
              "description": "auto (or omitted) uses the chat-max-rounds event.",
              "oneOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "string",
                  "const": "auto"
                }
              ]
            },
            "skills": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "additionalProperties": false
        },
        "rag": {
          "type": "object",
          "description": "Knowledge and retrieved context.",
          "properties": {
            "knowledge": {
              "type": "boolean",
              "description": "Add the knowledge vault notes related to this prompt (default true when the vault has a graph); false skips recall for this call"
            },
            "retriever": {
              "type": "object",
              "properties": {
                "passages": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "topK": {
                  "type": "integer",
                  "minimum": 0
                },
                "maxTokens": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "additionalProperties": false
            },
            "chunk": {
              "type": "object",
              "properties": {
                "size": {
                  "type": "integer",
                  "minimum": 0
                },
                "overlap": {
                  "type": "integer",
                  "minimum": 0
                },
                "splitter": {
                  "type": "string",
                  "enum": [
                    "recursive",
                    "token",
                    "markdown"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "guardrails": {
          "type": "object",
          "description": "Judges that review the answer before it is returned.",
          "properties": {
            "judges": {
              "description": "auto picks up to three judges per request.",
              "oneOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "criteria": {
                        "type": "string"
                      },
                      "allowedTools": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "maxRounds": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "graders": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false,
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "exact",
                                "contains",
                                "not_contains",
                                "regex",
                                "json",
                                "expr"
                              ]
                            },
                            "pattern": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                {
                  "type": "string",
                  "const": "auto"
                }
              ]
            },
            "judgePreset": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false
        },
        "loop": {
          "type": "object",
          "description": "Run this chat as the kdeps agent loop: built-in tools over many rounds, compaction, and a conversation stored per session id.",
          "additionalProperties": false,
          "properties": {
            "tools": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Built-in tools the loop may call (read_file, edit_file, bash_exec, ...). Empty offers every built-in tool."
            },
            "maxRounds": {
              "type": "integer",
              "minimum": 0,
              "description": "Tool rounds per request. 0 uses the agent default."
            },
            "session": {
              "type": "string",
              "description": "Conversation id, usually an expression such as {{ get('session') }}. Requests with the same id continue one stored conversation."
            }
          }
        }
      },
      "additionalProperties": false
    },
    "httpClient": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "method": {
          "type": "string",
          "enum": [
            "GET",
            "POST",
            "PUT",
            "DELETE",
            "PATCH"
          ]
        },
        "headers": {
          "type": "object"
        },
        "body": {
          "type": "object"
        },
        "accountName": {
          "type": "string"
        }
      }
    },
    "python": {
      "type": "object",
      "properties": {
        "script": {
          "type": "string"
        },
        "file": {
          "type": "string"
        },
        "scriptFile": {
          "type": "string"
        },
        "args": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "timeout": {
          "type": "string"
        },
        "venvName": {
          "type": "string",
          "description": "Custom virtual environment name for Python environment isolation"
        },
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Environment variables for the script (values are expressions); use for secrets instead of args"
        }
      }
    },
    "exec": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string"
        },
        "args": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "timeout": {
          "type": "string"
        },
        "workingDir": {
          "type": "string",
          "description": "Working directory for command execution"
        },
        "env": {
          "type": "object",
          "description": "Environment variables",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "apiResponse": {
      "$ref": "#/definitions/responseBlock"
    },
    "agent": {
      "type": "object",
      "description": "Invoke another agent within the same agency",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "Name (metadata.name) of the target agent workflow within the agency"
        },
        "params": {
          "type": "object",
          "description": "Input parameters forwarded to the target agent (accessible via get('key'))"
        }
      }
    },
    "component": {
      "type": "object",
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the component to call"
        },
        "version": {
          "type": "string",
          "description": "Pin a specific component version for reproducible builds"
        },
        "with": {
          "type": "object",
          "description": "Input values scoped to the calling resource actionId",
          "additionalProperties": true
        }
      }
    },
    "actionId": {
      "type": "string",
      "minLength": 1
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "apiVersion": {
      "type": "string",
      "enum": [
        "kdeps.io/v1"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "Resource"
      ]
    },
    "flow": {
      "type": "object",
      "description": "DAG wiring: dependencies, iteration, loop, and error handling.",
      "properties": {
        "loop": {
          "type": "object",
          "description": "Loop iteration config. Repeats the resource body while the optional 'while' expression is true (or indefinitely up to maxIterations when 'while' is omitted). Add 'every' for a fixed inter-iteration delay or 'at' for scheduled fire times.",
          "properties": {
            "while": {
              "type": "string",
              "minLength": 1,
              "description": "Optional boolean expression evaluated before each iteration. Loop continues while truthy. When omitted, the loop runs until maxIterations (default 1000) or until all 'at' entries are consumed."
            },
            "maxIterations": {
              "type": "integer",
              "minimum": 1,
              "description": "Safety cap on the number of iterations (default: 1000)."
            },
            "every": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 0
                },
                {
                  "type": "string",
                  "pattern": "^[0-9]+(ms|s|m|h)$"
                }
              ],
              "description": "Optional inter-iteration delay (e.g. '1s', '500ms', '2m', '1h'). Mutually exclusive with 'at'."
            },
            "at": {
              "type": "array",
              "description": "Array of specific dates/times to fire the loop body. Supported formats: RFC3339 ('2026-03-15T10:00:00Z'), time-of-day ('10:00' or '10:00:00'), or date ('2026-03-15'). Mutually exclusive with 'every'.",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "onError": {
          "type": "object",
          "description": "Error handling configuration for the resource",
          "properties": {
            "action": {
              "type": "string",
              "enum": [
                "continue",
                "fail",
                "retry"
              ],
              "description": "Action to take when an error occurs: continue (proceed with fallback), fail (stop execution), retry (retry with backoff)"
            },
            "maxRetries": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "description": "Maximum number of retry attempts (only for action: retry)"
            },
            "retryDelay": {
              "type": "string",
              "pattern": "^[0-9]+(ms|s|m)$",
              "description": "Delay between retry attempts (e.g., '1s', '500ms')"
            },
            "fallback": {
              "description": "Fallback value to use when error occurs and action is 'continue'"
            },
            "expr": {
              "type": "array",
              "description": "Expressions to execute when an error occurs (has access to 'error' object)"
            },
            "when": {
              "type": "array",
              "description": "Conditions for when to apply this error handler (has access to 'error' object)"
            }
          }
        },
        "requires": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "items": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    }
  }
}

workflow.json

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "required": [
    "apiVersion",
    "kind",
    "metadata"
  ],
  "properties": {
    "apiVersion": {
      "type": "string",
      "enum": [
        "kdeps.io/v1"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "Workflow"
      ]
    },
    "metadata": {
      "type": "object",
      "required": [
        "name",
        "targetActionId"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "targetActionId": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "deploy": {
      "type": "object",
      "description": "How the workflow is served: servers, TLS, input sources, and runtime.",
      "properties": {
        "apiServer": {
          "type": "object",
          "properties": {
            "hostIp": {
              "type": "string"
            },
            "portNum": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            },
            "routes": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "path"
                ],
                "properties": {
                  "path": {
                    "type": "string",
                    "pattern": "^/"
                  },
                  "methods": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "GET",
                        "POST",
                        "PUT",
                        "DELETE",
                        "PATCH"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "webServer": {
          "type": "object"
        },
        "certFile": {
          "type": "string"
        },
        "keyFile": {
          "type": "string"
        },
        "letsEncrypt": {
          "type": "object"
        },
        "input": {
          "type": "object",
          "properties": {
            "sources": {
              "type": "array",
              "minItems": 1,
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "api",
                  "file",
                  "interactive"
                ]
              }
            },
            "file": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "listen": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.-]+$"
                  },
                  "key": {
                    "type": "string"
                  },
                  "fifo": {
                    "type": "object",
                    "required": [
                      "path"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "path": {
                        "type": "string",
                        "minLength": 1
                      },
                      "framing": {
                        "type": "string",
                        "enum": [
                          "line",
                          "json"
                        ]
                      }
                    }
                  },
                  "file": {
                    "type": "object",
                    "required": [
                      "path"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "path": {
                        "type": "string",
                        "minLength": 1
                      },
                      "framing": {
                        "type": "string",
                        "enum": [
                          "line",
                          "json"
                        ]
                      }
                    }
                  },
                  "poll": {
                    "type": "object",
                    "required": [
                      "tool"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "tool": {
                        "type": "string",
                        "minLength": 1
                      },
                      "with": {
                        "type": "object"
                      },
                      "every": {
                        "type": "string"
                      },
                      "items": {
                        "type": "string"
                      },
                      "cursor": {
                        "type": "string"
                      },
                      "start": {
                        "type": "string"
                      }
                    }
                  },
                  "webhook": {
                    "type": "object",
                    "required": [
                      "path"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "addr": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string",
                        "pattern": "^/"
                      },
                      "wait": {
                        "type": "boolean"
                      },
                      "env": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "handshake": {
                        "type": "string"
                      },
                      "when": {
                        "type": "string"
                      },
                      "verify": {
                        "type": "object",
                        "required": [
                          "secret",
                          "signature"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "secret": {
                            "type": "array",
                            "minItems": 1,
                            "items": {
                              "type": "string"
                            }
                          },
                          "algorithm": {
                            "type": "string",
                            "enum": [
                              "sha256",
                              "sha1"
                            ]
                          },
                          "encoding": {
                            "type": "string",
                            "enum": [
                              "hex",
                              "base64"
                            ]
                          },
                          "message": {
                            "type": "string"
                          },
                          "signature": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "websocket": {
                    "type": "object",
                    "required": [
                      "url"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "env": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "open": {
                        "type": "object",
                        "required": [
                          "tool"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "tool": {
                            "type": "string",
                            "minLength": 1
                          },
                          "with": {
                            "type": "object"
                          }
                        }
                      },
                      "url": {
                        "type": "string",
                        "minLength": 1
                      },
                      "headers": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "send": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "heartbeat": {
                        "type": "object",
                        "required": [
                          "send"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "every": {
                            "type": "string"
                          },
                          "send": {
                            "type": "string"
                          }
                        }
                      },
                      "on": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "when"
                          ],
                          "additionalProperties": false,
                          "properties": {
                            "when": {
                              "type": "string"
                            },
                            "set": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              }
                            },
                            "every": {
                              "type": "string"
                            },
                            "send": {
                              "type": "string"
                            },
                            "emit": {
                              "type": "string"
                            },
                            "reconnect": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    }
                  },
                  "listener": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.-]+$"
                  }
                },
                "oneOf": [
                  {
                    "required": [
                      "fifo"
                    ]
                  },
                  {
                    "required": [
                      "file"
                    ]
                  },
                  {
                    "required": [
                      "poll"
                    ]
                  },
                  {
                    "required": [
                      "webhook"
                    ]
                  },
                  {
                    "required": [
                      "websocket"
                    ]
                  },
                  {
                    "required": [
                      "listener"
                    ]
                  }
                ]
              }
            }
          },
          "additionalProperties": false,
          "anyOf": [
            {
              "required": [
                "sources"
              ]
            },
            {
              "required": [
                "listen"
              ]
            }
          ]
        },
        "runtime": {
          "type": "object",
          "properties": {
            "timezone": {
              "type": "string"
            },
            "pythonVersion": {
              "type": "string"
            },
            "pythonPackages": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "requirementsFile": {
              "type": "string"
            },
            "replicas": {
              "not": {},
              "description": "Removed. Use deploy.scale.min and deploy.scale.max."
            }
          }
        },
        "limits": {
          "type": "object",
          "description": "Bounds for each run, for every input.",
          "additionalProperties": false,
          "properties": {
            "timeout": {
              "type": "string",
              "description": "Stop a run after this Go duration, such as 60s. Empty: no limit."
            },
            "concurrency": {
              "type": "integer",
              "minimum": 0,
              "description": "Runs at once in one process. Other runs wait. 0: no limit."
            }
          }
        },
        "scale": {
          "type": "object",
          "description": "Copies of the workflow in a cluster (kdeps export k8s). Default: scale to zero with Knative.",
          "additionalProperties": false,
          "properties": {
            "min": {
              "type": "integer",
              "minimum": 0,
              "description": "Lowest copy count. 0: scale to zero; the first request wakes a copy."
            },
            "max": {
              "type": "integer",
              "minimum": 0,
              "description": "Highest copy count. 0: no limit. min equal to max: a fixed count, no autoscaler."
            },
            "idle": {
              "type": "string",
              "description": "Keep the last copy this long after the last request (Go duration)."
            },
            "engine": {
              "type": "string",
              "enum": [
                "knative",
                "keda"
              ],
              "description": "Autoscaler for scale to zero: knative (default) or keda (HTTP add-on)."
            }
          }
        }
      },
      "additionalProperties": false
    },
    "session": {
      "type": "object"
    },
    "repl": {
      "type": "object",
      "description": "Look of the interactive prompt. Add interactive to deploy.input.sources to turn it on.",
      "additionalProperties": false,
      "properties": {
        "prompt": {
          "type": "string",
          "description": "Text shown before each line."
        },
        "sessionId": {
          "type": "string",
          "description": "Session id for every line; a chat loop: keyed on get('session') keeps one conversation."
        }
      }
    },
    "resources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/resource"
      }
    },
    "evals": {
      "type": "array",
      "description": "Eval cases run by kdeps test against the workflow's own router.",
      "items": {
        "type": "object",
        "required": [
          "name",
          "request"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "timeout": {
            "type": "string",
            "description": "Per-case timeout (e.g. 30s). Defaults to 30s."
          },
          "request": {
            "type": "object",
            "required": [
              "path"
            ],
            "properties": {
              "method": {
                "type": "string",
                "description": "HTTP method (GET, POST, PUT, DELETE, PATCH). Defaults to GET."
              },
              "path": {
                "type": "string",
                "minLength": 1
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "query": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "body": {
                "description": "Request body, encoded as JSON."
              }
            },
            "additionalProperties": false
          },
          "assert": {
            "type": "object",
            "properties": {
              "status": {
                "type": "integer",
                "minimum": 100,
                "maximum": 599
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "body": {
                "type": "object",
                "properties": {
                  "contains": {
                    "type": "string"
                  },
                  "equals": {
                    "type": "string"
                  },
                  "jsonPath": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "path"
                      ],
                      "properties": {
                        "path": {
                          "type": "string",
                          "description": "JSONPath subset: $, .key, and [n] steps."
                        },
                        "equals": {},
                        "contains": {
                          "type": "string"
                        },
                        "exists": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "judges": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string"
                },
                "criteria": {
                  "type": "string"
                },
                "allowedTools": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "maxRounds": {
                  "type": "integer",
                  "minimum": 0
                },
                "graders": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "exact",
                          "contains",
                          "not_contains",
                          "regex",
                          "json",
                          "expr"
                        ]
                      },
                      "pattern": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "judgeModel": {
            "type": "object",
            "description": "Model that reviews judges with criteria.",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "backend": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "repeat": {
            "type": "integer",
            "minimum": 1,
            "description": "Runs of the case (default 1)."
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Pass rate the runs need (default 1: every run)."
          }
        },
        "additionalProperties": false
      }
    }
  },
  "$defs": {
    "resource": {
      "type": "object",
      "required": [
        "actionId",
        "name"
      ],
      "properties": {
        "apiVersion": {
          "type": "string",
          "enum": [
            "kdeps.io/v1"
          ]
        },
        "kind": {
          "type": "string",
          "enum": [
            "Resource"
          ]
        },
        "actionId": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string"
        },
        "flow": {
          "type": "object",
          "properties": {
            "requires": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}

Versions

VersionPublishedStatusSource
2.3.011/28/2026activeGitHub v2.3.0
2.2.011/27/2026activeGitHub v2.2.0
2.1.011/27/2026activeGitHub v2.1.0
2.0.011/26/2026activeGitHub v2.0.0
1.11.011/26/2026activeGitHub v1.11.0
1.10.011/26/2026activeGitHub v1.10.0
1.9.011/26/2026activeGitHub v1.9.0
1.8.011/26/2026activeGitHub v1.8.0
1.4.011/21/2026activeGitHub v1.4.0
1.5.011/21/2026activeGitHub v1.5.0
1.5.111/21/2026activeGitHub v1.5.1
1.6.011/21/2026activeGitHub v1.6.0
1.0.1211/21/2026activeGitHub v1.0.12
1.0.1311/21/2026activeGitHub v1.0.13
1.1.011/21/2026activeGitHub v1.1.0
1.2.011/21/2026activeGitHub v1.2.0
1.3.011/21/2026activeGitHub v1.3.0
1.0.1011/21/2026activeGitHub v1.0.10
1.0.1111/21/2026activeGitHub v1.0.11
1.0.711/21/2026activeGitHub v1.0.7
1.0.811/21/2026activeGitHub v1.0.8
1.0.911/21/2026activeGitHub v1.0.9
1.0.211/21/2026activeGitHub v1.0.2
1.0.311/21/2026activeGitHub v1.0.3
1.0.411/21/2026activeGitHub v1.0.4
1.0.511/21/2026activeGitHub v1.0.5
1.0.611/21/2026activeGitHub v1.0.6
1.0.011/21/2026activeGitHub v1.0.0
1.0.111/21/2026activeGitHub v1.0.1
1.7.011/21/2026activeGitHub v1.7.0

Details

Author
kdeps
License
Apache-2.0
Latest Version
2.3.0
Published
11/21/2026

Tags

kdepsschema