The response file for the silent agent installer supports the automatic mapping of the newly created agent to an application/environment/servertype. However this only works if a system parameter is added under the "administration"/"System Settings":
add the following parameter in system settings:
make sure this parameter is there before trying to install agents and map them to servertype/environment/application. A restart of the Automation Center is required before this change becomes effective.
In order to make the configuration of the silent installer response file a bit easier to understand and to configure, I created a version with comments. There is difference between the mandatory and the optional fields to configure. Have a look at the attached file. The example is for LINUX environments.