The study focuses on a class of discrete-time multi-agent systems modelling opinion dynamics with decaying confidence. Essentially, we propose an agreement protocol that impose a prescribed convergence rate. Under that constraint, global consensus may not be achieved and only local agreements may be reached. The agents reaching a local agreement form communities inside the network. In this paper, we analyze this opinion dynamics model: we show that communities correspond to asymptotically connected component of the network and give an algebraic characterization of communities in terms of eigenvalues of the matrix defining the collective dynamics. An example shows the effectiveness of the proposed model for community detection in graphs.