Optimize multi-agent performance and cost