use write_agmp_message