Used new agent lib name xaapiv1 and fix env setup.