In this work, we compare the SFRs and SFHs of AGN and non-AGN galaxies. We explore these aspects across different density fields and over three orders of magnitude in L$_X$. For that purpose, we employ X-ray AGN detected in the XMM-XXL field and construct a galaxy control sample, using sources from the VIPERS catalogue. Our final samples consist of 149 X-ray AGN with $\rm 42Comment: A&A accepted for publication, 9 pages, 4 figures, 1 table