We consider the equivalence problem for cosmological models in fourdimensional gravity theories. A cosmological model is considered as a triple (M, g, u) consisting of a spacetime (M, g) and a preferred normalized time-like vector field u tangent to a congruence of fundamental observers. We introduce a modification of the Cartan-Karlhede algorithm by restricting to frames adapted to u and including the covariant derivatives of u along with the Riemann tensor and its covariant derivatives. To fix the frame we make use of quantities relative to the fundamental observers, such as the anisotropic pressure tensor, energy flux vector, electric and magnetic parts of the Weyl tensor and the kinematical quantities of u. This provides a simpler way to construct a list of invariants relative to the fundamental observers that completely characterizes the model, independent of coordinates. As an illustration of the algorithm, we consider several well-known cosmological models from General Relativity.