We consider a class of time-dependent inclusions in Hilbert spaces for which we state and prove an existence and uniqueness result. The proof is based on arguments of variational inequalities, convex analysis and fixed point theory. Then we use this result to prove the unique weak solvability of a new class of Moreau's sweeping processes with constraints in velocity. Our results are useful in the study of mathematical models which describe the quasistatic evolution of deformable bodies in contact with an obstacle. To provide some examples we consider three viscoelastic contact problems which lead to time-dependent inclusions and sweeping processes in which the unknowns are the displacement and the velocity fields, respectively. Then we apply our abstract results in order to prove the unique weak solvability of the corresponding contact problems.An element ξ ∈ ∂J(u) (if any) is called a subgradient of J in u. We recall that if u / ∈ Dom(J) then ∂J(u) = ∅. For the above function J, its Legendre-Fenchel conjugate is defined as J * : X →] − ∞, +∞],Moreover, the following equivalence holds. a) history-dependent (h.d.), if for any compact set J ⊂ I, there exists L S J > 0 such thatb) almost history-dependent (a.h.d.), if for any compact set J ⊂ I, there exists l S J ∈ [0, 1) and L S J > 0 such that Su 1 (t) − Su 2 (t) Z ≤ l S J u 1 (t) − u 2 (t) Y (2.11) +L S J t 0 u 1 (s) − u 2 (s) Y ds for all u 1 , u 2 ∈ C(I; Y ), t ∈ J .