We report ultrasonic investigation of the mixed-valence compounds YbIn1-xAgxCu4 for the different silver concentrations x = 0, 0.2, 0.25, 0.3. This study enables us to characterize the coupling of the Yb ions with the lattice as a function of temperature, magnetic field, and silver concentration. For x = 0 and 0.2 the system demonstrates pronounced first-order phase transition with the abrupt change in the different elastic moduli. For the higher silver concentrations we have observed rather smooth behavior of the elastic constants which is typical for a continuous phase transition. The critical temperature and the size of the anomaly in the bulk modulus at the phase transition changes linearly with silver concentration. External magnetic field shifts the transition to lower temperatures in accordance with previous investigations. Numerical calculations of the bulk modulus and the magnetic susceptibility have been performed in the frame of the promotional Ramirez-Falicov model. The results obtained demonstrate qualitative and quantitative agreement with the experimental data. © 1999 The American Physical Society.