safe mode on insert/update, create agent rest service