This is the AGAMA library for galaxy modelling. Its main tasks include: - Computation of gravitational potential and forces; - Orbit integration and analysis; - Conversion between position/velocity and action/angle coordinates; - Distribution functions (DFs) and their moments; - DF-based self-consistent multi-component galaxy models; - Schwarzschild orbit-superposition models; - Framework for finding best-fit parameters of a model from data; - Auxiliary utilities (e.g., various mathematical routines). The stellar-dynamical Monte Carlo code Raga, the Fokker--Planck code PhaseFlow, and the Schwarzschild modelling code Forstand are included in the Agama distribution. The core of the library is written in C++, and there are Python and Fortran interfaces; it may be used as a plugin for other stellar-dynamical software packages: amuse, gala, galpy, nemo. A detailed documentation for the AGAMA library is presented in a separate file doc/reference.pdf, and a more technical description may be extracted from source files with Doxygen. Instructions for compilation are in the file INSTALL. The package also contains collection of examples and test programs both in C++ and Python.