ModelWorks logoModelWorks
Circuit DevelopmentFunction Primatives

Sleep

Pass-through no-op step using the `circuit.core.sleep` primitive

Introduction to Sleep

The circuit.core.sleep primitive is a pass-through (no-op) step. It accepts a numeric value as input and simply passes its configured outputs through to the circuit's memory without performing any transformation or external work. Use it when you need a placeholder step, a timing/await point, or a step that only forwards data.


Step Syntax

JSON
{
  "name": "<step_name>",
  "description": "Optional description",
  "function": "circuit.core.sleep",
  "input": {
    "value": 123
  },
  "outputs": [
    {
      "name": "<output_name>",
      "description": "Optional description",
      "value": "${{ ... }}"
    }
  ]
}

Step Fields

FieldTypeRequiredDescription
namestringYesA unique identifier for this step.
descriptionstringYesA description of the step's purpose.
functionstringYesMust be "circuit.core.sleep".
inputobjectYesThe input object (see below).
outputsarrayYesOne or more output declarations (see below).

Input Fields

FieldTypeRequiredDescription
valuenumberYesThe numeric value to sleep for. No additional properties are allowed.

Output Fields

Each entry in the outputs array:

FieldTypeRequiredDescription
namestringYesThe output variable name.
descriptionstringYesA description of the output.
valuestringYesA selector or literal value for the output.
default_valueanyNoA default value used if the output value is unavailable.

Behavior

circuit.core.sleep is a no-op: it does not call any external service or transform data. The step passes its configured outputs through to the circuit's memory, making it useful as a placeholder, a timing/await point, or a step that only forwards values to later steps.


Example

JSON
{
  "name": "wait_step",
  "description": "A no-op pass-through step",
  "function": "circuit.core.sleep",
  "input": {
    "value": 100
  },
  "outputs": [
    {
      "name": "elapsed",
      "description": "The value passed through",
      "value": "${{ input.value }}"
    }
  ]
}

You can then reference the output in a later step:

JSON
{
  "name": "final_output",
  "value": "${{ steps.wait_step.output.outputs.elapsed }}"
}
On this page

On this page