In this work, we investigate the inverse problem of determining kernel functions that best describe mechanical behavior a complex medium modeled by general nonlocal viscoelastic wave equation. To end, minimize tracking-type data misfit function under PDE constraint. We perform well-posedness analysis state and adjoint problems and, using these results, rigorously derive first-order sensitivitie...