Expression Reference
Complete reference for all expression variables available in TARX workflows. Expressions use the {{variable.field}} syntax and are evaluated at runtime when a node executes.
Trigger Node
Node type: triggerNode
| Expression | Type | Description | Example Value |
|---|---|---|---|
{{trigger.output}} | string | The trigger's output — main entry point for all workflows | "artificial intelligence" |
By Trigger Type
| Trigger Type | {{trigger.output}} Value |
|---|---|
| Manual | The string entered in the run modal |
| Webhook | Full JSON payload, or extracted field if payload_path is set |
| Schedule | The default_input configured on the trigger |
| HTTP | Full request context JSON: {"method": "POST", "headers": {...}, "body": {...}, "query_params": {...}} |
Agent Node
Node type: agentNode
The expression variable uses the agent's name (from Agent Editor), not the canvas node label.
| Expression | Type | Description |
|---|---|---|
{{agent_name.output}} | string | The full text output from the LLM call |
Multiple Agents in One Workflow
All previous agents' outputs are available to any downstream node:
# In a third agent node's input:
Research: {{researcher.output}}
Draft: {{writer.output}}
Please review and combine these.
Caveat: Can only reference agents that have already completed (upstream agents). Referencing a downstream or non-existent agent returns empty string.
Loop / Iterator Node
Node type: loopNode
| Expression | Type | Available In | Description |
|---|---|---|---|
{{loop_name.current_item}} | string | Inside loop body | Current item being processed |
{{loop_name.index}} | int | Inside loop body | 0-based index of current iteration |
{{loop_name.output}} | string (JSON array) | After loop completes | JSON array of all iteration results |
Example Values
For a loop named content_loop iterating over ["topic A", "topic B", "topic C"]:
During iteration 1:
{{content_loop.current_item}}→"topic A"{{content_loop.index}}→0
During iteration 2:
{{content_loop.current_item}}→"topic B"{{content_loop.index}}→1
After all iterations:
{{content_loop.output}}→["result for A", "result for B", "result for C"]
Branch Node
Node type: branchNode
| Expression | Type | Description |
|---|---|---|
{{branch_name.output}} | string | "True" or "False" based on condition evaluation |
The branch node also exposes output as a plain variable in the condition expression itself (not via {{...}} syntax — it's a Python variable in the condition field).
Merge Node
Node type: mergeNode
| Expression | Type | Description |
|---|---|---|
{{merge_name.output}} | string | Output from the completed branch (first mode) or combined outputs (all mode) |
Human-in-Loop Node
Node type: humanLoopNode
| Expression | Type | Description |
|---|---|---|
{{hil_name.output}} | string | Decision result including any reviewer comment |
HiL Output Format
| Decision | Output Value |
|---|---|
| Approved (no comment) | "approved" |
| Approved with comment | "approved: [reviewer's comment]" |
| Rejected with comment | "rejected: [reviewer's comment]" |
| Timeout auto-reject | "rejected: timeout — approval expired after N hours" |
Output Node
Node type: outputNode
Output nodes are leaf nodes — they don't expose expressions to other nodes (they're the final collection point). Their value field uses expressions from upstream nodes.
Expression Resolution Rules
1. Execution Order
Expressions resolve to empty string "" if the referenced node hasn't completed yet. Nodes can only reference upstream (already-completed) nodes.
# Valid: writer comes after researcher
researcher → writer
writer's input: "{{researcher.output}}" ✅
# Invalid: researcher references writer which hasn't run yet
writer → researcher
researcher's input: "{{writer.output}}" → "" ❌
2. Case Sensitivity
Agent names in expressions are case-sensitive and must exactly match the agent's name as configured in the Agent Editor.
# Agent named: researcher (lowercase)
{{researcher.output}} ✅ Matches
{{Researcher.output}} ❌ Does not match (returns "")
{{RESEARCHER.output}} ❌ Does not match (returns "")
3. Whitespace in Names
Agent names cannot contain spaces (the Agent Editor enforces this). Use hyphens: seo-writer, not seo writer.
{{seo-writer.output}} ✅ Valid
{{seo writer.output}} ❌ Invalid syntax
4. Nested Expressions
Expressions cannot be nested:
{{{{agent1.output}}.something}} ❌ Not supported
Use a Transform node (JSONPath) to extract a field, or have an agent produce the simple string you need for downstream use.
5. Expression in Different Field Types
| Field Type | Expression Support |
|---|---|
| Text input fields | ✅ Full expression support |
| Dropdown selectors | ❌ No expression support |
| Boolean toggles | ❌ No expression support |
| Numeric fields | ⚠️ Limited — {{loop.index}} works if the field accepts the resulting numeric string |
Condition Expression Variables
In Branch node condition fields, these Python variables are available (not {{...}} syntax — these are direct Python variables):
| Variable | Type | Value |
|---|---|---|
output | str | Output of the immediately upstream node |
trigger_output | str | The original trigger output |
node_outputs | dict | All completed node outputs: {"agent_name": "output_text"} |
Condition Examples Using Variables
# Basic string check using output
"error" in output.lower()
# Length check
len(output) > 500
# Access specific agent output
node_outputs.get("researcher", "") != ""
# Parse JSON from agent output
__import__('json').loads(output).get("severity") == "critical"
# Cross-reference two agents
node_outputs["reviewer_1"].strip() == node_outputs["reviewer_2"].strip()
# Numeric comparison
float(output.strip()) > 0.8
Complete Example
A workflow with all node types, showing which expressions are available at each step:
1. Trigger (Manual): "research quantum computing"
→ {{trigger.output}} = "research quantum computing"
2. Loop: item_loop, items = ["quantum gates", "quantum error correction", "quantum supremacy"]
During iteration 1:
→ {{item_loop.current_item}} = "quantum gates"
→ {{item_loop.index}} = 0
3. Agent: researcher, input = "Research: {{item_loop.current_item}} in context of {{trigger.output}}"
→ {{researcher.output}} = "Quantum gates are the building blocks..."
4. Agent: writer, input = "Write intro based on:\n{{researcher.output}}"
→ {{writer.output}} = "In the world of quantum computing..."
5. Branch: is_long, condition = "len(output) > 500"
→ {{is_long.output}} = "True" or "False"
6. [True path] Agent: summarizer, input = "Summarize:\n{{writer.output}}"
→ {{summarizer.output}} = "A brief summary..."
7. [False path] Agent: expander, input = "Expand to 300 words:\n{{writer.output}}"
→ {{expander.output}} = "Expanded version..."
8. Merge: content_merge
→ {{content_merge.output}} = whichever path ran
9. After loop completes:
→ {{item_loop.output}} = ["result 1", "result 2", "result 3"]
10. Output: {{item_loop.output}}