Hi
I think that you should :
1- First determine the total number of step needed (not from a PFAC rule - check a rule in BRF+ for instance or a custom table)
2 - In your rule have in your container bother the step number [from your loop] and plant then you have your agent determined by step and plant.
Best regards
Stephane