An algebra [Formula: see text] with a generalized [Formula: see text]-action is a generalization of an [Formula: see text]-module algebra where [Formula: see text] is just an associative algebra with [Formula: see text] and a relaxed compatibility condition between the multiplication in [Formula: see text] and the [Formula: see text]-action on [Formula: see text] holds. At first glance, this notion may appear too general, however, it enables to work with algebras endowed with various kinds of additional structures (e.g. comodule algebras over Hopf algebras, graded algebras, algebras with an action of a semigroup by anti-endomorphisms). This approach proves to be especially fruitful in the theory of polynomial identities. We show that if [Formula: see text] is a finite dimensional (not necessarily associative) algebra over a field of characteristic [Formula: see text] and [Formula: see text] is simple with respect to a generalized [Formula: see text]-action, then there exists [Formula: see text] where [Formula: see text] is the sequence of codimensions of polynomial [Formula: see text]-identities of [Formula: see text]. In particular, if [Formula: see text] is a finite dimensional (not necessarily group graded) graded-simple algebra, then there exists [Formula: see text] where [Formula: see text] is the sequence of codimensions of graded polynomial identities of [Formula: see text]. In addition, we study the free-forgetful adjunctions corresponding to (not necessarily group) gradings and generalized [Formula: see text]-actions.