Add agent, and delete image if exists