We study the behavior of the local magnetic moment and hyperfine fields for Fe and Co grains inside the Ag matrix. Our theoretical calculations are used to discuss the experimental results obtained in the literature by NMR and Mössbauer spectroscopy in Co-Ag and Fe-Ag granular systems and we also considered one Fe impurity in the Co clusters in Ag. We use the first-principles real-space linear muffin-tin orbital-atomic-sphere approximation method to calculate the local magnetic moments and the Fermi contact contribution to the hyperfine fields around Fe and Co atoms in different spatial configurations in Ag hosts: isolated impurities, Fe-Fe and Fe-Co dimmers and precipitates containing 13, 19, and 43 atoms. Special attention is given to the differences between central and interface positions of Fe atoms in the two smallest Co clusters. Our results show that the magnetic moments are almost invariant as a function of the local environment for these systems. The local moments at Co atoms inside clusters in Ag have values around 1.8 B , very close to the observed value for bulk fcc Co. The hyperfine fields of Co and Fe atoms inside the clusters are much larger than those at the atoms considered as isolated impurities. The Fe and Co hyperfine fields at atoms occupying interface positions do not depend on the size of the clusters in Ag and tend to be less intense than those of the atoms at inner sites. This information may help in the evaluation of grain sizes in these systems.