  A {\em $3$-graph} is a connected cubic graph such that each vertex is is
equipped with a cyclic order of the edges incident with it. A {\em weight
system} is a function $f$ on the collection of $3$-graphs which is {\em
antisymmetric}: $f(H)=-f(G)$ if $H$ arises from $G$ by reversing the
orientation at one of its vertices, and satisfies the IHX-equation. Key
instances of weight systems are the functions $\varphi_{\frak{g}}$ obtained
from a metric Lie algebra $\frak{g}$ by taking the structure tensor $c$ of
$\frak{g}$ with respect to some orthonormal basis, decorating each vertex of
the $3$-graph by $c$, and contracting along the edges.
  We give equations on values of any complex-valued weight system that
characterize it as complex Lie algebra weight system. It also follows that if
$f=\varphi_{\frak{g}}$ for some complex metric Lie algebra $\frak{g}$, then
$f=\varphi_{\frak{g}'}$ for some unique complex reductive metric Lie algebra
$\frak{g}'$. Basic tool throughout is geometric invariant theory.
