Categorical Modeling of Multiagent Systems