We use AGN with $\rm L_{X} \sim 10^{42.5-44}\,erg\,s^{-1}$, from the COSMOS-Legacy survey that lie within the UltraVISTA region and cross match them with the LEGA-C catalogue. The latter provides measurements of the calcium break, D$_n$4000, and H$_\delta$ Balmer line that allow us to study the stellar populations of AGN and compare them with a galaxy reference catalogue. Our samples consist of 69 AGN and 2176 non-AGN systems, within $\rm 0.6Comment: A&A accepted. 15 pages, 18 figures