Variable insertion modes in agent instructions
Inserting variables into agent instructions has been improved. Three modes are now available:
Variable reference. Only the variable name is passed into the instruction. The agent can use it to save a result to the variable or request its value when needed.
Name and value. The variable name and its current value are inserted into the instruction. The agent gets the data right away without an extra request. However, large values increase the instruction size and can raise costs, even if the data isn't needed for the task.
Inserting values can also reduce caching savings. The model can process a repeated beginning of the instruction at a reduced price. If the variable value changes, that part of the instruction and the text after it may need to be processed again without the cache discount.
Value only. Only the variable contents are inserted, without its name. Useful when the data should be included directly in the instruction text and the agent doesn't need to access the variable itself. The effect on instruction size and caching is the same as in the "Name and value" mode.














