  In this paper, we present a purely algebraic formulation of higher gauge
theory and gauged sigma models based on the abstract theory of graded
commutative algebras and their morphisms. The formulation incorporates
naturally BRST symmetry and is also suitable for AKSZ type constructions. It is
also shown that for a full--fledged BV formulation including ghost degrees of
freedom, higher gauge and gauged sigma model fields must be viewed as internal
smooth functions on the shifted tangent bundle of a space time manifold valued
in a shifted L_infty-algebroid encoding symmetry. The relationship to other
formulations where the L_infty-algebroid arises from a higher Lie groupoid by
Lie differentiation is highlighted.
