Added option to overwrite agent