Understanding galaxies Gaia and integral-field spectrographs such as MUSE are producing amazing data for both the Milky Way and external galaxies. The data reflect huge selection effects and to overcome these we need sophisticated chemo-dynamical models that can be 'observed' with the same biases. It's vain to suppose we can infer how galaxies formed and how they work as machines until we have constructed credible chemo-dynamical models. Cosmological simulations now yield models that look quite like real galaxies, but these models are almost as hard to understand as real galaxies. We need the techniques I'm going to talk about to understand simulated galaxies. A chemodynamical model comprises a library of orbits with assignments of stars or dark matter to each orbit such that the orbits' potential is jointly generated by the stars and DM. The model doesn't need to be in equilibrium, but equilibrium models are natural starting points - disequilibrium effects can be modelled by perturbation theory. Modelling requires a scheme for labelling orbits. Most current work follows Schwarzschild in labelling orbits with initial conditions. This scheme is highly non-unique and obscures the sampling density. The scheme uses a pre-determined potential rather than a potential that emerges from the modelling process. Orbits have natural labels - 'actions', which are constants of motion J(x,v) that can be embedded as 'momenta' in a canonical coordinate system. The canonically conjugate variables are 'angles' w. An equilibrium model comprises the DFs f_A(J) of each species A (a stellar type or DM). The model is completely specified by the set {f_A} because the potential Phi(x) can be computed from {f_A}. The key to this approach is computing the mapping (x,v) <-> (w,J). A recently released package, AGAMAb, includes significantly improved mapping tools. We'll conclude by illustrating what can be achieved with AGAMAb.