Inputs
Circuit-level and Step-level inputs in ModelWorks
Inputs
ModelWorks circuits support two categories of inputs:
- Circuit-level Inputs: Defined at the top of your circuit to parameterize the entire workflow.
- 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.
| Property | Description |
|---|---|
name | Identifier used to reference the input |
description | Human-readable explanation |
type | Data type: string, number, boolean, array, object, or blob |
required | If true, the execution will fail unless this input is provided |
default_value | Fallback value when the input is omitted |
value | Expression, typically ${{ input.<name> }}, mapping runtime data |
min_length | Optional minimum length constraint (integer) |
is_secure | If true, marks the input as containing secret/sensitive data |
"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:
urlmethod
and may accept:
headersbody- other parameters specific to the primitive.
Example:
"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.