Creation of class agent