intial code to add agent authorization management