Hello,
Assuming I've understood your scenario correctly, all you have to do is add an extra step (which calls a task which calls a method) to convert your multiline context/agent container element into a multiline container element with just the agents.
Or you could change whatever produced that context/agent element so that it only produces a list of agents.
regards
Rick Bakker