Added create new agent functionality