Born effective charges Zi, β α *, dielectric tensors εα,βand the dynamic stability for AgMgF3 and KMgF3 compounds were treated based on the harmonic and quasi-harmonic theory implemented in phonopy code. The band gap for both compounds as well as the effective masses of electrons and holes are calculated at different pressures using the TB-mBJ (GGA) approximation within the framework of the density functional theory. Furthermore, absorption coefficient, refractive index, extinction coefficient, reflectivity, and optical conductivity, for both compounds were calculated. On the other hand, we studied the nature of atomic bonds by the topological distribution of the charge density as well as computing the effective charge of each atom based on the Quantum Theory of Atoms in Molecules (QTAIM) as implemented in Bader code, therefore the ionic type for bonds was explored. The mechanical stability was verified after calculating the elastic behavior at the equilibrium ground-state for both compounds. Thermal properties such as heat capacity at constant volume, entropy, Debye temperature, and thermal expansion coefficient are treated depending on the quasi-harmonic model. They are examined under both pressure and temperature influences. The thermoelectric properties of the compound AgMgF3 showed a high figure of merit (ZT) reached 0.75 at a temperature of 300 K if it was doped with a concentration of 1021 cm-3 of n-type.