We develop an algebraic version of Cartan’s method of equivalence or an analog of Tanaka prolongation for the (extrinsic) geometry of curves of flags of a vector space W with respect to the action of a subgroup G of GL(W). Under some natural assumptions on the subgroup G and on the flags, one can pass from the filtered objects to the corresponding graded objects and describe the construction of canonical bundles of moving frames for these curves in the language of pure linear algebra. The scope of applicability of the theory includes geometry of natural classes of curves of flags with respect to reductive linear groups or their parabolic subgroups. As simplest examples, this includes the projective and affine geometry of curves. The case of classical groups is considered in more detail.