We propose a new framework for creating a surrogate model of computational homogenization for elastoplastic composite materials that serves as a homogenized constitutive law for decoupled two-scale analysis. Two key ingredients of the proposed surrogate modeling are the introduction of a variable representing the macroscopic strain history along with the macroscopic strain and the application of radial basis function (RBF) interpolation. Not only the coefficients of the RBF but also the type of its function form are considered hyperparameters and are determined by applying an optimization algorithm. In the offline process, numerical material tests (NMTs) are performed on a unit cell consisting of multiple elastoplastic materials subjected to various patterns of macroscopic strain to create a database that stores the discrete relationships between variables representing macroscopic deformation states with the macroscopic stresses. Then, RBF interpolation is applied to represent the macroscopic stress in a continuous function with these input data as independent variables. In the online process, this function is used as a macroscopic constitutive law in the macroscopic analysis, which can be followed by localization analysis using an arbitrary macroscopic strain history if necessary.