add logic to manage agent settings