The thermal and electronic transport properties of Ag-based quaternary compounds, GaAgSnSe 4 and InAgGeSe 4 , have been explored by using density functional theory and the Boltzmann transport equation. Both the compounds exhibit ultralow lattice thermal conductivities (κ l ) that originate from the anharmonicity induced by the rattling effects of the loosely bound Ag atoms in their crystals. The lattice thermal conductivities (κ l,xx(yy) , κ l,zz ) at 300 and 800 K are (0.19, 0.23) and (0.07, 0.08) W m −1 K −1 , respectively, for GaAgSnSe 4 , and those for InAgGeSe 4 are (1.07, 0.97) and (0.40, 0.36) W m −1 K −1 , respectively. Due to the huge and steep total density of states (TDOS) at the band edges in the vicinity of the Fermi level, both direct band gap semiconductors exhibit high Seebeck coefficients (S) with optimum electrical (σ) and electronic thermal conductivities (κ e ). We have projected an outstanding figure of merit (ZT) for both the p-type and n-type of the two compounds. For the p-type and n-type GaAgSnSe 4 , the maximum ZT estimated at 800 K along the (x(y), z)-directions are (2.74, 2.35) and (2.51, 1.84), respectively; for the p-type and n-type InAgGeSe 4 , the values are (1.31, 1.20) and (0.94, 0.90), respectively. Our study suggests both GaAgSnSe 4 and InAgGeSe 4 as prospective thermoelectric materials.