Algebras for amplitudes