We study local algebras, which are structures similar to \(\mathbb {Z}\) -graded algebras concentrated in degrees \(-1,0,1\) , but without a product defined for pairs of elements at the same degree \(\pm 1\) . To any triple consisting of a Kac–Moody algebra \({\mathfrak g}\) with an invertible and symmetrisable Cartan matrix, a dominant integral weight of \({\mathfrak g}\) and an invariant symmetric bilinear form on \({\mathfrak g}\) , we associate a local algebra satisfying a restricted version of associativity. From it, we derive a local Lie superalgebra by a commutator construction. Under certain conditions, we identify generators which we show satisfy the relations of the tensor hierarchy algebra W previously defined from the same data. The result suggests that an underlying structure satisfying such a restricted associativity may be useful in applications of tensor hierarchy algebras to extended geometry.