ModelWorks logoModelWorks

Inputs

Circuit-level and Step-level inputs in ModelWorks

Inputs

ModelWorks circuits support two categories of inputs:

  1. Circuit-level Inputs: Defined at the top of your circuit to parameterize the entire workflow.
  2. Step-level Inputs: Specific to each step primitive, configuring the behavior of built-in functions (e.g. fetch, embed, http_watch).

Circuit-level Inputs

Circuit-level inputs are declared under the inputs key in your circuit definition. They allow you to pass dynamic parameters into a circuit at execution time.

PropertyDescription
nameIdentifier used to reference the input
descriptionHuman-readable explanation
typeData type: string, number, boolean, array, object, or blob
requiredIf true, the execution will fail unless this input is provided
default_valueFallback value when the input is omitted
valueExpression, typically ${{ input.<name> }}, mapping runtime data
min_lengthOptional minimum length constraint (integer)
is_secureIf true, marks the input as containing secret/sensitive data
JSON
"inputs": [
  {
    "name": "messages",
    "description": "Conversation history to seed the model.",
    "value": "${{ input.messages }}",
    "type": "array",
    "required": true
  },
  {
    "name": "store",
    "description": "Whether to persist outputs for model training.",
    "value": "${{ input.store }}",
    "default_value": false,
    "type": "boolean",
    "required": false
  }
]

Step-level Inputs

Each step primitive defines its own required and optional input fields under the input property. For example, the circuit.core.fetch primitive requires:

  • url
  • method

and may accept:

  • headers
  • body
  • other parameters specific to the primitive.

Example:

JSON
"steps": [
  {
    "name": "fetch_data",
    "function": "circuit.core.fetch",
    "input": {
      "url": "https://api.example.com/data",
      "method": "GET",
      "headers": { "Accept": "application/json" }
    }
  }
]

See the Primitive Inputs Reference for detailed fields and validation rules for each built-in step type.


On this page

On this page