Non-stationary Transition Path Theory with applications to tipping and agent-based models