Updated to set a default agent_type for each type of agent and set a default appname based on this agent type.  The template uses this appname attribute directly since the variable is not being passed correctly to the template.