We investigate the evolution of supermassive black holes in the `Evolution and Assembly of GaLaxies and their Environments' (EAGLE) cosmological hydrodynamic simulations. The largest of the EAGLE volumes covers a $(100 \,\rm cMpc)^3$ and includes state-of-the-art physical models for star formation and black hole growth that depend only on local gas properties. We focus on the black hole mass function, Eddington ratio distribution and the implied duty cycle of nuclear activity. The simulation is broadly consistent with observational constraints on these quantities. In order to make a more direct comparison with observational data, we calculate the soft and hard X-ray luminosity functions of the active galactic nuclei (AGN). Between redshifts $0$ and $1$, the simulation is in agreement with data. At higher redshifts, the simulation tends to underpredict the luminosities of the brightest observed AGN. This may be due to the limited volume of the simulation, or a fundamental deficiency of the underlying model. It seems unlikely that additional unresolved variability can account for this difference. The simulation shows a similar `downsizing' of the AGN population as seen in observational surveys.