Armory System.

Not sure why it needs to be any more complicated than that - we've seen NPCs use the teleport/return function, no reason why they wouldn't be able to change classes as they please too (and occasionally show it in action in a trailer).