  We introduce a numerical method specifically designed for investigating
generic multifield models of inflation where a number of scalar fields $\phi^K$
are minimally coupled to gravity and live in a field space with a non-trivial
metric $G_{IJ}(\phi^K)$. Our algorithm consists of three main parts. Firstly,
we solve the field equations through the entire inflationary period, deriving
predictions for observable quantities such as the spectrum of scalar
perturbations, primordial gravitational waves, and isocurvature modes. We also
incorporate the transfer matrix formalism to track the behavior of adiabatic
and isocurvature modes on super-horizon scales and the transfer of entropy to
scalar modes after the horizon crossing. Secondly, we interface our algorithm
with Boltzmann integrator codes to compute the subsequent full cosmology,
including the cosmic microwave background anisotropies and polarization angular
power spectra. Finally, we develop a novel sampling algorithm able to
efficiently explore a large volume of the parameter space and identify a
sub-region where theoretical predictions agree with observations. In this way,
sampling over the initial conditions of the fields and the free parameters of
the models, we enable Monte Carlo analysis of multifield scenarios. We test all
the features of our approach by analyzing a specific model and deriving
constraints on its free parameters. Our methodology provides a robust framework
for studying multifield inflation, opening new avenues for future research in
the field.
