Currently, it does not seem possible to set Values for Agent Variables programmatically as detailed here. It seems to work well for eg. Stocks inside the Agent, but for Variables the following error occurs ([Height] being a variable primitive):
After looking into the code, it seems that there is no specific setValue function specified for variable primitives. Because of that, the default error is thrown.