The Kramers-Klein formalism for activated processes in condensed phases