Output variables for action-to-action data
Key Takeaway
To pass data from one action to another, store the first action's output in a variable and assign that variable as the second action's input. The agent can then use only that variable to fill the input, so the LLM doesn't decide what to pass.
An action output is the data an agent action returns, such as an order ID or a Verified flag. If you store that output in a variable, the agent can hand it to the next action, a filter, or a response, instead of letting the LLM decide what to pass. This turns multi-step work into a reliable, deterministic chain.
Variables and custom variables
A variable stores a value that the agent reuses in these places:
- Its reasoning
- Filters
- Instructions
- Logical expressions
Using variables improves security and keeps agent behavior consistent.
You create a custom variable (also called a mutable variable) to hold an action output. A custom variable belongs only to its agent, and it keeps its value only for the conversation session.
A custom variable can store a value of one of these types:
- String
- Number
- List
- Object
- Boolean
Match the type to the output the variable holds. For example, use Boolean for a Verified flag.
Custom variables are internal by default, so only the agent can set them. If you make a variable external, the Agent API can set it too.