Let's assume your 'box' is a component.
Let's assume there is a value 'x' thet you want it to 'remember' for another time...
You have a reference to the definition - let's say it's ' defn'...
Then this code remembers it:
defn.set_attribute("Cheez_Data","x",x)
Provided that you save the model the next time you want to access the SKP and that definition - perhaps via a selected instance... like defn=model.selection[0].definition - after you test for it being a suitable instance etc...
You could use:
x=defn.get_attribute("Cheez_Data","x",0)
Here it's set to return 0 if it's not been set before - otherwise it's 'nil'.
You can store loads of different data in an object's attribute-dictionary.
The data types can be integer, float, string, boolean, array...
A hash has to be stored as an array for the 'set'... and reconstructed into a hash after the 'get'.
You could attach data to the the model itself, BUT since you are going to change a specific definition you might be best storing it there...
You can attached attribute data to most 'types', but some like geometry are more 'transient'...