You can find the code for it in the mev_intro_starterselect_confirm script:
var amp = amp_get_new_party_id(); amp_generate_monster(amp,MONSTER_SPECIES,LEVEL)
If you wanna add it to the box instead, use amp_get_new_box_id to get the first free box slot instead of the first free party slot.