There is no agent_type as far as I know. Troop types refer to the bits under troop_type_mask, i.e. tf_male/female/undead.
groups are used exclusively in multiplayer - mostly for bots afaik. They are probably defined in some esoteric way.
classes are grc_infantry/cavalry/archer, which are usually defined at compilation time based on tf_guarantee flags.
divisions are the Warband alternative/replacement - including user-defined groupings from the party menu. I assume that the classes are still there for backward compatibility. Both of these cannot be modified via the operations available.
teams are the various sides in mission templates - they contain divisions which contain agents, etc. header_operations allow you to get/give orders to each "sub_class", which are just divisions containing the various agents friendly to eachother with a specific relation to agents on every other team.
groups are used exclusively in multiplayer - mostly for bots afaik. They are probably defined in some esoteric way.
classes are grc_infantry/cavalry/archer, which are usually defined at compilation time based on tf_guarantee flags.
divisions are the Warband alternative/replacement - including user-defined groupings from the party menu. I assume that the classes are still there for backward compatibility. Both of these cannot be modified via the operations available.
teams are the various sides in mission templates - they contain divisions which contain agents, etc. header_operations allow you to get/give orders to each "sub_class", which are just divisions containing the various agents friendly to eachother with a specific relation to agents on every other team.