How "permanent" is agent variable data?

I know about, but I’m just curious about something. I presume that when I Build & Run some new code that my agent’s variable data will get wiped (although I’ve never confirmed this…), but is there any other reason that agent variables might get reset? If I never update my code, how reliable might agent variable data be over time? Might a variable data stay viable for months, or even years?

No, the agent data persists for the life of the agent. It will be there for the life of the device.

If you change account (or device, obviously) then it will not move. The general rule is if the agent URL hasn’t changed, the data will still be there.

A Build&Run will reset all variables. Data saved using a will remain.

During our regular server maintenance windows we sometimes restart all agents (i.e., we don’t promise not to restart them, though obviously we would only do a restart when absolutely necessary). So, just like a Build&Run, the agent will be restarted, all variables are reset, but data stored away using will remain and can be server.load()ed back again.

If you want to hang onto something for months or years, you need to use


Thought to throw in this question under this post.

Does restarting agents through build&run or server maintenance reset all timerHandles created through the imp.wakeup method.

Yes. Absolutely everything restarts from a blank slate, except for what’s been put in


Thanks for confirming.