  Motivated by various random variations of Hegselmann-Krause model for opinion
dynamics and gossip algorithm in an endogenously changing environment, we
propose a general framework for the study of endogenously varying random
averaging dynamics, i.e.\ an averaging dynamics whose evolution suffers from
history dependent sources of randomness. We show that under general assumptions
on the averaging dynamics, such dynamics is convergent almost surely. We also
determine the limiting behavior of such dynamics and show such dynamics admit
infinitely many time-varying Lyapunov functions.
