Cyanide based framework compounds are known to show large negative thermal expansion behaviour. Here we report the phonon and anomalous lattice behavior of two metal cyanide framework compounds i.e. KMnAg3(CN)6 and KNiAu3(CN)6. We have studied the role of van der Waals dispersion and magnetic interactions on structural stability of these compounds. The behavior of these compounds under isotropic compression shows the presence of negative linear compressibility. The calculated phonon spectra, validated by inelastic neutron scattering measurements and elastic constants are used to study the negative thermal expansion behavior which is found to arise from low energy phonon modes involving the folding of A-NC-B-CN-A linkage about B atoms.