Dynamic Team Formation in Executable Agent-Based Systems