We deal with homogeneous Besov and Triebel-Lizorkin spaces in the setting of a doubling metric measure space in the presence of a non-negative self-adjoint operator whose heat kernel has Gaussian localization and the Markov property. The class of almost diagonal operators on the associated sequence spaces is developed and it is shown that this class is an algebra. The boundedness of almost diagonal operators is utilized for establishing smooth molecular and atomic decompositions for the above homogeneous Besov and Triebel-Lizorkin spaces. Spectral multipliers for these spaces are established as well.