---
title: "Variables"
description: "Pass data between steps, reference user inputs, and access execution context — all using the {{ }} expression syntax."
icon: "brackets-curly"
---

Variables let you wire data through your agent. Any field in any step that shows `{{Steps.StepName.Property}}` as a placeholder accepts a variable expression. Type `{{` in that field to open autocomplete and browse everything available at that point in the agent.

---

## Syntax

All variable expressions use double curly braces:

```
{{Namespace.Path}}
```

| Part | What it means |
|---|---|
| `{{` `}}` | Marks the start and end of an expression |
| `Namespace` | The category of data (see table below) |
| `Path` | Dot-separated path to the exact value |

Spaces in step names are replaced with underscores in expressions — a step called `Get File` becomes `{{Steps.Get_File.FileContent}}`.

---

## Namespaces at a glance

| Namespace | What it contains | Example |
|---|---|---|
| `Variables` | Custom inputs defined on the Input step | `{{Variables.CustomerName}}` |
| `Steps` | Outputs from **any** previous step | `{{Steps.Parse_Doc.MarkdownContent}}` |
| `Inputs` | Outputs from **directly connected** parent steps only | `{{Inputs.My_Step.Value}}` |
| `Execution` | Runtime metadata (IDs, timestamps) | `{{Execution.executionId}}` |
| `User` | Identity of the person running the agent | `{{User.email}}` |
| `Helpers` | Utility functions available at runtime | `{{Helpers.currentDateTime}}` |
| `InputSchema` | Fields from a Tool Interface input schema | `{{InputSchema.ticketId}}` |
| `PromptVariables` | Template slots in prompt segments | `{{PromptVariables.tone}}` |

---

## Input Variables — `{{Variables.Name}}`

Input variables are declared on the **Input step** and filled in by whoever runs the agent — a user in chat, an API caller, or an upstream step.

**Defining them:** Open the Input step → Variables tab → click **Add Variable**. Give it a name, choose a type (String, Number, Integer, URL, Email), and optionally write a description so callers know what to provide.

**Using them downstream:** Reference them anywhere in the agent with `{{Variables.YourVariableName}}`.

```
{{Variables.CustomerEmail}}
{{Variables.OrderId}}
{{Variables.MaxResults}}
```

Input variables are the **entry point for external data**. They are set once before the agent starts and remain constant throughout the run.

<Tip>
The variable name you define on the Input step is exactly what you type after `Variables.` — casing is preserved.
</Tip>

---

## Set Variables — updating values mid-run

The **Set Variable step** lets you assign a new value to an input variable at any point in the agent. Use it when a step produces data you want to carry forward under a consistent name.

**Workflow:**
1. The variable must already exist on the Input step (create it there first, or click **Create New Variable** directly from the Set Variable step panel).
2. Add a **Set Variable** step where you want the assignment to happen.
3. Select the variable from the dropdown and set its value — you can hardcode it or use an expression like `{{Steps.My_Step.Result}}`.
4. Downstream steps read the updated value via `{{Variables.Name}}` as usual.

| | Input Variables | Set Variables |
|---|---|---|
| **Where defined** | Input step → Variables tab | Set Variable step |
| **When set** | Before the agent starts | At a specific point mid-run |
| **Who provides the value** | External caller (user, API, upstream agent) | The agent itself, from step outputs |
| **Syntax to read** | `{{Variables.Name}}` | `{{Variables.Name}}` (same namespace) |
| **Typical use** | Receive user input, API parameters | Store intermediate results, counters, accumulated text |

---

## Step Outputs — `{{Steps.StepName.Property}}`

Every step produces one or more output properties. Reference them in any downstream step using the step's title (spaces → underscores) and the property name.

```
{{Steps.Download_File.FileContentBase64}}
{{Steps.Parse_Document.MarkdownContent}}
{{Steps.AI_Model.Value}}
{{Steps.Get_Order.OrderStatus}}
```

`Steps` gives you access to **all** previous steps in the agent, not just the ones directly connected. If you only want to reference outputs from a step that is directly wired to the current one, use `Inputs` instead — the behaviour is identical but the scope is narrower.

### Array access

When a step returns an array, use bracket notation to access individual elements:

```
{{Steps.My_Step.Results[0].Name}}    — first item
{{Steps.My_Step.Results[-1].Name}}   — last item
```

---

## Execution context — `{{Execution.*}}`

Always available. No setup required.

| Variable | Type | Description |
|---|---|---|
| `{{Execution.executionId}}` | string | Unique ID for this agent run |
| `{{Execution.conversationId}}` | string | ID of the conversation session |

---

## User context — `{{User.*}}`

Available when the agent is run by an authenticated user.

| Variable | Type | Description |
|---|---|---|
| `{{User.id}}` | string | User's unique identifier |
| `{{User.name}}` | string | User's display name |
| `{{User.email}}` | string | User's email address |
| `{{User.roles}}` | string[] | Roles assigned to the user |
| `{{User.groups}}` | string[] | Groups the user belongs to |

---

## Helpers — `{{Helpers.*}}`

Runtime utilities that generate values on demand.

| Variable | Description |
|---|---|
| `{{Helpers.currentDateTime}}` | Current date and time at execution |

---

## Autocomplete

Any field that supports expressions shows autocomplete when you type `{{`. The autocomplete list updates as you type:

- Type `{{` to see all top-level namespaces
- Type `{{Steps.` to see every available previous step
- Type `{{Steps.My_Step.` to see all properties that step exposes
- Continue typing to filter the list

The autocomplete only shows steps that come **before** the current step in the agent — you cannot reference outputs from steps that haven't run yet.

---

## Mixing expressions and plain text

Expressions can be embedded inside longer strings. Everything outside `{{ }}` is treated as literal text:

```
Hello {{Variables.FirstName}}, your order {{Variables.OrderId}} is {{Steps.Check_Status.Status}}.
```

You can use multiple expressions in a single field and combine them with any text you like.

---

## Common mistakes

**Using `Inputs` when you mean `Steps`**
`Inputs` only includes outputs from steps that are directly connected to the current step via an edge. If the step you want is two or more hops away, use `Steps`.

**Referencing a step that runs after the current one**
The autocomplete only surfaces steps that come before the current step. If a step doesn't appear, it either hasn't run yet or is not on a path that leads to the current step.

**Wrong casing or space handling**
Step names are case-sensitive and spaces become underscores. A step titled `Send Email` must be referenced as `{{Steps.Send_Email.Property}}`.

**Expecting a single value from an array**
If a step returns a list, `{{Steps.My_Step.Items}}` gives you the whole array. Use `[0]` or `[-1]` to get a specific element, or pass the array into a Loop step to process each item individually.

**Using `{{Variables.Name}}` before it has been set**
If a variable is defined on the Input step but not filled in by the caller, it arrives as an empty string. Use a Set Variable step earlier in the agent to assign a default if needed.
