AGP API Sample Codes