Added agent option to be able to use custom agents.