AI  related code for Henry.