An analysis of high-resolution near-infrared spectra of a sample of 45 asymptotic giant branch (AGB) stars towards the Galactic bulge is presented. The sample consists of two subsamples, a larger one in the inner and intermediate bulge, and a smaller one in the outer bulge. The data are analysed with the help of hydrostatic model atmospheres and spectral synthesis. We derive the radial velocity of all stars, and the atmospheric chemical mix ([Fe/H], C/O, $^{12}$C/$^{13}$C, Al, Si, Ti, and Y) where possible. Our ability to model the spectra is mainly limited by the (in)completeness of atomic and molecular line lists, at least for temperatures down to $T_{rm eff}approx3100$ K. We find that the subsample in the inner and intermediate bulge is quite homogeneous, with a slightly sub-solar mean metallicity and only few stars with super-solar metallicity, in agreement with previous studies of non-variable M-type giants in the bulge. All sample stars are oxygen-rich, C/O$<$1.0. The C/O and carbon isotopic ratios suggest that third dredge-up (3DUP) is absent among the sample stars, except for two stars in the outer bulge that are known to contain technetium. These stars are also more metal-poor than the stars in the intermediate or inner bulge. Current stellar masses are determined from linear pulsation models. The masses, metallicities and 3DUP behaviour are compared to AGB evolutionary models. We conclude that these models are partly in conflict with our observations. Furthermore, we conclude that the stars in the inner and intermediate bulge belong to a more metal-rich population that follows bar-like kinematics, whereas the stars in the outer bulge belong to the metal-poor, spheroidal bulge population.