The moduli space of Anosov representations of a surface group in a semisimple group admits many more natural functions than the regular functions including length functions and correlation functions. We consider the Atiyah-Bott/Goldman Poisson bracket for length functions and correlation functions and give a formula that computes their Poisson bracket. This is done by introducing a new combinatorial framework including ghost polygons and a ghost bracket encoded in a formal algebra called the ghost algebra. As a consequence, we show that the set of length and correlation functions is stable under the Poisson bracket and give two applications: firstly in the presence of positivity we prove the convexity of length functions, generalising a result of Kerckhoff in Teichmüller space, secondly we exhibit subalgebras of commuting functions associated to laminations. This is joint with François Labourie.