In this paper we propose a new formalism to map history-dependent metadynamics in a Markovian process. We apply this formalism to a model Langevin dynamics and determine the equilibrium distribution of a collection of simulations. We demonstrate that the reconstructed free energy is an unbiased estimate of the underlying free energy and analytically derive an expression for the error. The present results can be applied to other history-dependent stochastic processes such as Wang-Landau sampling.