Agent Forge

Variables

Define reusable workflow variables directly inside a workflow block

The Variables block (type variables) lets you define named workflow variables inside the canvas instead of only in the sidebar panel. Each variable has a name, type, and value, and can be referenced anywhere with <variable.name>.

For global variable concepts — scope, sidebar management, and access patterns — see Variables.

Overview

Use the Variables block when you want to initialize or update values as part of a workflow run:

Define values inline: Add one or more variables in a single block step

Choose a type: Plain text, Number, Boolean, Object, or Array

Reference downstream: Use <variable.name> in later blocks, same as sidebar variables

Expose structured output: The block outputs a map of all defined variables plus a count

Configuration

Variables manager

The block exposes a full-width Variables editor. For each row:

FieldDescription
NameUnique variable name used in <variable.name> references
TypePlain, Number, Boolean, Object, or Array
ValueInitial value for the variable

You can reference other workflow data in values using <block.field> syntax or environment variables with {{ENV_VAR_NAME}}.

Supported types

Plain text strings. Example: "Hello, World!"

Numeric values used in calculations. Example: 42

True/false flags. Example: true

JSON objects. Example: {"userId": "123", "tier": "pro"}

JSON arrays. Example: ["a", "b", "c"]

Values are coerced automatically when possible — booleans, numbers, and JSON literals are detected from plain text input, matching the sidebar Variables panel behavior.

Inputs and Outputs

Input

ParameterTypeDescription
variablesjsonVariable definitions (name, type, and value rows)

Output

ParameterTypeDescription
variablesjsonMap of variable name to coerced value
countnumberNumber of variables defined

Example use cases

Initialize workflow state

Place a Variables block near the start of a workflow to set defaults such as retryCount, status, or metadata before downstream Agent or API blocks run.

Normalize data for later steps

Convert raw starter input into typed variables — for example, parse a string into a Boolean flag or build an object that multiple blocks consume with <variable.config>.

Batch assignment

Define several related variables in one step instead of scattering assignments across Function blocks.

Notes

  • Category: blocks
  • Type: variables
  • Tool: variables (runs locally; no external API call)
  • Variables defined here behave like sidebar variables and share the same global workflow scope
Variables