AI Agent Engineering > Build an AI agent > Assignment blocks
  

Assignment blocks

You can explicitly assign values to the variables in an agent flow. Use an assignment block to set the value of a variable.
To add an assignment block, drag and drop an Assignment block from the Activities menu into the flow.
You can assign the following values to a variable based on its data type:
Boolean
A Boolean variable can have the value True or False. The value is case sensitive, so true and TRUE are not valid values.
Float
Enter a decimal value, for example, 1.23. You can also enter a valid Python expression that evaluates to a floating point number.
Integer
Enter an integer, for example, 1024 or -6. You can also enter a valid Python expression that evaluates to an integer.
String
Enter a string value. For example, This is the value of my string variable. You don't need to enclose the value in quotation marks.
To explicitly assign a null value, set the variable value to None. If the variable is a string variable, you can also set the variable to an empty string, for example, '' or "".